2328
|
1 ********************************************************************
|
|
2 * OS9Defs - NitrOS-9 System Definitions
|
|
3 *
|
|
4 * $Id$
|
|
5 *
|
|
6 * Edt/Rev YYYY/MM/DD Modified by
|
|
7 * Comment
|
|
8 * ------------------------------------------------------------------
|
|
9 * 1985/08/29 KMZ
|
|
10 * Fixed DT.SBF/NFM values to 3/4
|
|
11 *
|
|
12 * 1985/09/01 KMZ
|
|
13 * Added SS.FDInf, SS.Attr to accept 68K request thru NET.
|
|
14 *
|
|
15 * 1985/09/03 KMZ/Robert F. Doggett
|
|
16 * Eliminated E$BPrcID, made Error #238 become E$DNE for
|
|
17 * 68000 compatability.
|
|
18 *
|
|
19 * 1986/04/15 Mark G. Hawkins
|
|
20 * F$AlHRAM System call added for COCO.
|
|
21 *
|
|
22 * 1986/09/08 Mark G. Hawkins
|
|
23 * F$Alarm for COCO Clock Module.
|
|
24 *
|
|
25 * 1986/09/17 Mark G. Hawkins
|
|
26 * SS.Tone For COCO.
|
|
27 *
|
|
28 * 1986/09/23 Mark G. Hawkins
|
|
29 * Added F$NMLink and F$NMLoad for COCO.
|
|
30 *
|
|
31 * 1986/09/30 Mark G. Hawkins
|
|
32 * Added Reserved User $70 to $7f in sytem calls.
|
|
33 *
|
|
34 * 1986/09/30 Mark G. Hawkins
|
|
35 * Created Color Computer 3 Version of OS9Defs.
|
|
36 *
|
|
37 * 1998/10/03 Boisy G. Pitre
|
|
38 * Consoldated Level 1/Level 2 os9defs.
|
|
39 *
|
|
40 * 2002/04/04 Boisy G. Pitre
|
|
41 * Consoldated Level 2/Level 2 V3 os9defs.
|
|
42 *
|
|
43 * 2002/04/30 Boisy G. Pitre
|
|
44 * Added NitrOS-9 definitions.
|
|
45 *
|
|
46 * 2003/05/30 Boisy G. Pitre
|
|
47 * Added WD1002 sys vars to Level One section.
|
|
48 *
|
|
49 * 2003/06/02 Boisy G. Pitre
|
|
50 * Fixed incorrectly ordered D.X*** system globals for OS-9 Level One and
|
|
51 * changed the sizes from 2 to 3 bytes.
|
|
52 * DT.NFM is now the same for both Level One and Level Two.
|
|
53 * Added DT.CDFM type for future CD-ROM file manager
|
|
54 *
|
|
55 * 2003/11/05 Robert Gault
|
|
56 * Fixed MouseInf. Made it rmb 2 as it should be. Also changes to init and cc3io.
|
|
57 *
|
|
58 * 2005/11/02 P.Harvey-Smith
|
|
59 * Added definitions for boot areas on Dragon computers.
|
|
60 *
|
|
61 * 2006/03/03 Boisy G. Pitre
|
|
62 * Added F$Debug and D.DbgMem areas, common to all levels of NitrOS-9
|
|
63
|
|
64 NAM OS9Defs
|
|
65 IFEQ Level-1
|
|
66 TTL NitrOS-9 Level 1 System Symbol Definitions
|
|
67 ELSE
|
|
68 IFEQ Level-2
|
|
69 TTL NitrOS-9 Level 2 System Symbol Definitions
|
|
70 ELSE
|
|
71 TTL NitrOS-9 Level 3 System Symbol Definitions
|
|
72 ENDC
|
|
73 ENDC
|
|
74
|
|
75 * Common definitions
|
|
76 true: EQU 1 useful name
|
|
77 false: EQU 0 useful name
|
|
78
|
|
79 PAG
|
|
80 *****************************************
|
|
81 * System Service Request Code Definitions
|
|
82 *
|
|
83 csect
|
|
84 F$Link: RMB 1 Link to Module
|
|
85 F$Load: RMB 1 Load Module from File
|
|
86 F$UnLink: RMB 1 Unlink Module
|
|
87 F$Fork: RMB 1 Start New Process
|
|
88 F$Wait: RMB 1 Wait for Child Process to Die
|
|
89 F$Chain: RMB 1 Chain Process to New Module
|
|
90 F$Exit: RMB 1 Terminate Process
|
|
91 F$Mem: RMB 1 Set Memory Size
|
|
92 F$Send: RMB 1 Send Signal to Process
|
|
93 F$Icpt: RMB 1 Set Signal Intercept
|
|
94 F$Sleep: RMB 1 Suspend Process
|
|
95 F$SSpd: RMB 1 Suspend Process
|
|
96 F$ID: RMB 1 Return Process ID
|
|
97 F$SPrior: RMB 1 Set Process Priority
|
|
98 F$SSWI: RMB 1 Set Software Interrupt
|
|
99 F$PErr: RMB 1 Print Error
|
|
100 F$PrsNam: RMB 1 Parse Pathlist Name
|
|
101 F$CmpNam: RMB 1 Compare Two Names
|
|
102 F$SchBit: RMB 1 Search Bit Map
|
|
103 F$AllBit: RMB 1 Allocate in Bit Map
|
|
104 F$DelBit: RMB 1 Deallocate in Bit Map
|
|
105 F$Time: RMB 1 Get Current Time
|
|
106 F$STime: RMB 1 Set Current Time
|
|
107 F$CRC: RMB 1 Generate CRC ($17)
|
|
108
|
|
109 IFGT Level-1
|
|
110
|
|
111 * NitrOS-9 Level 2 system calls
|
|
112 F$GPrDsc: RMB 1 Get Process Descriptor copy ($18)
|
|
113 F$GBlkMp: RMB 1 Get System Block Map copy ($19)
|
|
114 F$GModDr: RMB 1 Get Module Directory copy ($1A)
|
|
115 F$CpyMem: RMB 1 Copy External Memory ($1B)
|
|
116 F$SUser: RMB 1 Set User ID number ($1C)
|
|
117 F$UnLoad: RMB 1 Unlink Module by name ($1D)
|
|
118 F$Alarm: RMB 1 Color Computer 3 Alarm Call ($1E)
|
|
119 RMB 2 Reserved - For overlap of other systems ($1F)
|
|
120 F$NMLink: RMB 1 Color Computer 3 Non-Mapping Link ($21)
|
|
121 F$NMLoad: RMB 1 Color Computer 3 Non-Mapping Load ($22)
|
|
122
|
|
123 ELSE
|
|
124
|
|
125 * NitrOS-9 Level 1 system call padding
|
|
126 RMB 11
|
|
127
|
|
128 ENDC
|
|
129
|
|
130 F$Debug: RMB 1 Drop the system into the debugger ($23)
|
|
131
|
|
132 IFGT Level-1
|
|
133
|
|
134 RMB $25-*
|
|
135 F$TPS: RMB 1 Return System's Ticks Per Second
|
|
136 F$TimAlm: RMB 1 CoCo individual process alarm call
|
|
137
|
|
138 ENDC
|
|
139
|
|
140 RMB $27-* Beginning of System Reserved Calls
|
|
141 * NitrOS-9 common system calls
|
|
142 F$VIRQ: RMB 1 Install/Delete Virtual IRQ
|
|
143 F$SRqMem: RMB 1 System Memory Request
|
|
144 F$SRtMem: RMB 1 System Memory Return
|
|
145 F$IRQ: RMB 1 Enter IRQ Polling Table
|
|
146 F$IOQu: RMB 1 Enter I/O Queue
|
|
147 F$AProc: RMB 1 Enter Active Process Queue
|
|
148 F$NProc: RMB 1 Start Next Process
|
|
149 F$VModul: RMB 1 Validate Module
|
|
150 F$Find64: RMB 1 Find Process/Path Descriptor
|
|
151 F$All64: RMB 1 Allocate Process/Path Descriptor
|
|
152 F$Ret64: RMB 1 Return Process/Path Descriptor
|
|
153 F$SSvc: RMB 1 Service Request Table Initialization
|
|
154 F$IODel: RMB 1 Delete I/O Module
|
|
155
|
|
156 IFGT Level-1
|
|
157
|
|
158 F$SLink: RMB 1 System Link
|
|
159 F$Boot: RMB 1 Bootstrap System
|
|
160 F$BtMem: RMB 1 Bootstrap Memory Request
|
|
161 F$GProcP: RMB 1 Get Process ptr
|
|
162 F$Move: RMB 1 Move Data (low bound first)
|
|
163 F$AllRAM: RMB 1 Allocate RAM blocks
|
|
164 F$AllImg: RMB 1 Allocate Image RAM blocks
|
|
165 F$DelImg: RMB 1 Deallocate Image RAM blocks
|
|
166 F$SetImg: RMB 1 Set Process DAT Image
|
|
167 F$FreeLB: RMB 1 Get Free Low Block
|
|
168 F$FreeHB: RMB 1 Get Free High Block
|
|
169 F$AllTsk: RMB 1 Allocate Process Task number
|
|
170 F$DelTsk: RMB 1 Deallocate Process Task number
|
|
171 F$SetTsk: RMB 1 Set Process Task DAT registers
|
|
172 F$ResTsk: RMB 1 Reserve Task number
|
|
173 F$RelTsk: RMB 1 Release Task number
|
|
174 F$DATLog: RMB 1 Convert DAT Block/Offset to Logical
|
|
175 F$DATTmp: RMB 1 Make temporary DAT image (Obsolete)
|
|
176 F$LDAXY: RMB 1 Load A [X,[Y]]
|
|
177 F$LDAXYP: RMB 1 Load A [X+,[Y]]
|
|
178 F$LDDDXY: RMB 1 Load D [D+X,[Y]]
|
|
179 F$LDABX: RMB 1 Load A from 0,X in task B
|
|
180 F$STABX: RMB 1 Store A at 0,X in task B
|
|
181 F$AllPrc: RMB 1 Allocate Process Descriptor
|
|
182 F$DelPrc: RMB 1 Deallocate Process Descriptor
|
|
183 F$ELink: RMB 1 Link using Module Directory Entry
|
|
184 F$FModul: RMB 1 Find Module Directory Entry
|
|
185 F$MapBlk: RMB 1 Map Specific Block
|
|
186 F$ClrBlk: RMB 1 Clear Specific Block
|
|
187 F$DelRAM: RMB 1 Deallocate RAM blocks
|
|
188 F$GCMDir: RMB 1 Pack module directory
|
|
189 F$AlHRAM: RMB 1 Allocate HIGH RAM Blocks
|
|
190
|
|
191 * Alan DeKok additions
|
|
192 F$ReBoot: RMB 1 Reboot machine (reload OS9Boot) or drop to RSDOS
|
|
193 F$CRCMod: RMB 1 CRC mode, toggle or report current status
|
|
194 F$XTime: RMB 1 Get Extended time packet from RTC (fractions of second)
|
|
195 F$VBlock: RMB 1 Verify modules in a block of memory, add to module directory
|
|
196
|
|
197 ENDC
|
|
198
|
|
199 *
|
|
200 * Numbers $70 through $7F are reserved for user definitions
|
|
201 *
|
|
202 RMB $70-*
|
|
203
|
|
204 IFEQ Level-1
|
|
205
|
|
206 RMB 16 Reserved for user definition
|
|
207
|
|
208 ELSE
|
|
209
|
|
210 F$RegDmp: RMB 1 Ron Lammardo's debugging register dump
|
|
211 F$NVRAM: RMB 1 Non Volatile RAM (RTC battery backed static) read/write
|
|
212
|
|
213 RMB $80-* Reserved for user definitions
|
|
214 ENDC
|
|
215 endsect
|
|
216
|
|
217 PAG
|
|
218 **************************************
|
|
219 * I/O Service Request Code Definitions
|
|
220 *
|
|
221 csect
|
|
222 RMB $80
|
|
223 I$Attach: RMB 1 Attach I/O Device
|
|
224 I$Detach: RMB 1 Detach I/O Device
|
|
225 I$Dup: RMB 1 Duplicate Path
|
|
226 I$Create: RMB 1 Create New File
|
|
227 I$Open: RMB 1 Open Existing File
|
|
228 I$MakDir: RMB 1 Make Directory File
|
|
229 I$ChgDir: RMB 1 Change Default Directory
|
|
230 I$Delete: RMB 1 Delete File
|
|
231 I$Seek: RMB 1 Change Current Position
|
|
232 I$Read: RMB 1 Read Data
|
|
233 I$Write: RMB 1 Write Data
|
|
234 I$ReadLn: RMB 1 Read Line of ASCII Data
|
|
235 I$WritLn: RMB 1 Write Line of ASCII Data
|
|
236 I$GetStt: RMB 1 Get Path Status
|
|
237 I$SetStt: RMB 1 Set Path Status
|
|
238 I$Close: RMB 1 Close Path
|
|
239 I$DeletX: RMB 1 Delete from current exec dir
|
|
240 endsect
|
|
241
|
|
242 *******************
|
|
243 * File Access Modes
|
|
244 *
|
|
245 READ.: EQU %00000001
|
|
246 WRITE.: EQU %00000010
|
|
247 UPDAT.: EQU READ.+WRITE.
|
|
248 EXEC.: EQU %00000100
|
|
249 PREAD.: EQU %00001000
|
|
250 PWRIT.: EQU %00010000
|
|
251 PEXEC.: EQU %00100000
|
|
252 SHARE.: EQU %01000000
|
|
253 DIR.: EQU %10000000
|
|
254 ISIZ.: EQU %00100000
|
|
255
|
|
256 **************
|
|
257 * Signal Codes
|
|
258 *
|
|
259 csect
|
|
260 S$Kill: RMB 1 Non-Interceptable Abort
|
|
261 S$Wake: RMB 1 Wake-up Sleeping Process
|
|
262 S$Abort: RMB 1 Keyboard Abort
|
|
263 S$Intrpt: RMB 1 Keyboard Interrupt
|
|
264 S$Window: RMB 1 Window Change
|
|
265 S$Peer: EQU S$Window Peer disconnected (scdwt)
|
|
266 S$Alarm: RMB 1 CoCo individual process' alarm signal
|
|
267 endsect
|
|
268
|
|
269 PAG
|
|
270 **********************************
|
|
271 * Status Codes for GetStat/GetStat
|
|
272 *
|
|
273 csect
|
|
274 SS.Opt: RMB 1 Read/Write PD Options
|
|
275 SS.Ready: RMB 1 Check for Device Ready
|
|
276 SS.Size: RMB 1 Read/Write File Size
|
|
277 SS.Reset: RMB 1 Device Restore
|
|
278 SS.WTrk: RMB 1 Device Write Track
|
|
279 SS.Pos: RMB 1 Get File Current Position
|
|
280 SS.EOF: RMB 1 Test for End of File
|
|
281 SS.Link: RMB 1 Link to Status routines
|
|
282 SS.ULink: RMB 1 Unlink Status routines
|
|
283 SS.Feed: RMB 1 Issue form feed
|
|
284 SS.Frz: RMB 1 Freeze DD. information
|
|
285 SS.SPT: RMB 1 Set DD.TKS to given value
|
|
286 SS.SQD: RMB 1 Sequence down hard disk
|
|
287 SS.DCmd: RMB 1 Send direct command to disk
|
|
288 SS.DevNm: RMB 1 Return Device name (32-bytes at [X])
|
|
289 SS.FD: RMB 1 Return File Descriptor (Y-bytes at [X])
|
|
290 SS.Ticks: RMB 1 Set Lockout honor duration
|
|
291 SS.Lock: RMB 1 Lock/Release record
|
|
292 SS.DStat: RMB 1 Return Display Status (CoCo)
|
|
293 SS.Joy: RMB 1 Return Joystick Value (CoCo)
|
|
294 SS.BlkRd: RMB 1 Block Read
|
|
295 SS.BlkWr: RMB 1 Block Write
|
|
296 SS.Reten: RMB 1 Retension cycle
|
|
297 SS.WFM: RMB 1 Write File Mark
|
|
298 SS.RFM: RMB 1 Read past File Mark
|
|
299 SS.ELog: RMB 1 Read Error Log
|
|
300 SS.SSig: RMB 1 Send signal on data ready
|
|
301 SS.Relea: RMB 1 Release device
|
|
302 SS.AlfaS: RMB 1 Return Alfa Display Status (CoCo, SCF/GetStat)
|
|
303 SS.Attr: EQU SS.AlfaS To serve 68K/RBF/SetStat only, thru NET
|
|
304 SS.Break: RMB 1 Send break signal out acia
|
|
305 SS.RsBit: RMB 1 Reserve bitmap sector (do not allocate in) LSB(X)=sct#
|
|
306 RMB 1 Reserved
|
|
307 SS.FDInf: EQU $20 To serve 68K/RBF/GetStat only, thru NET
|
|
308 RMB 4 Reserve $20-$23 for Japanese version (Hoshi)
|
|
309 SS.SetMF: RMB 1 Reserve $24 for Gimix G68 (Flex compatability?)
|
|
310 SS.Cursr: RMB 1 Cursor information for COCO
|
|
311 SS.ScSiz: RMB 1 Return screen size for COCO
|
|
312 SS.KySns: RMB 1 Getstat/SetStat for COCO keyboard
|
|
313 SS.ComSt: RMB 1 Getstat/SetStat for Baud/Parity
|
|
314 SS.Open: RMB 1 SetStat to tell driver a path was opened
|
|
315 SS.Close: RMB 1 SetStat to tell driver a path was closed
|
|
316 SS.HngUp: RMB 1 SetStat to tell driver to hangup phone
|
|
317 SS.FSig: RMB 1 New signal for temp locked files
|
|
318 SS.DSize: EQU SS.ScSiz Return disk size (RBF GetStat)
|
|
319 SS.VarSect: EQU SS.DStat Variable Sector Size (RBF GetStat)
|
|
320
|
|
321 * System Specific and User defined codes above $80
|
|
322 RMB $80-*
|
|
323 SS.AAGBf: RMB 1 SetStat to Allocate Additional Graphic Buffer
|
|
324 SS.SLGBf: RMB 1 SetStat to Select a different Graphic Buffer
|
|
325 SS.Mount: RMB 1 Network 4 Mount Setstat
|
|
326 SS.RdNet: RMB 1 Read Raw Sector from Network 4 Omnidrive
|
|
327 SS.MpGPB: RMB 1 SetStat to request a Get/Put Buffer be mapped in workspace
|
|
328 SS.Slots: RMB 1 Network 4 slots? getstat
|
|
329
|
|
330 IFGT Level-1
|
|
331
|
|
332 * Level 2 Windowing
|
|
333 SS.WnSet: RMB 1 Set up High Level Windowing Information
|
|
334 SS.MnSel: RMB 1 Request High level Menu Handler take determine next event
|
|
335 SS.SBar: RMB 1 SetStat to set position block on Window scroll bars
|
|
336 SS.Mouse: RMB 1 Return Mouse information packet (COCO)
|
|
337 SS.MsSig: RMB 1 SetStat to tell driver to send signal on mouse event
|
|
338 SS.AScrn: RMB 1 Allocate a screen for application poking
|
|
339 SS.DScrn: RMB 1 Display a screen allocated by SS.AScrn
|
|
340 SS.FScrn: RMB 1 Free a screen allocated by SS.AScrn
|
|
341 SS.PScrn: RMB 1 Polymorph Screen into different screen type
|
|
342 SS.ScInf: RMB 1 Get Current screen info for direct writes
|
|
343 RMB 1 Reserved
|
|
344 SS.Palet: RMB 1 Return palette information
|
|
345 SS.Montr: RMB 1 Get and Set Monitor Type
|
|
346 SS.ScTyp: RMB 1 Get screen type information
|
|
347 SS.GIP: RMB 1 Global Input Parameters (SetStat)
|
|
348 SS.UMBar: RMB 1 update menu bar (SetStat)
|
|
349 SS.FBRgs: RMB 1 return color registers (GetStat)
|
|
350 SS.DfPal: RMB 1 set/return default palette registers (Getstat/Setstat)
|
|
351 SS.Tone: RMB 1 Generate a tone using 6 bit sound
|
|
352 SS.GIP2: RMB 1 Global Input Params #2 (L2V3)
|
|
353 SS.AnPal: RMB 1 Animate palettes (L2V3)
|
|
354 SS.FndBf: RMB 1 Find named buffer (L2V3)
|
|
355
|
|
356 * sc6551 defined
|
|
357 SS.CDSta: EQU SS.GIP2
|
|
358 SS.CDSig: EQU SS.AnPal
|
|
359 SS.CDRel: EQU SS.FndBf
|
|
360 ELSE
|
|
361 * These are wide open in Level 1
|
|
362 RMB 19
|
|
363
|
|
364 * sc6551 defined
|
|
365 SS.CDSta: RMB 1
|
|
366 SS.CDSig: RMB 1
|
|
367 SS.CDRel: RMB 1
|
|
368 ENDC
|
|
369
|
|
370 RMB $A0-*
|
|
371 *
|
|
372 * New Default SCF input buffer Set status call
|
|
373 SS.Fill: RMB 1 Pre-load SCF device input buffer
|
|
374 SS.Hist: RMB 1 Enable command-line history easily
|
|
375
|
|
376 RMB $B0-*
|
|
377 *
|
|
378 * New WDDisk get/set status calls
|
|
379 SS.ECC: RMB 1 ECC corrected data error enable/disable (GetStat/SetStat)
|
|
380 endsect
|
|
381
|
|
382 *
|
|
383 IFGT Level-1
|
|
384
|
|
385 * VRN get/set status calls. Named by Alan DeKok.
|
|
386 SS.VCtr: EQU $80 Return FS2 total VIRQ counter
|
|
387 SS.VSig: EQU $81 Return FS2 number of signals sent
|
|
388
|
|
389 SS.FClr: EQU $81 Set/clear FS2 VIRQ
|
|
390 SS.FSet: EQU $C7 Set FS2+ VIRQ
|
|
391 SS.KSet: EQU $C8 Set KQ3 VIRQ
|
|
392 SS.KClr: EQU $C9 Clr KQ3 VIRQ
|
|
393 SS.ARAM: EQU $CA Allocate RAM blocks
|
|
394 SS.DRAM: EQU $CB De-allocate RAM blocks
|
|
395
|
|
396 * SDisk 3 Definition Equates
|
|
397 SS.DRead: EQU SS.AAGBf SDisk3 Direct Sector Read ($80)
|
|
398 SS.DWrit: EQU SS.DRead SDisk3 Direct sector Write ($80)
|
|
399 SS.UnFrz: EQU SS.SLGBf SDisk3 UNFreeze DD info ($81)
|
|
400 SS.MOFF: EQU SS.Mount SDisk3 fast motor off call ($82)
|
|
401 SS.MoTim: EQU SS.RdNet SDisk3 Set motor shut off time ($83)
|
|
402 SS.SDRD: EQU SS.MpGPB SDisk3 System direct read ($84)
|
|
403 SS.SDWRT: EQU SS.SDRD SDisk3 System direct writes ($84)
|
|
404 SS.Sleep: EQU SS.Slots SDisk3 (DMC ONLY) Enable/disable F$Sleep calls in read/write 1773 I/O ($85)
|
|
405 SS.DrvCh: EQU SS.WnSet SDisk3 (DMC ONLY) Set drive number to cache, or return drive number being cached ($86)
|
|
406
|
|
407 ENDC
|
|
408
|
|
409 TTL Direct Page Definitions
|
|
410 PAG
|
|
411
|
|
412 **********************************
|
|
413 * Direct Page Variable Definitions
|
|
414 *
|
|
415 csect
|
|
416 D.WDAddr: RMB 2 FHL/Isted WD1002-05 interface base address
|
|
417 D.WDBtDr: RMB 1 FHL/Isted WD1002-05 boot physical device drive num.
|
|
418 D.SWPage: RMB 1 SmartWatch page # (see clock2_smart)
|
|
419 RMB 5
|
|
420 D.COCOXT: RMB 1 Busy flag for CoCo-XT driver (one drive at a time)
|
|
421 D.DbgMem: RMB 2 Debug memory pointer
|
|
422 D.DWSubAddr: RMB 2 DriveWire subroutine module pointer
|
|
423 D.DWStat: RMB 2 DriveWire statics page
|
|
424
|
|
425 RMB $20-*
|
|
426
|
|
427 IFEQ Level-1
|
|
428
|
|
429 * Level 1 DP vars
|
|
430 D.FMBM: RMB 4 Free memory bit map pointers
|
|
431 D.MLIM: RMB 2 Memory limit $24
|
|
432 D.ModDir: RMB 4 Module directory $26
|
|
433 D.Init: RMB 2 Rom base address $2A
|
|
434 D.SWI3: RMB 2 Swi3 vector $2C
|
|
435 D.SWI2: RMB 2 Swi2 vector $2E
|
|
436 D.FIRQ: RMB 2 Firq vector $30
|
|
437 D.IRQ: RMB 2 Irq vector $32
|
|
438 D.SWI: RMB 2 Swi vector $34
|
|
439 D.NMI: RMB 2 Nmi vector $36
|
|
440 D.SvcIRQ: RMB 2 Interrupt service entry $38
|
|
441 D.Poll: RMB 2 Interrupt polling routine $3A
|
|
442 D.UsrIRQ: RMB 2 User irq routine $3C
|
|
443 D.SysIRQ: RMB 2 System irq routine $3E
|
|
444 D.UsrSvc: RMB 2 User service request routine $40
|
|
445 D.SysSvc: RMB 2 System service request routine $42
|
|
446 D.UsrDis: RMB 2 User service request dispatch table
|
|
447 D.SysDis: RMB 2 System service reuest dispatch table
|
|
448 D.Slice: RMB 1 Process time slice count $48
|
|
449 D.PrcDBT: RMB 2 Process descriptor block address $49
|
|
450 D.Proc: RMB 2 Process descriptor address $4B
|
|
451 D.AProcQ: RMB 2 Active process queue $4D
|
|
452 D.WProcQ: RMB 2 Waiting process queue $4F
|
|
453 D.SProcQ: RMB 2 Sleeping process queue $51
|
|
454 D.Time: EQU * Time
|
|
455 D.Year: RMB 1 $53
|
|
456 D.Month: RMB 1 $54
|
|
457 D.Day: RMB 1 $55
|
|
458 D.Hour: RMB 1 $56
|
|
459 D.Min: RMB 1 $57
|
|
460 D.Sec: RMB 1 $58
|
|
461 D.Tick: RMB 1 $59
|
|
462 D.TSec: RMB 1 Ticks / second $5A
|
|
463 D.TSlice: RMB 1 Ticks / time-slice $5B
|
|
464 D.IOML: RMB 2 I/O mgr free memory low bound $5C
|
|
465 D.IOMH: RMB 2 I/O mgr free memory hi bound $5E
|
|
466 D.DevTbl: RMB 2 Device driver table addr $60
|
|
467 D.PolTbl: RMB 2 Irq polling table addr $62
|
|
468 D.PthDBT: RMB 2 Path descriptor block table addr $64
|
|
469 D.BTLO: RMB 2 Bootstrap low address $66
|
|
470 D.BTHI: RMB 2 Bootstrap hi address $68
|
|
471 D.DMAReq: RMB 1 DMA in use flag $6A
|
|
472 D.AltIRQ: RMB 2 Alternate IRQ vector (CC) $6B
|
|
473 D.KbdSta: RMB 2 Keyboard scanner static storage (CC) $6D
|
|
474 D.DskTmr: RMB 2 Disk Motor Timer (CC) $6F
|
|
475 D.CBStrt: RMB 16 reserved for CC warmstart ($71)
|
|
476 D.Clock: RMB 2 Address of Clock Tick Routine (CC) $81
|
|
477 D.Boot: RMB 1 Bootstrap attempted flag
|
|
478 D.URtoSs: RMB 2 address of user to system routine (VIRQ) $84
|
|
479 D.CLTb: RMB 2 Pointer to clock interrupt table (VIRQ) $86
|
|
480 D.MDREG: RMB 1 6309 MD (mode) shadow register $88 (added in V2.01.00)
|
|
481 D.CRC: RMB 1 CRC checking mode flag $89 (added in V2.01.00)
|
|
482 D.Clock2: RMB 2 CC Clock2 entry address
|
|
483
|
|
484 RMB $100-*
|
|
485 D.XSWI3: RMB 3
|
|
486 D.XSWI2: RMB 3
|
|
487 D.XSWI: RMB 3
|
|
488 D.XNMI: RMB 3
|
|
489 D.XIRQ: RMB 3
|
|
490 D.XFIRQ: RMB 3
|
|
491
|
|
492 * Table Sizes
|
|
493 BMAPSZ: EQU 32 Bitmap table size
|
|
494 SVCTNM: EQU 2 Number of service request tables
|
|
495 SVCTSZ: EQU (256-BMAPSZ)/SVCTNM-2 Service request table size
|
|
496
|
|
497 ELSE
|
|
498
|
|
499 * Level 2 DP vars
|
|
500 D.Tasks: RMB 2 Task User Table
|
|
501 D.TmpDAT: RMB 2 Temporary DAT Image stack
|
|
502 D.Init: RMB 2 Initialization Module ptr
|
|
503 D.Poll: RMB 2 Interrupt Polling Routine ptr
|
|
504 D.Time: EQU * System Time
|
|
505 D.Year: RMB 1
|
|
506 D.Month: RMB 1
|
|
507 D.Day: RMB 1
|
|
508 D.Hour: RMB 1
|
|
509 D.Min: RMB 1
|
|
510 D.Sec: RMB 1
|
|
511 D.Tick: RMB 1
|
|
512 D.Slice: RMB 1 current slice remaining
|
|
513 D.TSlice: RMB 1 Ticks per Slice
|
|
514 D.Boot: RMB 1 Bootstrap attempted flag
|
|
515 D.MotOn: RMB 1 Floppy Disk Motor-On time out
|
|
516 D.ErrCod: RMB 1 Reset Error Code
|
|
517 D.Daywk: RMB 1 day of week, com-trol clock
|
|
518 D.TkCnt: RMB 1 Tick Counter
|
|
519 D.BtPtr: RMB 2 Address of Boot in System Address space
|
|
520 D.BtSz: RMB 2 Size of Boot
|
|
521
|
|
522 IFNE H6309
|
|
523 D.MDREG: RMB 1 6309 MD (mode) shadow register
|
|
524 ELSE
|
|
525 RMB 1 Currently unused in NitrOS-9/6809
|
|
526 ENDC
|
|
527
|
|
528 D.CRC: RMB 1 CRC checking mode flag
|
|
529
|
|
530 D.Tenths: RMB 1 Tenths and hundredths of second for F$Xtime
|
|
531 D.Task1N: RMB 1 Map type 1 task number*2 - offset into [D.TskIPt]
|
|
532 D.Quick: RMB 1 Quick system call return flag - 0 =stack is at $FEE1
|
|
533 D.QIRQ: RMB 1 Quick IRQ flag - 0 =IRQ wasn't clock, so quick return
|
|
534
|
|
535 RMB $40-*
|
|
536 D.BlkMap: RMB 4 Memory Block Map ptr
|
|
537 D.ModDir: RMB 4 Module Directory ptrs
|
|
538 D.PrcDBT: RMB 2 Process Descriptor Block Table ptr
|
|
539 D.SysPrc: RMB 2 System Process Descriptor ptr
|
|
540 D.SysDAT: RMB 2 System DAT Image ptr
|
|
541 D.SysMem: RMB 2 System Memory Map ptr
|
|
542 D.Proc: RMB 2 Current Process ptr
|
|
543 D.AProcQ: RMB 2 Active Process Queue
|
|
544 D.WProcQ: RMB 2 Waiting Process Queue
|
|
545 D.SProcQ: RMB 2 Sleeping Process Queue
|
|
546 D.ModEnd: RMB 2 Module Directory end ptr
|
|
547 D.ModDAT: RMB 2 Module Dir DAT image end ptr
|
|
548 D.CldRes: RMB 2 Cold Restart vector
|
|
549 D.BtBug: RMB 3 Boot debug information
|
|
550 D.Pipe: RMB 2
|
|
551
|
|
552 RMB $6B-*
|
|
553 D.Crash: RMB 6 Pointer to CC Crash Routine
|
|
554 D.CBStrt: RMB $B Reserved for CC warmstart ($71)
|
|
555 D.QCnt: RMB 1 Count of number of quick system calls performed
|
|
556
|
|
557 RMB $80-*
|
|
558 D.DevTbl: RMB 2 I/O Device Table
|
|
559 D.PolTbl: RMB 2 I/O Polling Table
|
|
560 RMB 4 reserved
|
|
561 D.PthDBT: RMB 2 Path Descriptor Block Table ptr
|
|
562 D.DMAReq: RMB 1 DMA Request flag
|
|
563
|
|
564 ********
|
|
565 * CoCo 3 STUFF COMES NEXT
|
|
566 * This area is used for the CoCo Hardware Registers
|
|
567 *
|
|
568 RMB $90-*
|
|
569 D.HINIT: RMB 1 GIME INIT0 register (hardware setup $FF90)
|
|
570 D.TINIT: RMB 1 GIME INIT1 register (timer/task register $FF91)
|
|
571 D.IRQER: RMB 1 Interrupt enable regsiter ($FF92)
|
|
572 D.FRQER: RMB 1 Fast Interrupt enable register ($FF93)
|
|
573 D.TIMMS: RMB 1 Timer most significant nibble ($FF94)
|
|
574 D.TIMLS: RMB 1 Timer least significant byte ($FF95)
|
|
575 D.RESV1: RMB 1 reserved register ($FF96)
|
|
576 D.RESV2: RMB 1 reserved register ($FF97)
|
|
577 D.VIDMD: RMB 1 video mode register ($FF98)
|
|
578 D.VIDRS: RMB 1 video resolution register ($FF99)
|
|
579 D.BORDR: RMB 1 border register ($FF9A)
|
|
580 D.RESV3: RMB 1 reserved register ($FF9B)
|
|
581 D.VOFF2: RMB 1 vertical scroll/offset 2 register ($FF9C)
|
|
582 D.VOFF1: RMB 1 vertical offset 1 register ($FF9D)
|
|
583 D.VOFF0: RMB 1 vertical offset 0 register ($FF9E)
|
|
584 D.HOFF0: RMB 1 horizontal offset 0 register ($FF9F)
|
|
585 D.Speed: RMB 1 Speed of COCO CPU 0=slow,1=fast ($A0)
|
|
586 D.TskIPt: RMB 2 Task image Pointer table (CC) ($A1)
|
|
587 D.MemSz: RMB 1 128/512K memory flag (CC) ($A3)
|
|
588 D.SSTskN: RMB 1 System State Task Number (COCO) ($A4)
|
|
589 D.CCMem: RMB 2 Pointer to beginning of CC Memory ($A5)
|
|
590 D.CCStk: RMB 2 Pointer to top of CC Memory ($A7)
|
|
591 D.Flip0: RMB 2 Change to Task 0 ($A9)
|
|
592 D.Flip1: RMB 2 Change to reserved Task 1 ($AB)
|
|
593 D.VIRQ: RMB 2 VIRQ Polling routine ($AD)
|
|
594 D.IRQS: RMB 1 IRQ shadow register (CC Temporary) ($AF)
|
|
595 D.CLTb: RMB 2 VIRQ Table address ($B0)
|
|
596 D.AltIRQ: RMB 2 Alternate IRQ Vector (CC) ($B2)
|
|
597 D.GPoll: RMB 2 CC GIME IRQ enable/disable toggle
|
|
598 D.Clock2: RMB 2 CC Clock2 entry address
|
|
599 RMB $C0-*
|
|
600 D.SysSvc: RMB 2 System Service Routine entry
|
|
601 D.SysDis: RMB 2 System Service Dispatch Table ptr
|
|
602 D.SysIRQ: RMB 2 System IRQ Routine entry
|
|
603 D.UsrSvc: RMB 2 User Service Routine entry
|
|
604 D.UsrDis: RMB 2 User Service Dispatch Table ptr
|
|
605 D.UsrIRQ: RMB 2 User IRQ Routine entry
|
|
606 D.SysStk: RMB 2 System stack
|
|
607 D.SvcIRQ: RMB 2 In-System IRQ service
|
|
608 D.SysTsk: RMB 1 System Task number
|
|
609 RMB $E0-*
|
|
610 D.Clock: RMB 2
|
|
611 D.XSWI3: RMB 2
|
|
612 D.XSWI2: RMB 2
|
|
613 D.XFIRQ: RMB 2
|
|
614 D.XIRQ: RMB 2
|
|
615 D.XSWI: RMB 2
|
|
616 D.XNMI: RMB 2
|
|
617 D.ErrRst: RMB 2
|
|
618 D.SysVec: RMB 2 F$xxx system call vector for NitrOS-9 Level 3
|
|
619 D.SWI3: RMB 2
|
|
620 D.SWI2: RMB 2
|
|
621 D.FIRQ: RMB 2
|
|
622 D.IRQ: RMB 2
|
|
623 D.SWI: RMB 2
|
|
624 D.NMI: RMB 2
|
|
625
|
|
626 *************************
|
|
627 * Level 2 Block Map flags
|
|
628 *
|
|
629 NotRAM: EQU %10000000 Block Not RAM flag
|
|
630 VidRAM: EQU %00000100 Block is being used as Video RAM
|
|
631 ModBlock: EQU %00000010 Module in Block
|
|
632 RAMinUse: EQU %00000001 RAM Block in use flag
|
|
633 *
|
|
634 * Service Dispatch Table special entries
|
|
635 *
|
|
636 IOEntry: EQU 254
|
|
637
|
|
638 ENDC
|
|
639 endsect
|
|
640
|
|
641 TTL Structure Formats
|
|
642 PAG
|
|
643 ************************************
|
|
644 * Module Directory Entry Definitions
|
|
645 *
|
|
646 csect
|
|
647 IFGT Level-1
|
|
648 MD$MPDAT: RMB 2 Module DAT Image ptr
|
|
649 MD$MBSiz: RMB 2 Memory Block size
|
|
650 ENDC
|
|
651 MD$MPtr: RMB 2 Module ptr
|
|
652 MD$Link: RMB 2 Module Link count
|
|
653 MD$ESize: EQU * Module Directory Entry size
|
|
654 endsect
|
|
655
|
|
656 ************************************
|
|
657 * Module Definitions
|
|
658 *
|
|
659 * Universal Module Offsets
|
|
660 *
|
|
661 csect
|
|
662 M$ID: RMB 2 ID Code
|
|
663 M$Size: RMB 2 Module Size
|
|
664 M$Name: RMB 2 Module Name
|
|
665 M$Type: RMB 1 Type / Language
|
|
666 M$Revs: RMB 1 Attributes / Revision Level
|
|
667 M$Parity: RMB 1 Header Parity
|
|
668 M$IDSize: EQU * Module ID Size
|
|
669 *
|
|
670 * Type-Dependent Module Offsets
|
|
671 *
|
|
672 * System, File Manager, Device Driver, Program Module
|
|
673 *
|
|
674 M$Exec: RMB 2 Execution Entry Offset
|
|
675 *
|
|
676 * Device Driver, Program Module
|
|
677 *
|
|
678 M$Mem: RMB 2 Stack Requirement
|
|
679 *
|
|
680 * Device Driver, Device Descriptor Module
|
|
681 *
|
|
682 M$Mode: RMB 1 Device Driver Mode Capabilities
|
|
683 *
|
|
684 * Device Descriptor Module
|
|
685 *
|
|
686
|
|
687 RMB M$IDSize-*
|
|
688 M$FMgr: RMB 2 File Manager Name Offset
|
|
689 M$PDev: RMB 2 Device Driver Name Offset
|
|
690 RMB 1 M$Mode (defined above)
|
|
691 M$Port: RMB 3 Port Address
|
|
692 M$Opt: RMB 1 Device Default Options
|
|
693 M$DTyp: RMB 1 Device Type
|
|
694 IT.DTP: EQU M$DTyp Descriptor type offset
|
|
695
|
|
696 *
|
|
697 * Configuration Module Entry Offsets
|
|
698 *
|
|
699 RMB M$IDSize-*
|
|
700 MaxMem: RMB 3 Maximum Free Memory
|
|
701 PollCnt: RMB 1 Entries in Interrupt Polling Table
|
|
702 DevCnt: RMB 1 Entries in Device Table
|
|
703 InitStr: RMB 2 Initial Module Name
|
|
704 SysStr: RMB 2 System Device Name
|
|
705 StdStr: RMB 2 Standard I/O Pathlist
|
|
706 BootStr: RMB 2 Bootstrap Module name
|
|
707 ProtFlag: RMB 1 Write protect enable flag
|
|
708
|
|
709 OSLevel: RMB 1 OS level
|
|
710 OSVer: RMB 1 OS version
|
|
711 OSMajor: RMB 1 OS major
|
|
712 OSMinor: RMB 1 OS minor
|
|
713 Feature1: RMB 1 feature byte 1
|
|
714 Feature2: RMB 1 feature byte 2
|
|
715 OSName: RMB 2 OS revision name string (nul terminated)
|
|
716 InstallName: RMB 2 installation name string (nul terminated)
|
|
717 RMB 4 reserved for future use
|
|
718
|
|
719 IFGT Level-1
|
|
720 * -- VTIO area -- (NitrOS-9 Level 2 and above) *
|
|
721 MonType: RMB 1 Monitor type (0=CMP,1=RGB,2=MONO)
|
|
722 MouseInf: RMB 2 Mouse resolution/Mouse port; was 1, major error RG.
|
|
723 KeyRptS: RMB 1 Key repeat start constant
|
|
724 KeyRptD: RMB 1 Key repeat delay constant
|
|
725 ENDC
|
|
726 endsect
|
|
727
|
|
728 * Feature1 byte definitions
|
|
729 CRCOn: EQU %00000001 CRC checking on
|
|
730 CRCOff: EQU %00000000 CRC checking off
|
|
731 Proc6809: EQU %00000000 6809 procesor
|
|
732 Proc6309: EQU %00000010 6309 procesor
|
|
733
|
|
734 PAG
|
|
735 **************************
|
|
736 * Module Field Definitions
|
|
737 *
|
|
738 * ID Field - First two bytes of a NitrOS-9 module
|
|
739 *
|
|
740 M$ID1: EQU $87 Module ID code byte one
|
|
741 M$ID2: EQU $CD Module ID code byte two
|
|
742 M$ID12: EQU M$ID1*256+M$ID2
|
|
743
|
|
744 *
|
|
745 * Module Type/Language Field Masks
|
|
746 *
|
|
747 TypeMask: EQU %11110000 Type Field
|
|
748 LangMask: EQU %00001111 Language Field
|
|
749
|
|
750 *
|
|
751 * Module Type Values
|
|
752 *
|
|
753 Devic: EQU $F0 Device Descriptor Module
|
|
754 Drivr: EQU $E0 Physical Device Driver
|
|
755 FlMgr: EQU $D0 File Manager
|
|
756 Systm: EQU $C0 System Module
|
|
757 ShellSub: EQU $50 Shell+ shell sub module
|
|
758 Data: EQU $40 Data Module
|
|
759 Multi: EQU $30 Multi-Module
|
|
760 Sbrtn: EQU $20 Subroutine Module
|
|
761 Prgrm: EQU $10 Program Module
|
|
762
|
|
763 *
|
|
764 * Module Language Values
|
|
765 *
|
|
766 Objct: EQU 1 6809 Object Code Module
|
|
767 ICode: EQU 2 Basic09 I-code
|
|
768 PCode: EQU 3 Pascal P-code
|
|
769 CCode: EQU 4 C I-code
|
|
770 CblCode: EQU 5 Cobol I-code
|
|
771 FrtnCode: EQU 6 Fortran I-code
|
|
772 Obj6309: EQU 7 6309 object code
|
|
773 *
|
|
774 * Module Attributes / Revision byte
|
|
775 *
|
|
776 * Field Masks
|
|
777 *
|
|
778 AttrMask: EQU %11110000 Attributes Field
|
|
779 RevsMask: EQU %00001111 Revision Level Field
|
|
780 *
|
|
781 * Attribute Flags
|
|
782 *
|
|
783 ReEnt: EQU %10000000 Re-Entrant Module
|
|
784 ModProt: EQU %01000000 Gimix Module protect bit (0=protected, 1=write enable)
|
|
785 ModNat: EQU %00100000 6309 native mode attribute
|
|
786
|
|
787 ********************
|
|
788 * Device Type Values
|
|
789 *
|
|
790 * These values define various classes of devices, which are
|
|
791 * managed by a file manager module. The Device Type is embedded
|
|
792 * in a device's device descriptor.
|
|
793 *
|
|
794 DT.SCF: EQU 0 Sequential Character File Manager
|
|
795 DT.RBF: EQU 1 Random Block File Manager
|
|
796 DT.Pipe: EQU 2 Pipe File Manager
|
|
797 DT.SBF: EQU 3 Sequential Block File Manager
|
|
798 DT.NFM: EQU 4 Network File Manager
|
|
799 DT.CDFM: EQU 5 CD-ROM File Manager
|
|
800
|
|
801
|
|
802 *********************
|
|
803 * CRC Result Constant
|
|
804 *
|
|
805 CRCCon1: EQU $80
|
|
806 CRCCon23: EQU $0FE3
|
|
807
|
|
808 TTL Process Information
|
|
809 PAG
|
|
810 ********************************
|
|
811 * Process Descriptor Definitions
|
|
812 *
|
|
813 IFEQ Level-1
|
|
814
|
|
815 * Level 1 process descriptor defs
|
|
816 DefIOSiz: EQU 12
|
|
817 NumPaths: EQU 16 Number of Local Paths
|
|
818
|
|
819 csect
|
|
820 P$ID: RMB 1 Process ID
|
|
821 P$PID: RMB 1 Parent's ID
|
|
822 P$SID: RMB 1 Sibling's ID
|
|
823 P$CID: RMB 1 Child's ID
|
|
824 P$SP: RMB 2 Stack ptr
|
|
825 P$CHAP: RMB 1 process chapter number
|
|
826 P$ADDR: RMB 1 user address beginning page number
|
|
827 P$PagCnt: RMB 1 Memory Page Count
|
|
828 P$User: RMB 2 User Index $09
|
|
829 P$Prior: RMB 1 Priority $0B
|
|
830 P$Age: RMB 1 Age $0C
|
2331
|
831 P$State: RMB 1
|
2328
|
832 P$Queue: RMB 2 Queue Link (Process ptr) $0E
|
|
833 P$IOQP: RMB 1 Previous I/O Queue Link (Process ID) $10
|
|
834 P$IOQN: RMB 1 Next I/O Queue Link (Process ID)
|
|
835 P$PModul: RMB 2 Primary Module
|
|
836 P$SWI: RMB 2 SWI Entry Point
|
|
837 P$SWI2: RMB 2 SWI2 Entry Point
|
|
838 P$SWI3: RMB 2 SWI3 Entry Point $18
|
|
839 P$DIO: RMB DefIOSiz default I/O ptrs $1A
|
|
840 P$PATH: RMB NumPaths I/O path table $26
|
|
841 P$Signal: RMB 1 Signal Code $36
|
|
842 P$SigVec: RMB 2 Signal Intercept Vector
|
|
843 P$SigDat: RMB 2 Signal Intercept Data Address
|
|
844 P$NIO: RMB 4 additional dio pointers for net
|
|
845 RMB $40-* unused
|
|
846 P$Size: EQU * Size of Process Descriptor
|
|
847 endsect
|
|
848
|
|
849 *
|
|
850 * Process State Flags
|
|
851 *
|
|
852 SysState: EQU %10000000
|
|
853 TimSleep: EQU %01000000
|
|
854 TimOut: EQU %00100000
|
|
855 ImgChg: EQU %00010000
|
|
856 Condem: EQU %00000010
|
|
857 Dead: EQU %00000001
|
|
858
|
|
859 ELSE
|
|
860
|
|
861 * Level 2 process descriptor defs
|
|
862 DefIOSiz: EQU 16 Default I/O Data Length
|
|
863 NefIOSiz: EQU 12 On-Net Default I/O Data Length
|
|
864 NumPaths: EQU 16 Number of Local Paths
|
|
865
|
|
866 csect
|
|
867 P$ID: RMB 1 Process ID
|
|
868 P$PID: RMB 1 Parent's ID
|
|
869 P$SID: RMB 1 Sibling's ID
|
|
870 P$CID: RMB 1 Child's ID
|
|
871 P$SP: RMB 2 Stack ptr
|
|
872 P$Task: RMB 1 Task Number
|
|
873 P$PagCnt: RMB 1 Memory Page Count
|
|
874 P$User: RMB 2 User Index
|
|
875 P$Prior: RMB 1 Priority
|
|
876 P$Age: RMB 1 Age
|
|
877 P$State: RMB 1 Status
|
|
878 P$Queue: RMB 2 Queue Link (Process ptr)
|
|
879 P$IOQP: RMB 1 Previous I/O Queue Link (Process ID)
|
|
880 P$IOQN: RMB 1 Next I/O Queue Link (Process ID)
|
|
881 P$PModul: RMB 2 Primary Module
|
|
882 P$SWI: RMB 2 SWI Entry Point
|
|
883 P$SWI2: RMB 2 SWI2 Entry Point
|
|
884 P$SWI3: RMB 2 SWI3 Entry Point
|
|
885 P$Signal: RMB 1 Signal Code
|
|
886 P$SigVec: RMB 2 Signal Intercept Vector
|
|
887 P$SigDat: RMB 2 Signal Intercept Data Address
|
|
888 P$DeadLk: RMB 1 Dominant proc ID if I/O locked
|
|
889 RMB $20-* unused
|
|
890 P$DIO: RMB DefIOSiz Default I/O ptrs
|
|
891 P$Path: RMB NumPaths I/O Path Table
|
|
892 P$DATImg: RMB 64 DAT Image
|
|
893 P$Links: RMB 32 Block Link counts
|
|
894 P$NIO: RMB 6*2 additional DIO ptrs for net, compatible with 68k
|
|
895 P$SelP: RMB 1 Selected Path for COCO Windows (Default 0)
|
|
896 P$UTicks: RMB 4 proc User Tick counter (L2V3)
|
|
897 P$STicks: RMB 4 proc System Tick counter (L2V3)
|
|
898 P$FCalls: RMB 4 proc F$ call counter (L2V3)
|
|
899 P$ICalls: RMB 4 proc I$ call counter (L2V3)
|
|
900 P$DatBeg: RMB 3 proc Date of creation (Y/M/D) (L2V3)
|
|
901 P$TimBeg: RMB 3 proc Time of creation (H/M/S) (L2V3)
|
|
902 P$Alarm: RMB 6
|
|
903 RMB $200-* Local stack
|
|
904 P$Stack: EQU * Top of Stack
|
|
905 P$Size: EQU * Size of Process Descriptor
|
|
906 endsect
|
|
907
|
|
908 *
|
|
909 * Process State Flags
|
|
910 *
|
|
911 SysState: EQU %10000000
|
|
912 TimSleep: EQU %01000000
|
|
913 TimOut: EQU %00100000
|
|
914 ImgChg: EQU %00010000
|
|
915 Suspend: EQU %00001000
|
|
916 Condem: EQU %00000010
|
|
917 Dead: EQU %00000001
|
|
918
|
|
919 ENDC
|
|
920
|
|
921 TTL NitrOS-9 I/O Symbolic Definitions
|
|
922 PAG
|
|
923 *************************
|
|
924 * Path Descriptor Offsets
|
|
925 *
|
|
926 csect
|
|
927 PD.PD: RMB 1 Path Number
|
|
928 PD.MOD: RMB 1 Mode (Read/Write/Update)
|
|
929 PD.CNT: RMB 1 Number of Open Images
|
|
930 PD.DEV: RMB 2 Device Table Entry Address
|
|
931 PD.CPR: RMB 1 Current Process
|
|
932 PD.RGS: RMB 2 Caller's Register Stack
|
|
933 PD.BUF: RMB 2 Buffer Address
|
|
934 PD.FST: RMB 32-* File Manager's Storage
|
|
935 PD.OPT: EQU * PD GetSts(0) Options
|
|
936 PD.DTP: RMB 1 Device Type
|
|
937 RMB 64-* Path options
|
|
938 PDSIZE: EQU *
|
|
939 endsect
|
|
940
|
|
941 *
|
|
942 * Pathlist Special Symbols
|
|
943 *
|
|
944 PDELIM: EQU '/ Pathlist Name Separator
|
|
945 PDIR: EQU '. Directory
|
|
946 PENTIR: EQU '@ Entire Device
|
|
947
|
|
948 PAG
|
|
949 ****************************
|
|
950 * File Manager Entry Offsets
|
|
951 *
|
|
952 csect
|
|
953 FMCREA: RMB 3 Create (Open New) File
|
|
954 FMOPEN: RMB 3 Open File
|
|
955 FMMDIR: RMB 3 Make Directory
|
|
956 FMCDIR: RMB 3 Change Directory
|
|
957 FMDLET: RMB 3 Delete File
|
|
958 FMSEEK: RMB 3 Position File
|
|
959 FMREAD: RMB 3 Read from File
|
|
960 FMWRIT: RMB 3 Write to File
|
|
961 FMRDLN: RMB 3 ReadLn
|
|
962 FMWRLN: RMB 3 WritLn
|
|
963 FMGSTA: RMB 3 Get File Status
|
|
964 FMSSTA: RMB 3 Set File Status
|
|
965 FMCLOS: RMB 3 Close File
|
|
966 endsect
|
|
967
|
|
968 *****************************
|
|
969 * Device Driver Entry Offsets
|
|
970 *
|
|
971 csect
|
|
972 D$INIT: RMB 3 Device Initialization
|
|
973 D$READ: RMB 3 Read from Device
|
|
974 D$WRIT: RMB 3 Write to Device
|
|
975 D$GSTA: RMB 3 Get Device Status
|
|
976 D$PSTA: RMB 3 Put Device Status
|
|
977 D$TERM: RMB 3 Device Termination
|
|
978 endsect
|
|
979
|
|
980 *********************
|
|
981 * Device Table Format
|
|
982 *
|
|
983 csect
|
|
984 V$DRIV: RMB 2 Device Driver module
|
|
985 V$STAT: RMB 2 Device Driver Static storage
|
|
986 V$DESC: RMB 2 Device Descriptor module
|
|
987 V$FMGR: RMB 2 File Manager module
|
|
988 V$USRS: RMB 1 use count
|
|
989 IFGT Level-1
|
|
990 V$DRIVEX: RMB 2 Device Driver execution address
|
|
991 V$FMGREX: RMB 2 File Manager execution address
|
|
992 ENDC
|
|
993 DEVSIZ: EQU *
|
|
994 endsect
|
|
995
|
|
996 *******************************
|
|
997 * Device Static Storage Offsets
|
|
998 *
|
|
999 csect
|
|
1000 V.PAGE: RMB 1 Port Extended Address
|
|
1001 V.PORT: RMB 2 Device 'Base' Port Address
|
|
1002 V.LPRC: RMB 1 Last Active Process ID
|
|
1003 V.BUSY: RMB 1 Active Process ID (0=UnBusy)
|
|
1004 V.WAKE: RMB 1 Active PD if Driver MUST Wake-up
|
|
1005 V.USER EQU * Driver Allocation Origin
|
|
1006 endsect
|
|
1007
|
|
1008 ********************************
|
|
1009 * Interrupt Polling Table Format
|
|
1010 *
|
|
1011 csect
|
|
1012 Q$POLL: RMB 2 Absolute Polling Address
|
|
1013 Q$FLIP: RMB 1 Flip (EOR) Byte ..normally Zero
|
|
1014 Q$MASK: RMB 1 Polling Mask (after Flip)
|
|
1015 Q$SERV: RMB 2 Absolute Service routine Address
|
|
1016 Q$STAT: RMB 2 Static Storage Address
|
|
1017 Q$PRTY: RMB 1 Priority (Low Numbers=Top Priority)
|
|
1018 IFGT Level-1
|
|
1019 Q$MAP: RMB 2 NitrOS-9 Level 2 and above
|
|
1020 ENDC
|
|
1021 POLSIZ: EQU *
|
|
1022 endsect
|
|
1023
|
|
1024 ********************
|
|
1025 * VIRQ packet format
|
|
1026 *
|
|
1027 csect
|
|
1028 Vi.Cnt: RMB 2 count down counter
|
|
1029 Vi.Rst: RMB 2 reset value for counter
|
|
1030 Vi.Stat: RMB 1 status byte
|
|
1031 endsect
|
|
1032
|
|
1033 Vi.IFlag: EQU %00000001 status byte virq flag
|
|
1034
|
|
1035 PAG
|
|
1036 *************************************
|
|
1037 * Machine Characteristics Definitions
|
|
1038 *
|
|
1039 R$CC: EQU 0 Condition Codes register
|
|
1040 R$A: EQU 1 A Accumulator
|
|
1041 R$B: EQU 2 B Accumulator
|
|
1042 R$D: EQU R$A Combined A:B Accumulator
|
|
1043 IFNE H6309
|
|
1044 R$E: EQU 3 E Accumulator
|
|
1045 R$F: EQU 4 F Accumulator
|
|
1046 R$W: EQU R$E Combined E:F Accumulator
|
|
1047 R$Q: EQU R$A Combined A:B:E:F Accumulator
|
|
1048 R$DP: EQU 5 Direct Page register
|
|
1049 R$X: EQU 6 X Index register
|
|
1050 R$Y: EQU 8 Y Index register
|
|
1051 R$U: EQU 10 User Stack register
|
|
1052 R$PC: EQU 12 Program Counter register
|
|
1053 R$Size: EQU 14 Total register package size
|
|
1054 ELSE
|
|
1055 R$DP: EQU 3 Direct Page register
|
|
1056 R$X: EQU 4 X Index register
|
|
1057 R$Y: EQU 6 Y Index register
|
|
1058 R$U: EQU 8 User Stack register
|
|
1059 R$PC: EQU 10 Program Counter register
|
|
1060 R$Size: EQU 12 Total register package size
|
|
1061 ENDC
|
|
1062
|
|
1063 * MD register masks
|
|
1064 * 6309 definitions
|
|
1065 DIV0: EQU %10000000 division by 0 trap flag : 1 = trap occured
|
|
1066 badinstr: EQU %01000000 illegal instruction trap flag : 1 = trap occured
|
|
1067
|
|
1068 Entire: EQU %10000000 Full Register Stack flag
|
|
1069 FIRQMask: EQU %01000000 Fast-Interrupt Mask bit
|
|
1070 HalfCrry: EQU %00100000 Half Carry flag
|
|
1071 IRQMask: EQU %00010000 Interrupt Mask bit
|
|
1072 Negative: EQU %00001000 Negative flag
|
|
1073 Zero: EQU %00000100 Zero flag
|
|
1074 TwosOvfl: EQU %00000010 Two's Comp Overflow flag
|
|
1075 Carry: EQU %00000001 Carry bit
|
|
1076 IntMasks: EQU IRQMask+FIRQMask
|
|
1077 Sign: EQU %10000000 sign bit
|
|
1078
|
|
1079 TTL Error Code Definitions
|
|
1080 PAG
|
|
1081 ************************
|
|
1082 * Error Code Definitions
|
|
1083 *
|
|
1084 * Basic09 Error Codes
|
|
1085 *
|
|
1086 csect
|
|
1087 E$UnkSym: RMB 1 Unknown symbol
|
|
1088 E$ExcVrb: RMB 1 Excessive verbage
|
|
1089 E$IllStC: RMB 1 Illegal statement construction
|
|
1090 E$ICOvf: RMB 1 I-code overflow
|
|
1091 E$IChRef: RMB 1 Illegal channel reference
|
|
1092 E$IllMod: RMB 1 Illegal mode
|
|
1093 E$IllNum: RMB 1 Illegal number
|
|
1094 E$IllPrf: RMB 1 Illegal prefix
|
|
1095 E$IllOpd: RMB 1 Illegal operand
|
|
1096 E$IllOpr: RMB 1 Illegal operator
|
|
1097 E$IllRFN: RMB 1 Illegal record field name
|
|
1098 E$IllDim: RMB 1 Illegal dimension
|
|
1099 E$IllLit: RMB 1 Illegal literal
|
|
1100 E$IllRet: RMB 1 Illegal relational
|
|
1101 E$IllSfx: RMB 1 Illegal type suffix
|
|
1102 E$DimLrg: RMB 1 Dimension too large
|
|
1103 E$LinLrg: RMB 1 Line number too large
|
|
1104 E$NoAssg: RMB 1 Missing assignment statement
|
|
1105 E$NoPath: RMB 1 Missing path number
|
|
1106 E$NoComa: RMB 1 Missing coma
|
|
1107 E$NoDim: RMB 1 Missing dimension
|
|
1108 E$NoDO: RMB 1 Missing DO statement
|
|
1109 E$MFull: RMB 1 Memory full
|
|
1110 E$NoGoto: RMB 1 Missing GOTO
|
|
1111 E$NoLPar: RMB 1 Missing left parenthesis
|
|
1112 E$NoLRef: RMB 1 Missing line reference
|
|
1113 E$NoOprd: RMB 1 Missing operand
|
|
1114 E$NoRPar: RMB 1 Missing right parenthesis
|
|
1115 E$NoTHEN: RMB 1 Missing THEN statement
|
|
1116 E$NoTO: RMB 1 Missing TO statement
|
|
1117 E$NoVRef: RMB 1 Missing variable reference
|
|
1118 E$EndQou: RMB 1 Missing end quote
|
|
1119 E$SubLrg: RMB 1 Too many subscripts
|
|
1120 E$UnkPrc: RMB 1 Unknown procedure
|
|
1121 E$MulPrc: RMB 1 Multiply defined procedure
|
|
1122 E$DivZer: RMB 1 Divice by zero
|
|
1123 E$TypMis: RMB 1 Operand type mismatch
|
|
1124 E$StrOvf: RMB 1 String stack overflow
|
|
1125 E$NoRout: RMB 1 Unimplemented routine
|
|
1126 E$UndVar: RMB 1 Undefined variable
|
|
1127 E$FltOvf: RMB 1 Floating Overflow
|
|
1128 E$LnComp: RMB 1 Line with compiler error
|
|
1129 E$ValRng: RMB 1 Value out of range for destination
|
|
1130 E$SubOvf: RMB 1 Subroutine stack overflow
|
|
1131 E$SubUnd: RMB 1 Subroutine stack underflow
|
|
1132 E$SubRng: RMB 1 Subscript out of range
|
|
1133 E$ParmEr: RMB 1 Paraemter error
|
|
1134 E$SysOvf: RMB 1 System stack overflow
|
|
1135 E$IOMism: RMB 1 I/O type mismatch
|
|
1136 E$IONum: RMB 1 I/O numeric input format bad
|
|
1137 E$IOConv: RMB 1 I/O conversion: number out of range
|
|
1138 E$IllInp: RMB 1 Illegal input format
|
|
1139 E$IOFRpt: RMB 1 I/O format repeat error
|
|
1140 E$IOFSyn: RMB 1 I/O format syntax error
|
|
1141 E$IllPNm: RMB 1 Illegal path number
|
|
1142 E$WrSub: RMB 1 Wrong number of subscripts
|
|
1143 E$NonRcO: RMB 1 Non-record type operand
|
|
1144 E$IllA: RMB 1 Illegal argument
|
|
1145 E$IllCnt: RMB 1 Illegal control structure
|
|
1146 E$UnmCnt: RMB 1 Unmatched control structure
|
|
1147 E$IllFOR: RMB 1 Illegal FOR variable
|
|
1148 E$IllExp: RMB 1 Illegal expression type
|
|
1149 E$IllDec: RMB 1 Illegal declarative statement
|
|
1150 E$ArrOvf: RMB 1 Array size overflow
|
|
1151 E$UndLin: RMB 1 Undefined line number
|
|
1152 E$MltLin: RMB 1 Multiply defined line number
|
|
1153 E$MltVar: RMB 1 Multiply defined variable
|
|
1154 E$IllIVr: RMB 1 Illegal input variable
|
|
1155 E$SeekRg: RMB 1 Seek out of range
|
|
1156 E$NoData: RMB 1 Missing data statement
|
|
1157
|
|
1158 *
|
|
1159 * System Dependent Error Codes
|
|
1160 *
|
|
1161
|
|
1162 * Level 2 windowing error codes
|
|
1163 RMB 183-*
|
|
1164 E$IWTyp: RMB 1 Illegal window type
|
|
1165 E$WADef: RMB 1 Window already defined
|
|
1166 E$NFont: RMB 1 Font not found
|
|
1167 E$StkOvf: RMB 1 Stack overflow
|
|
1168 E$IllArg: RMB 1 Illegal argument
|
|
1169 RMB 1 reserved
|
|
1170 E$ICoord: RMB 1 Illegal coordinates
|
|
1171 E$Bug: RMB 1 Bug (should never be returned)
|
|
1172 E$BufSiz: RMB 1 Buffer size is too small
|
|
1173 E$IllCmd: RMB 1 Illegal command
|
|
1174 E$TblFul: RMB 1 Screen or window table is full
|
|
1175 E$BadBuf: RMB 1 Bad/Undefined buffer number
|
|
1176 E$IWDef: RMB 1 Illegal window definition
|
|
1177 E$WUndef: RMB 1 Window undefined
|
|
1178
|
|
1179 E$Up: RMB 1 Up arrow pressed on SCF I$ReadLn with PD.UP enabled
|
|
1180 E$Dn: RMB 1 Down arrow pressed on SCF I$ReadLn with PD.DOWN enabled
|
|
1181 E$Alias: RMB 1
|
|
1182
|
|
1183
|
|
1184 *
|
|
1185 * Standard NitrOS-9 Error Codes
|
|
1186 *
|
|
1187 RMB 200-*
|
|
1188 E$PthFul: RMB 1 Path Table full
|
|
1189 E$BPNum: RMB 1 Bad Path Number
|
|
1190 E$Poll: RMB 1 Polling Table Full
|
|
1191 E$BMode: RMB 1 Bad Mode
|
|
1192 E$DevOvf: RMB 1 Device Table Overflow
|
|
1193 E$BMID: RMB 1 Bad Module ID
|
|
1194 E$DirFul: RMB 1 Module Directory Full
|
|
1195 E$MemFul: RMB 1 Process Memory Full
|
|
1196 E$UnkSvc: RMB 1 Unknown Service Code
|
|
1197 E$ModBsy: RMB 1 Module Busy
|
|
1198 E$BPAddr: RMB 1 Bad Page Address
|
|
1199 E$EOF: RMB 1 End of File
|
|
1200 RMB 1
|
|
1201 E$NES: RMB 1 Non-Existing Segment
|
|
1202 E$FNA: RMB 1 File Not Accesible
|
|
1203 E$BPNam: RMB 1 Bad Path Name
|
|
1204 E$PNNF: RMB 1 Path Name Not Found
|
|
1205 E$SLF: RMB 1 Segment List Full
|
|
1206 E$CEF: RMB 1 Creating Existing File
|
|
1207 E$IBA: RMB 1 Illegal Block Address
|
|
1208 E$HangUp: RMB 1 Carrier Detect Lost
|
|
1209 E$MNF: RMB 1 Module Not Found
|
|
1210 RMB 1
|
|
1211 E$DelSP: RMB 1 Deleting Stack Pointer memory
|
|
1212 E$IPrcID: RMB 1 Illegal Process ID
|
|
1213 E$BPrcID: EQU E$IPrcID Bad Process ID (formerly #238)
|
|
1214 RMB 1
|
|
1215 E$NoChld: RMB 1 No Children
|
|
1216 E$ISWI: RMB 1 Illegal SWI code
|
|
1217 E$PrcAbt: RMB 1 Process Aborted
|
|
1218 E$PrcFul: RMB 1 Process Table Full
|
|
1219 E$IForkP: RMB 1 Illegal Fork Parameter
|
|
1220 E$KwnMod: RMB 1 Known Module
|
|
1221 E$BMCRC: RMB 1 Bad Module CRC
|
|
1222 E$USigP: RMB 1 Unprocessed Signal Pending
|
|
1223 E$NEMod: RMB 1 Non Existing Module
|
|
1224 E$BNam: RMB 1 Bad Name
|
|
1225 E$BMHP: RMB 1 (bad module header parity)
|
|
1226 E$NoRAM: RMB 1 No (System) RAM Available
|
|
1227 E$DNE: RMB 1 Directory not empty
|
|
1228 E$NoTask: RMB 1 No available Task number
|
|
1229 RMB $F0-* reserved
|
|
1230 E$Unit: RMB 1 Illegal Unit (drive)
|
|
1231 E$Sect: RMB 1 Bad Sector number
|
|
1232 E$WP: RMB 1 Write Protect
|
|
1233 E$CRC: RMB 1 Bad Check Sum
|
|
1234 E$Read: RMB 1 Read Error
|
|
1235 E$Write: RMB 1 Write Error
|
|
1236 E$NotRd: RMB 1 Device Not Ready
|
|
1237 E$Seek: RMB 1 Seek Error
|
|
1238 E$Full: RMB 1 Media Full
|
|
1239 E$BTyp: RMB 1 Bad Type (incompatable) media
|
|
1240 E$DevBsy: RMB 1 Device Busy
|
|
1241 E$DIDC: RMB 1 Disk ID Change
|
|
1242 E$Lock: RMB 1 Record is busy (locked out)
|
|
1243 E$Share: RMB 1 Non-sharable file busy
|
|
1244 E$DeadLk: RMB 1 I/O Deadlock error
|
|
1245 endsect
|
|
1246
|
|
1247
|
|
1248 IFEQ Level-1
|
|
1249
|
|
1250 ********************************
|
|
1251 * Boot defs for NitrOS-9 Level 1
|
|
1252 *
|
|
1253 * These defs are not strictly for 'Boot', but are for booting the
|
|
1254 * system.
|
|
1255 *
|
|
1256 Bt.Start: EQU $EE00 Start address of the boot track in memory
|
|
1257
|
|
1258 * Boot area size on Dragon is only 16 sectors=4K
|
|
1259 IFNE DRAGON
|
|
1260 Bt.Size: EQU $1000 Max size of boot file
|
|
1261 ELSE
|
|
1262 Bt.Size: EQU $1080 Maximum size of bootfile
|
|
1263 ENDC
|
|
1264
|
|
1265 ELSE
|
|
1266
|
|
1267 ******************************************
|
|
1268 * Boot defs for NitrOS-9 Level 2 and above
|
|
1269 *
|
|
1270 * These defs are not strictly for 'Boot', but are for booting the
|
|
1271 * system.
|
|
1272 *
|
|
1273 Bt.Block: EQU $3B Block to map in for the 'OS9BOOT' screen
|
|
1274 Bt.Flag: EQU $8A34 Flag in Bt.Block to verify that it's unchanged
|
|
1275 Bt.Offst: EQU 2 Offset into the screen where the current ptr is
|
|
1276 Bt.Start: EQU $ED00 Start address of the boot track in memory
|
|
1277
|
|
1278 ENDC
|
|
1279
|
|
1280 * Boot area on the Dragon starts on track 0 sector 2, imediatly
|
|
1281 * after the blockmap.
|
|
1282 * On the CoCo, the boot track is all of track 34
|
|
1283
|
|
1284 IFNE DRAGON
|
|
1285 Bt.Track: EQU 0 Boot track
|
|
1286 Bt.Sec: EQU 2 Start LSN of boot area on boot track
|
|
1287 ELSE
|
|
1288 Bt.Track: EQU 34 Boot track
|
|
1289 Bt.Sec: EQU 0 Start LSN of boot area on boot track
|
|
1290 ENDC
|
|
1291
|
|
1292
|
|
1293 IFGT Level-2
|
|
1294 ***************************
|
|
1295 * Level 3 Defs
|
|
1296 *
|
|
1297 * These definitions apply to NitrOS-9 Level 3
|
|
1298 *
|
|
1299 L3.Start: EQU $2000 Start off at slot 1
|
|
1300 L3.Size: EQU $40 Go for 64 pages: 2 slots total
|
|
1301 L3.Blks: EQU L3.Size/$20 Number of slots
|
|
1302 L3.End: EQU L3.Start+L3.Size*$0100 end of L3 memory
|
|
1303 L3.SCF: EQU $0660 SCF block ptr
|
|
1304 L3.RBF: EQU L3.SCF+1 RBF block ptr
|
|
1305 ENDC
|
|
1306
|
|
1307 ENDC
|