On 23/07/2010 11:08, Ruben J=F6nsson wrote: > I have made a lot of programs that use the serialport back in the dos day= s. I > did write my own UART ISR and it worked good on dos and Win 95. But when = I run > these programs on XP or later they don't work very well, if at all. And t= he > biggest problem is that sometimes when the dos program exits, the com por= t is > not released as far as windows is concerned so I can't try it again witho= ut > rebooting windows. I don't get a error message telling me what is going on > either. > > Maby this is your problem also. > NT3.5, NT3.51, NT4.0 NT5.x (Win2K, XP, Win2003), NT6.x (Vista, Win2008, = Win7) all use HAL. Direct I/O (without some sort of real 32bit Windows = driver) will fail. So DOS programs that use BIOS will work via = Virtualised ports in NTVDM. Win3.1/win9x Win16 APIs will work only for = HW, SW or no Handshake actual serial transfer, not for "bit bang" serial = on handshake ports aka I2C, PIC ICSP etc. VB6 software using Com OCX is fine as that is windows 32bit DLL. But = higher speed "bit bang" serial on handshake ports aka I2C, PIC ICSP etc = won't work well, lower speed is OK (up to about 2,400). CPU speed = doesn't help as the task & Thread scheduler screws up timing of "bit = bang" serial I/O on a handshake pin. On NT3.5, NT3.51, NT4.0 NT5.x (Win2K, XP, Win2003), the "DirectIO" = device driver will work for DOS and Win9x sw, mostly. You need to setup = DirectIO and make sure no windows app or service is using the port. Some programs the timing is in SW and direct port access is used = (set-box channel editors and Firmware update, Motorola and other Mobile = radio frequency/Channel programming etc). So even DOS boot doesn't work.. Simplest way to have DOS & Win98 SE: Create a 2G partition with FAT16 (not FAT32). Install Win98SE (gives you DOS7 and you can edit so it always asks DOS = or Windows at boot). Then install NT of Choice from NT3.1 to XP, maybe 2003 also. NOT vista, = Win2008 or Win7 on the rest of the disk (2nd partition). Now on boot you are offered Win98 or XP. On selecting Win98 you are offered DOS 7 or Win98 (You can now install Linux on a 3rd partition and use Lilo, Grub OR NT = Bootloader ini to select all OS) This may be pointless. I've found that really old SW for some things needs a 286 or 386. A 486 = is too fast. I have an old DELL 386 DOS 6.22 for such devices. I have a 450MHz PIII laptop with DOS6.22/WFWG3.11, Win98/Dos7 and Win2K = (it used to have Debian and NT4.0 also). Since DOS6.22/WFW installed 1st, Win98 has option of DoS7, Win98 or = "previous OS" (=3D DOS6.22 + WiFW3.11) Since Win2K installed Last, it offers Win98 (which loads win98 menu) or = Win2K. It used to offer NT.4 and Debian. I find anything that doesn't like the XP (even with DirectIO) on the = 1.8GHz CPU works on Win98 on the PIII 450, except one DOS Motorola Radio = programming app (lives on the old 386). I also have an old 486 160MHz (really), that has Win98 + WFWG3.11 for a = HW ISA MPEG1 capture/playback card with 100% Philips CDi/VCD player = support :-) (it's been in attic a long time) -- = http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist