The contents of a hardware interface register are read and returned on the specified interface. Do not mixREADIOWRITEIOoperations withSTATUS/CONTROLoperations. Do not attempt to useREADIOWRITEIOregisters unless you are very familiar with the hardware; use theSTATUS/CONTROLregisters instead. Consult the hardware manuals for your computer for complete documentation on interface hardware. TheUsers Guidelists theREADIOWRITEIOregisters for the interface device drivers included with HTBasic. For other device drivers, the documentation included with the driver lists the register definitions.
READIOWRITEIOregisters in HTBasic are not compatible with HP BASICREADIOWRITEIOregisters when the interface hardware is not the same. TransEra's IEEE-488 and HP's HP-IB use the same IEEE-488 chip; therefore, theREADIOWRITEIOregisters are identical. The serial interface hardware registers differ not only if the UART chip is different, but also if the circuitry surrounding the chip is different. The TransEra GPIO is designed to beREADIOWRITEIOcompatible with HP's GPIO.
Special Interface Select codes
There are a number of special interface select codes which can be read with theREADIOstatement. The legal values for special-interface are given in the following paragraphs. For compatibility with earlier releases of HTBasic,READIO(8080,L) andREADIO(-8080,L) are still supported but have been replaced withINPandINPW, respectively.
PEEK Memory
READIO(9826,L) andREADIO(-9826,L) are used to "peek" at the contents of a memory byte or word, respectively. L specifies the address of the byte/word to peek. If peeking a word and L is odd, the even address L-1 is used. Where L specifies an address within the HTBasic process.
Warning:Peek should only be done on addresses returned byREADIO(9827,I)! Peeking any other location can cause your system to crash, data to be lost and damage to your computer hardware. Use of this function for any other address is unsupported, and TransEra cannot be held responsible for any consequences.
Locating a Numeric Variable
READIO(9827,I) is used to locate the variable I.READIO(9827,A(0)) is used to locate the address of the first element of A. These operations are useful when a small assembly subroutine is stored in a variable and called withWRITEIO.