On Tuesday, Jun 8, 2004, at 23:13 US/Pacific, ToughGuy wrote: > Would you know certain commands used for accessing parallel and > serials? As of now, I know 3: > > Peek > Inportb > Outportb > > Are there other commands? > Any tutorial where also definitions and when to used? > Traditionally, "peek" looks at memory, and there is an equivilent "poke" that puts things into memory (usually at arbitrary addresses.) Presumably, inportb and outputb input and output to the io ports of an x86 processor, which is a separate address space. The PC bios include bios-level calls via "software interrupts" for accessing parallel and serial ports, although they tend to be very primitive functions. One of my early IBM PC programming hacks was a TSR program that replaced the rom serial bios functions with an interrupt-driven version that would actually run at reasonable speeds. I don't know offhand whether C or other languages can directly access the bios software interrupt functions; it would make a certain amount of sense. (The useless nature of the default bios functions was why most com and parallel port programs have their own software that fiddles with the hardware directly...) Some languages include library functions for accessing lpt and/or serial ports relatively intelligently. For instance, the original BASICA distributed with the IBM PC had very good functions for dealing with the serial port; You can see an implementation of the xmodem file transfer protocol here: http://www.geocities.com/westfw/ibmftp.bas.txt BillW -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu