Name | Access | Description |
---|---|---|
KB | $0216 | the keyboard buffer |
RX | $0233 | the recieve data buffer for the serial interface |
TX | $0229 | the transmit data buffer for the serial interface |
The access links to a buffer frame placed in the OS RAM variables area. Each buffer frame is 8 bytes length.
Frame structure:
address | length | description |
---|---|---|
IX | 2 | associated handle (for the serial port) |
-01 | 1 | pointer for input |
-02 | 1 | pointer for output |
-03 | 1 | unused |
-04 | 1 | buffer high byte address |
-05 | 1 | buffer start address |
-06 | 1 | buffer end address |
The buffer area begins at $0B00, just after the handles and ends at $0BFF.
address | length | description |
---|---|---|
0B00 | 32 | KB buffer |
0B20 | 96 | TX buffer |
0B80 | 128 | RX buffer |
CALL $004E
IN:
IX buffer access
L reason call
Other register parameters depend on reason call
Reason call: | ||
---|---|---|
$00 | BF_PB | Write to buffer |
$03 | BF_GB | Read from buffer |
$06 | BF_PBT | Write to buffer with timeout |
$09 | BF_GBT | Read from buffer with timeout |
$0C | BF_STA | Get buffer status |
$0F | BF_PUR | Purge buffer |
OUT:
Depends on reason code, see below.
IX always remains unchanged.
IN :
A value to put
IX buffer access
Out if call succeeded:
Fc=0, H full slots, L empty slots.
Out if call failed:
Fc=1, A=RC_EOF buffer is full.
IN : IX buffer access
Out if call succeeded:
Fc=0, A=C data , H full slots, L empty slots.
Out if call failed:
Fc=1, A=RC_EOF buffer is empty.
IN :
A value to put
BC timeout, $FFFF for default
IX buffer access
Out if call succeeded:
Fc=0, BC remaining timeout
Out if call failed:
Fc=1, A=RC_SUSP, RC_ESC, RC_TIME
IN :
BC timeout, $FFFF for default
IX buffer access
Out if call succeeded:
Fc=0, A data read, BC remaining timeout
Out if call failed:
Fc=1, A=RC_SUSP, RC_ESC, RC_TIME
IN : IX buffer access
OUT: Fc=0, always.
H full slots (bytes in use)
L empty slots (free bytes)
IN : IX buffer access
OUT: Fc=0, always.