User Tools

Site Tools


CIGAL Reference Manual, Chapter 2 (Commands): PORTIO

PORTIO -- Read or write to one of the PC's I/O ports

usage: portio flag port write_data (FLAG == 1,3,5)
or: portio flag port read_data (FLAG == 0,2)
or: portio flag port write_data read_data (FLAG == 4)

PORTIO reads or writes the value specified by DATA to or from the I/O port specified by PORT. Reading or writing is controlled by FLAG, as:

   FLAG = 0     Read 1 byte from PORT, put into READ_DATA
          1     Write 1 byte from WRITE_DATA to PORT
          2     Read 1 word (16 bits) from PORT, put into READ_DATA
          3     Write 1 word (16 bits) from WRITE_DATA to PORT
          4     Write 1 byte from WRITE_DATA to PORT,
                   then read 1 byte from PORT+1 and put it into READ_DATA
          5     Write low byte of WRITE_DATA to PORT,
                   then write high byte to PORT+1

WARNING: Reading or writing I/O ports can be dangerous; proceed with caution.

See Also:
CIGAL Home, CIGAL Manual, Commands List, Manual Help

jvs/cigal/manual/chapter2/portio.txt · Last modified: 2023/02/23 18:43 (external edit)