
Commands - 129
SYS(3) is used by assembly language programmers to determine jump vector location.
SYS(4) and SYS (5) return the status of the console output buffer and primary output buffer
respectively. When zero is returned, the buffer is empty. A nonzero value means the buffer has
some character s to send. A nonzer o value is not the number of characters left.
SYS(6) and SYS(7) provide an important data security function when executing the ON COM$
statement. When a par ity, overrun, or framing error occurs on the serial port, CAM BASIC
branches to your ON COM $ interrupt service routine. By testing SYS(6) for the COM 1 Port or
SYS(7) for the COM2 Port, you can determine if the serial data was truncated at the error.
The SYS(6) and SYS(7) will return 0 if no error has occurred. Any nonzero value means an error
has occurred and you can request the host to retransmit the data.
The advanced user may want to know which of the three er rors has occur red. The SYS function w ill
return 64 for an overrun error, 32 for a parity error, and 16 for a framing error. Keep in mind that
an incorrect baud rate could cause any one of these errors, since the incoming bits would be out of
time synchronization with the UART clock.
Errors are m ost likely to occur from noise when using modems or radio links.
SYS(8) returns the start of the keypad string table. Keys may be redefined by POKEing into the
address corresponding to the key' s new value. The following routine prints the address of the
keypad string and the “ key” values.
10 FOR N = SYS(8) TO SYS(8)+15
20 A = PEEK(N)
30 PRINT N,A,CHR$(A)
40 NEXT
SYS(9) and SYS(10) return the number of characters in the COM1 port input buffer and the COM2
port input buffer.
SYS(11) and SYS(12) return the COM1 port buffer full flag and the COM 2 port buffer full flag.
“0” means the buffer is no t full; “ 1” m eans the buffer is full.
SYS(13) and SYS(14) display the cursor position of the VF display.
ERROR: < Data negative> – for n
< Illegal argument> – if n > number of functions
Comentarios a estos manuales