1
0
mirror of https://github.com/cc65/cc65.git synced 2024-11-15 11:05:56 +00:00

Atari OS: Reestablished DCB structure, fixed union span and timer2.

This commit is contained in:
IrgendwerA8 2019-03-08 11:48:37 +01:00
parent 3d9ac21b80
commit 1359ad793d

View File

@ -55,6 +55,24 @@
#define IOCB_FORMAT 0xFE /* format */
/* Device control block */
struct __dcb {
unsigned char device; /* device id */
unsigned char unit; /* unit number */
unsigned char command; /* command */
unsigned char status; /* command type / status return */
void *buffer; /* pointer to buffer */
unsigned char timeout; /* device timeout in seconds */
unsigned char unused;
unsigned int xfersize; /* # of bytes to transfer */
unsigned char aux1; /* 1st command auxiliary byte */
unsigned char aux2; /* 2nd command auxiliary byte */
};
typedef struct __dcb DCB;
/* I/O control block */
struct __iocb {
@ -540,7 +558,7 @@ struct __os {
// --- Page 3 ---
union {
unsigned char dcb[0x40]; // = $0300-$03XX DEVICE CONTROL BLOCK
DCB dcb; // = $0300-$030B DEVICE CONTROL BLOCK
struct {
unsigned char ddevic; // = $0300 PERIPHERAL UNIT 1 BUS I.D. NUMBER
unsigned char dunit; // = $0301 UNIT NUMBER
@ -569,6 +587,8 @@ struct __os {
unsigned char daux2; // = $030B 1-byte second command auxiliary
};
};
};
};
unsigned int timer1; // = $030C/$030D INITIAL TIMER VALUE
#ifdef OSA
unsigned char addcor; // = $030E ##old## ADDITION CORRECTION
@ -576,7 +596,7 @@ struct __os {
unsigned char jmpers; // = $030E ##1200xl## 1-byte jumper options
#endif
unsigned char casflg; // = $030F CASSETTE MODE WHEN SET
unsigned char timer2; // = $0310/$0311 2-byte final baud rate timer value
unsigned int timer2; // = $0310/$0311 2-byte final baud rate timer value
unsigned char temp1; // = $0312 TEMPORARY STORAGE REGISTER
#ifdef OSA
unsigned char _spare_5; // = $0313 unused
@ -600,8 +620,7 @@ struct __os {
unsigned char pupbt2; // = $033E ##1200xl## 1-byte power-up validation byte 2
unsigned char pupbt3; // = $033F ##1200xl## 1-byte power-up validation byte 3
#endif
};
};
IOCB iocb[8]; // = $0340-$03BF 8 I/O Control Blocks
unsigned char prnbuf[40]; // = $03C0-$3E7 PRINTER BUFFER
#ifdef OSA