-
Notifications
You must be signed in to change notification settings - Fork 0
/
CDATA.MAC
executable file
·188 lines (166 loc) · 5.04 KB
/
CDATA.MAC
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
subttl File: CDATA.MAC
;
; Datadefinitions for CBIOS-Rc700. These are present straight after
; the code module. 910302
;
; ISO-8859-1 code page added 930725
;
; ;.phase 0ee80h+1a4h ;
;
BUFFERSTART:: DB 0 ;
HSTBUF:: DS 512 ; 512 bytes deblock buffer
DIRBUF:: DS 128 ;
ALV0:: DS 0047H ; 1136 kb a 2 kb/block with 8 bit/byte
CSV0:: DS 0020H ; 128 directory entries
ALV1:: DS 0047H ; 1136 ...
CSV1:: DS 0020H ; 128 ...
if UseHD
; Please note that the A and B drives
LF1CF:: DS 0047H ; has been expanded to use the whole
LF216:: DS 003FH ; disk, 910327
LF255:: DS 003FH ;
LF294:: DS 003FH ;
LF2D3:: DS 003FH ;
endif
; Sector deblocking variables.
SEKDSK:: DB 0 ;
TRACK:: DW 0 ;
SECTOR:: DW 0 ;
HSTDSK:: DB 0 ;
HSTTRK:: DW 0 ;
HSTSEC:: DW 0 ;
LSTDSK:: DB 0 ;
LSTTRK:: DW 0 ;
SEKHST:: DW 0 ;
HSTACT:: DB 0 ;
HSTWRT:: DB 0 ;
UNACNT:: DB 0 ;
UNADSK:: DB 0 ;
UNATRK:: DW 0 ;
UNASEC:: DW 0 ;
UNAMSK:: DB 0 ;
ERFLAG:: DB 0 ;
RSFLAG:: DB 0 ;
READOP:: DB 0 ;
WRTYPE:: DB 0 ;
DMAAREA:: DW 0 ;
FORM:: DW 0 ; Current diskette format.
CFORM:: DB 0H ; -//-
EOTV:: DB 0 ; SECTORS PR TRACK
DRNO:: DB 0 ;
MAXFLOPPY:: DB 0 ;
LF336:: DB 0 ;
LF337:: DB 0 ;
LF338:: DB 0 ;
CURDRIVE:: DB 0 ;
DSKAD:: DB 0 ;
DSKAD1:: DB 0 ;
ACTRA:: DB 0 ;
ACSEC:: DB 0 ;
REPET:: DB 0 ;
;
; Result registers from FDC. See INIT.MAC for documentation on FDC.
;
FdcST0:: DB 0 ;
FdcST1:: DB 0,0,0,0,0,0,0 ;
;26H,41H,74H,79H,70H,65H,0DH
HDSTATUS:: DB 0 ;
LF348:: DB 0 ;
LF349:: DW 0 ;
SAVESP:: DW 0 ;
HDREADY:: DB 0 ;
FLOPPYBOOT:: DB 0 ;
FDCRESOK:: DB 0 ;
FIRSTLOAD:: DB 0 ;
;
DPBLK:: DB 0 ; 00 This diskblock is set by seldisk
DPBLK1:: DB 0 ; 01 The details have not yet been
CPMRBP:: DB 0 ; 02 covered.
CPMSPT:: DW 0 ; 04
SECMSK:: DB 0 ; 05 SecMsk:= HostSize/128
SECSHF:: DB 0 ; 06
TRANTAB:: DW 0 ; 08
DTLV:: DB 0 ; 09
HDSELECTED:: DB 0 ; 10
dw 0,0,0 ; 16 -- Used to fill up to correct size
db 0 ; one more, just to be sure
; These used to be at $FFD1, but was moved to allow the statusline.
;
XCOOR:: DB 0 ; Current X-coordinate
ScrLineBase:: DW 0 ; Charoffset for currentline.
YCOOR:: DB 0 ; Current Y-coordinate
CURLINESTART:: DW 0 ; Word pointing to start of current line
CHARSYET:: DB 0 ; Characters not yet rec. in GotoXY sequence.
XCOORW:: DW 0 ; Word pointing to current cursorposition
COUTCHAR:: DB 0 ; Char wished to be printed.
FB$ACTI:: DB 0 ; Fore/Background (0=Inactive, 1=Fore, 2=Back)
CB$POS:: DW 0 ;
SAVEXYPOS:: DB 0 ; Save first coordinate in GotoXY with
EXITCOUNT:: DW 0 ; Ticks before EXJP is called
MOTORCOUNT:: DW 0 ; Ticks before minidisk motor is turned off.
WAITCOUNT:: DW 0 ; Ticks bios wants to wait yet.
;
EXJP:: DB 0 ; Jump instruction for EXjpaddr.
EXJPADDR:: Dw 0 ; Jump address for same.
;
; Bug in original bios. Jumpvector was byte instead of word.
; Corrected 910302
MOTOROFFTIME:: DW 0 ; Initvalue for ticks before turning off motor
FB$BASE:: ; Must be known to INIT routine.
if fb$ena ; (Dummy contents)
DB 'e' ;
FB$POS1:: DB 0DH,'08&E&A',0DH,'0'
FB$LINE:: DB '9END&F',0DH,'10M{ngdes grund&A '
DB 'er for stor',0DH,'11Filelementer '
DB 'm}&X v{re &G',0DH,'12&U s&Jl{ngde'
DB 0DH,'13&U grund&A for delinterval'
DB 0DH,'14''..''&F',0DH,'15&Yintervalgr{'
DB 'nser',0DH,'16\vre gr{nse st|rre '
DB 'end nedre',0DH,'17&Esimpel '
DB '&A',0DH,'18Simpel &A&F',0DH
DB '19Ukendt pointer&A i &Adefinitio'
LF5EF:: DB 'n' ;
CB$LASTLI:: DB '(er)',0DH,'20U'
FB$SECO:: DB '&' ;
FB$LAST:: DB 'D'
endif
biosdataend::
;--------------------------
; Interrupt stack:
DS 60h ; Should be enough
INTSTACK::
;--------------------------
; Biosstack is hopefully deep enough
DS 060h
BIOSSTACK::
; CONOUT and KEYIN maps. Setup by init routine.
ISOOUTTABLE:: ; Char 160-255 for output $F620
db 7fh, 7fh, 7fh, 7fh, 7fh, 7fh, 7fh, 7fh
db 7fh, 7fh, 7fh, 7fh, 7fh, 7fh, 7fh, 7fh
db 7fh, 7fh, 7fh, 7fh, 7fh, 7fh, 7fh, 7fh
db 7fh, 7fh, 7fh, 7fh, 7fh, 7fh, 7fh, 7fh
db 7fh, 21h, 63h, 03h, 04h, 59h, 1ch, 13h ; A0
db 10h, 43h, 61h, 3ch, 7fh, 7fh, 52h, 5fh ;
db 27h, 2bh, 32h, 33h, 27h, 7fh, 70h, 2eh ; B0
db 2ch, 31h, 6fh, 3eh, 7fh, 7fh, 7fh, 3fh ;
db 41h, 41h, 41h, 41h, 06h, 5dh, 5bh, 08h ; C0
db 45h, 0ah, 45h, 07h, 49h, 49h, 49h, 49h ;
db 44h, 02h, 4fh, 4fh, 4fh, 09h, 0eh, 78h ; D0
db 5ch, 55h, 55h, 55h, 00h, 59h, 7fh, 11h ;
db 01h, 61h, 61h, 61h, 60h, 7dh, 7bh, 18h ; E0
db 15h, 1ah, 65h, 17h, 19h, 69h, 69h, 69h ;
db 64h, 12h, 6fh, 1fh, 6fh, 09h, 7eh, 2dh ; F0
db 7ch, 14h, 75h, 75h, 40h, 79h, 7fh, 79h ;
KEYOUTTABLE equ 0f680h ; (7bit only) $F680
KEYINTABLE equ 0f700H ; (8bit here!) $F700
page ;
;
; In high memory we only keep the clock counter. If this is needed for
; an application it better be at a fixed address. All the rest was
; moved 910302
;
;;.phase 0FFD0h
;STOPDMAFF:: DB 0FFh ; An FF to stop the DMA for the CRT
CLOCKADDR EQU 0FFFAh ; Pointer to Clock block Structure
CLOCKLOW EQU 0FFFCh ; 32 bits counter for CLOCK
CLOCKHIGH EQU 0FFFEh ;