Mercurial > hg > Members > kono > nitros9-code
changeset 60:4b3470f2a2d7
Merged NitrOS-9 defs into os9defs, removed os9defs.n09
author | boisy |
---|---|
date | Wed, 01 May 2002 01:49:29 +0000 |
parents | 0bd24a891e71 |
children | f01eb0d6c456 |
files | defs/os9defs defs/os9defs.n09 |
diffstat | 2 files changed, 142 insertions(+), 798 deletions(-) [+] |
line wrap: on
line diff
--- a/defs/os9defs Sat Apr 20 19:40:57 2002 +0000 +++ b/defs/os9defs Wed May 01 01:49:29 2002 +0000 @@ -1,5 +1,5 @@ nam OS9Defs - ttl OS-9 Level 1 & 2 System Symbol Definitions + ttl OS-9 Level 1 & 2 and NitrOS-9 System Symbol Definitions ***************** * Edition History @@ -18,6 +18,14 @@ * 86/09/30 Created Color Computer 3 Version of OS9Defs MGH * 98/10/03 Consoldated Level 1/Level 2 os9defs BGP * 02/04/04 Consoldated Level 2/Level 2 V3 os9defs BGP +* 02/04/30 Added NitrOS-9 definitions BGP + +true equ 1 useful name +false equ 0 useful name + + ifne NitrOS9 +H6309 set true + endc pag ***************************************** @@ -56,9 +64,7 @@ F$UnLoad rmb 1 Unlink Module by name ifeq Level-1 - rmb 3 - else * Level 2 system calls @@ -119,20 +125,31 @@ F$DelRAM rmb 1 Deallocate RAM blocks F$GCMDir rmb 1 Pack module directory F$AlHRam rmb 1 Allocate HIGH RAM Blocks + + ifne NitrOS9 +* NitrOS9 additions +* F$ReBoot is unimplemented at this time +F$ReBoot rmb 1 Reboot machine (reload OS9Boot) or drop to RSDOS +F$CRCMod rmb 1 CRC mode, toggle or report current status +F$XTime rmb 1 Get Extended time packet from RTC (fractions of second) + +* Alan DeKok's NitrOS-9 additions here +F$VBlock rmb 1 Verify modules in a block of memory, add to module directory + endc + * * Numbers $70 through $7F are reserved for user definitions * org $70 ifeq Level-1 - rmb 16 Reserved for user definition - else -F$RegDmp rmb 1 Register dump -F$NVRAM rmb 1 Non Volatile RAM +F$RegDmp rmb 1 Ron Lammardo's debugging register dump +F$NVRAM rmb 1 Non Volatile RAM (RTC battery backed static) read/write + rmb $80-. Reserved for user definitions endc pag @@ -181,7 +198,7 @@ S$Abort rmb 1 Keyboard Abort S$Intrpt rmb 1 Keyboard Interrupt S$Window rmb 1 Window Change -S$Alarm rmb 1 +S$Alarm rmb 1 CoCo individual process' alarm signal pag ********************************** @@ -240,6 +257,17 @@ SS.MpGPB rmb 1 Putstat to request a Get/Put Buffer be mapped in workspace SS.Slots rmb 1 Network 4 slots? getstat +* SDisk 3 Definition Equates +SS.DRead equ SS.AAGBf SDisk3 Direct Sector Read +SS.DWrit equ SS.DRead SDisk3 Direct sector Write +SS.UnFrz equ SS.SLGBf SDisk3 UNFreeze DD info +SS.MOFF equ SS.Mount SDisk3 fast motor off call +SS.MoTim equ SS.RdNet SDisk3 Set motor shut off time +SS.SDRD equ SS.MgGPD SDisk3 System direct read +SS.SDWRT equ SS.SDRD SDisk3 System direct writes +SS.Sleep equ SS.Slots SDisk3 (DMC ONLY) Enable/disable F$Sleep calls in read/write 1773 I/O +SS.DrvCh equ SS.WnSet SDisk3 (DMC ONLY) Set drive number to cache, or return drive number being cached + ifgt Level-1 * Level 2 Windowing @@ -252,7 +280,8 @@ SS.DScrn rmb 1 Display a screen allocated by SS.AScrn SS.FScrn rmb 1 Free a screen allocated by SS.AScrn SS.PScrn rmb 1 Polymorph Screen into different screen type - rmb 2 Reserved +SS.ScInf rmb 1 Get Current screen info for direct writes (new call - NitrOS9) + rmb 1 Reserved SS.Palet rmb 1 Return palette information SS.Montr rmb 1 Get and Set Monitor Type SS.ScTyp rmb 1 Get screen type information @@ -269,6 +298,30 @@ SS.CDSig equ SS.AnPal XACIA SS.CDRel equ SS.FndBf XACIA + org $A0 +* +* New Default SCF input buffer Set status call (NitrOS9) +SS.Fill rmb 1 Pre-load SCF device input buffer +SS.Hist rmb 1 Enable command-line history easily + + + org $B0 +* +* New WDDisk get/set status calls +SS.ECC rmb 1 ECC corrected data error enable/disable (GetStat/SetStat) + +* +* VRN get/set status calls. Named by Alan DeKok. +SS.VCtr equ $80 Return FS2 total VIRQ counter +SS.VSig equ $81 Return FS2 number of signals sent + +SS.FClr equ $81 Set/clear FS2 VIRQ +SS.FSet equ $C7 Set FS2+ VIRQ +SS.KSet equ $C8 Set KQ3 VIRQ +SS.KClr equ $C9 Clr KQ3 VIRQ +SS.ARAM equ $CA Allocate RAM blocks +SS.DRAM equ $CB De-allocate RAM blocks + endc ttl Direct Page Definitions @@ -341,8 +394,10 @@ * Level 2 DP vars org $00 -D.WDAddr rmb 2 -D.WDBtDr rmb 1 +D.WDAddr rmb 2 FHL/Isted WD1002-05 interface base address +D.WDBtDr rmb 1 FHL/Isted WD1002-05 boot physical device drive num. + rmb 5 +D.COCOXT rmb 1 Busy flag for CoCo-XT driver (one drive at a time) org $20 D.Tasks rmb 2 Task User Table @@ -366,6 +421,18 @@ D.TkCnt rmb 1 Tick Counter D.BtPtr rmb 2 Address of Boot in System Address space D.BtSz rmb 2 Size of Boot + + ifne NitrOS9 +* NitrOS9 additions +* 58d begins here +D.MDREG rmb 1 6309 MD (mode) shadow register +D.CRC rmb 1 CRC checking mode flag +D.Tenths rmb 1 Tenths and hundredths of second for F$Xtime +D.Task1N rmb 1 Map type 1 task number*2 - offset into [D.TskIPt] +D.Quick rmb 1 Quick system call return flag - 0 =stack is at $FEE1 +D.QIRQ rmb 1 Quick IRQ flag - 0 =IRQ wasn't clock, so quick return + endc + org $40 D.BlkMap rmb 4 Memory Block Map ptr D.ModDir rmb 4 Module Directory ptrs @@ -380,9 +447,19 @@ D.ModEnd rmb 2 Module Directory end ptr D.ModDAT rmb 2 Module Dir DAT image end ptr D.CldRes rmb 2 Cold Restart vector + ifne NitrOS9 +D.BtBug rmb 3 Boot debug information +D.Pipe rmb 2 + endc + org $6B D.Crash rmb 6 Pointer to CC Crash Routine D.CBStrt rmb $B Reserved for CC warmstart ($71) + + ifne NitrOS9 +D.QCnt rmb 1 Count of number of quick system calls performed + endc + org $80 D.DevTbl rmb 2 I/O Device Table D.PolTbl rmb 2 I/O Polling Table @@ -444,7 +521,11 @@ D.XSWI rmb 2 D.XNMI rmb 2 D.ErrRst rmb 2 - org $F2 + ifne NitrOS9 +D.SysVec rmb 2 OS-9 F$xxx system call vector for NitrOS-9 Level 3 + else + rmb 2 + endc D.SWI3 rmb 2 D.SWI2 rmb 2 D.FIRQ rmb 2 @@ -456,6 +537,7 @@ * Level II Block Map flags * NotRAM equ %10000000 Block Not RAM flag +VidRAM equ %00000100 Block is being used as Video RAM ModBlock equ %00000010 Module in Block RAMinUse equ %00000001 RAM Block in use flag * @@ -477,7 +559,7 @@ MD$Link rmb 2 Module Link count MD$ESize equ . Module Directory Entry size -******************** +************************************ * Module Definitions * * Universal Module Offsets @@ -582,6 +664,7 @@ CCode equ 4 C I-code CblCode equ 5 Cobol I-code FrtnCode equ 6 Fortran I-code +Obj6309 equ 7 6309 object code * * Module Attributes / Revision byte * @@ -593,7 +676,8 @@ * Attribute Flags * ReEnt equ %10000000 Re-Entrant Module -Modprot equ %01000000 Gimix Module protect bit (0=protected, 1=write enable) +ModProt equ %01000000 Gimix Module protect bit (0=protected, 1=write enable) +ModNat equ %00100000 6309 native mode attribute ******************** * Device Type Values @@ -755,7 +839,8 @@ PDELIM equ '/ Pathlist Name Separator PDIR equ '. Directory PENTIR equ '@ Entire Device - page + + pag **************************** * File Manager Entry Offsets * @@ -794,6 +879,10 @@ V$DESC rmb 2 Device Descriptor module V$FMGR rmb 2 File Manager module V$USRS rmb 1 use count + ifne NitrOS9 +V$DRIVEX rmb 1 Device Driver execution address +V$FMGREX rmb 1 File Manager execution address + endc DEVSIZ equ . ******************************* @@ -817,6 +906,7 @@ Q$SERV rmb 2 Absolute Service routine Address Q$STAT rmb 2 Static Storage Address Q$PRTY rmb 1 Priority (Low Numbers=Top Priority) +Q$MAP rmb 2 Added by NitrOS-9 POLSIZ equ . ******************** @@ -829,7 +919,7 @@ Vi.IFlag equ %00000001 status byte virq flag - page + pag ************************************* * Machine Characteristics Definitions * @@ -873,9 +963,6 @@ IntMasks equ IRQMask+FIRQMask Sign equ %10000000 sign bit -true equ 1 useful name -false equ 0 useful name - ttl Error Code Definitions pag ************************ @@ -961,6 +1048,13 @@ ifgt Level-1 + ifne NitrOS9 + org 183 +E$IWTyp rmb 1 Illegal window type +E$WADef rmb 1 Window already defined +E$NFont rmb 1 Font not found + endc + * Level 2 windowing error codes org 186 E$StkOvf rmb 1 Stack overflow @@ -975,8 +1069,15 @@ E$IWDef rmb 1 Illegal window definition E$WUndef rmb 1 Window undefined + ifne NitrOS9 +E$Up rmb 1 Up arrow pressed on SCF I$ReadLn with PD.UP enabled +E$Dn rmb 1 Down arrow pressed on SCF I$ReadLn with PD.DOWN enabled +E$Alias rmb 1 endc + endc + + * * Standard OS-9 Error Codes * @@ -1039,3 +1140,25 @@ E$Share rmb 1 Non-sharable file busy E$DeadLk rmb 1 I/O Deadlock error + ifne NitrOS9 +***************************** +* Boot defs for Coco NitrOS-9 +* These defs are not strictly for 'Boot', but are for booting the +* system. +Bt.Block equ $3B Block to map in for the 'OS9BOOT' screen +Bt.Flag equ $8A34 Flag in Bt.Block to verify that it's unchanged +Bt.Offst equ 2 Offset into the screen where the current ptr is +Bt.Start equ $ED00 Start address of the boot track in memory + +*************************** +* Level III Defs +L3.Start equ $2000 Start off at slot 1 +L3.Size equ $40 Go for 64 pages: 2 slots total +L3.Blks equ L3.Size/$20 Number of slots +L3.End equ L3.Start+L3.Size*$0100 end of L3 memory +L3.SCF equ $0660 SCF block ptr +L3.RBF equ L3.SCF+1 RBF block ptr + endc + + end +
--- a/defs/os9defs.n09 Sat Apr 20 19:40:57 2002 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,779 +0,0 @@ - - - nam os9defs - ttl OS-9 System Symbol Definitions - -*** -* System Service Request Code Definitions - org 0 -F$Link rmb 1 Link to Module -F$Load rmb 1 Load Module from File -F$UnLink rmb 1 Unlink Module -F$Fork rmb 1 Start New Process -F$Wait rmb 1 Wait for Child Process to Die -F$Chain rmb 1 Chain Process to New Module -F$Exit rmb 1 Terminate Process -F$Mem rmb 1 Set Memory Size -F$Send rmb 1 Send Signal to Process -F$Icpt rmb 1 Set Signal Intercept -F$Sleep rmb 1 Suspend Process -F$SSpd rmb 1 Suspend Process -F$ID rmb 1 Return Process ID -F$SPrior rmb 1 Set Process Priority -F$SSWI rmb 1 Set Software Interrupt -F$PErr rmb 1 Print Error -F$PrsNam rmb 1 Parse Pathlist Name -F$CmpNam rmb 1 Compare Two Names -F$SchBit rmb 1 Search Bit Map -F$AllBit rmb 1 Allocate in Bit Map -F$DelBit rmb 1 Deallocate in Bit Map -F$Time rmb 1 Get Current Time -F$STime rmb 1 Set Current Time -F$CRC rmb 1 Generate CRC -F$GPrDsc rmb 1 get Process Descriptor copy -F$GBlkMp rmb 1 get System Block Map copy -F$GModDr rmb 1 get Module Directory copy -F$CpyMem rmb 1 Copy External Memory -F$SUser rmb 1 Set User ID number -F$UnLoad rmb 1 Unlink Module by name -F$Alarm rmb 1 Color Computer Alarm Call (system wide) - rmb 2 reserved - For overlap of other systems -F$NMLink rmb 1 Color Computer NonMapping Link -F$NMLoad rmb 1 Color Computer NonMapping Load - - org $25 -F$TPS rmb 1 Return System's Ticks Per Second -F$TimAlm rmb 1 COCO individual process alarm call - - org $27 Beginning of System Reserved Calls -F$VIRQ rmb 1 Install/Delete Virtual IRQ -F$SRqMem rmb 1 System Memory Request -F$SRtMem rmb 1 System Memory Return -F$IRQ rmb 1 Enter IRQ Polling Table -F$IOQu rmb 1 Enter I/O Queue -F$AProc rmb 1 Enter Active Process Queue -F$NProc rmb 1 Start Next Process -F$VModul rmb 1 Validate Module -F$Find64 rmb 1 Find Process/Path Descriptor -F$All64 rmb 1 Allocate Process/Path Descriptor -F$Ret64 rmb 1 Return Process/Path Descriptor -F$SSvc rmb 1 Service Request Table Initialization -F$IODel rmb 1 Delete I/O Module -F$SLink rmb 1 System Link -F$Boot rmb 1 Bootstrap System -F$BtMem rmb 1 Bootstrap Memory Request -F$GProcP rmb 1 Get Process ptr -F$Move rmb 1 Move Data (low bound first) -F$AllRAM rmb 1 Allocate RAM blocks -F$AllImg rmb 1 Allocate Image RAM blocks -F$DelImg rmb 1 Deallocate Image RAM blocks -F$SetImg rmb 1 Set Process DAT Image -F$FreeLB rmb 1 Get Free Low Block -F$FreeHB rmb 1 Get Free High Block -F$AllTsk rmb 1 Allocate Process Task number -F$DelTsk rmb 1 Deallocate Process Task number -F$SetTsk rmb 1 Set Process Task DAT registers -F$ResTsk rmb 1 Reserve Task number -F$RelTsk rmb 1 Release Task number -F$DATLog rmb 1 Convert DAT Block/Offset to Logical -F$DATTmp rmb 1 Make temporary DAT image (Obsolete) -F$LDAXY rmb 1 Load A [X,[Y]] -F$LDAXYP rmb 1 Load A [X+,[Y]] -F$LDDDXY rmb 1 Load D [D+X,[Y]] -F$LDABX rmb 1 Load A from 0,X in task B -F$STABX rmb 1 Store A at 0,X in task B -F$AllPrc rmb 1 Allocate Process Descriptor -F$DelPrc rmb 1 Deallocate Process Descriptor -F$ELink rmb 1 Link using Module Directory Entry -F$FModul rmb 1 Find Module Directory Entry -F$MapBlk rmb 1 Map Specific Block -F$ClrBlk rmb 1 Clear Specific Block -F$DelRAM rmb 1 Deallocate RAM blocks -F$GCMDir rmb 1 Pack module directory -F$AlHRam rmb 1 Allocate HIGH RAM Blocks - - rmb 1 not used - -* NitrOS9 additions -F$CRCMod rmb 1 CRC mode, toggle or report current status - -* -* Numbers $70 through $7F are reserved for user definitions - org $70 -F$RegDmp rmb 1 Ron Lammardo's debugging register dump call -F$NVRAM rmb 1 Non Volatile RAM (RTC battery backed static) read/write - rmb $80-. reserved for user definition - -*** -* I/O Service Request Code Definitions - org $80 -I$Attach rmb 1 Attach I/O Device -I$Detach rmb 1 Detach I/O Device -I$Dup rmb 1 Duplicate Path -I$Create rmb 1 Create New File -I$Open rmb 1 Open Existing File -I$MakDir rmb 1 Make Directory File -I$ChgDir rmb 1 Change Default Directory -I$Delete rmb 1 Delete File -I$Seek rmb 1 Change Current Position -I$Read rmb 1 Read Data -I$Write rmb 1 Write Data -I$ReadLn rmb 1 Read Line of ASCII Data -I$WritLn rmb 1 Write Line of ASCII Data -I$GetStt rmb 1 Get Path Status -I$SetStt rmb 1 Set Path Status -I$Close rmb 1 Close Path -I$DeletX rmb 1 Delete from current exec dir - -*** -* File Access Modes -READ. equ %00000001 -WRITE. equ %00000010 -UPDAT. equ READ.+WRITE. -EXEC. equ %00000100 -PREAD. equ %00001000 -PWRIT. equ %00010000 -PEXEC. equ %00100000 -SHARE. equ %01000000 -DIR. equ %10000000 -ISIZ. equ %00100000 - -*** -* Signal Codes - org 0 -S$Kill rmb 1 Non-Interceptable Abort -S$Wake rmb 1 Wake-up Sleeping Process -S$Abort rmb 1 Keyboard Abort -S$Intrpt rmb 1 Keyboard Interrupt -S$Window rmb 1 Window Change -S$Alarm rmb 1 COCO individual process' alarm signal - -*** -* Status Codes for GetStat/PutStat - org 0 -SS.Opt rmb 1 Read/Write PD Options -SS.Ready rmb 1 Check for Device Ready -SS.Size rmb 1 Read/Write File Size -SS.Reset rmb 1 Device Restore -SS.WTrk rmb 1 Device Write Track -SS.Pos rmb 1 Get File Current Position -SS.EOF rmb 1 Test for End of File -SS.Link rmb 1 Link to Status routines -SS.ULink rmb 1 Unlink Status routines -SS.Feed rmb 1 issue form feed -SS.Frz rmb 1 Freeze DD. information -SS.SPT rmb 1 Set DD.TKS to given value -SS.SQD rmb 1 Sequence down hard disk -SS.DCmd rmb 1 Send direct command to disk (Read / Write Sector) -SS.DevNm rmb 1 Return Device name (32-bytes at [X]) -SS.FD rmb 1 Return File Descriptor (Y-bytes at [X]) -SS.Ticks rmb 1 Set Lockout honor duration -SS.Lock rmb 1 Lock/Release record -SS.DStat rmb 1 Return Display Status (CoCo) -SS.Joy rmb 1 Return Joystick Value (CoCo) -SS.BlkRd rmb 1 Block Read -SS.BlkWr rmb 1 Block Write -SS.Reten rmb 1 Retension cycle -SS.WFM rmb 1 Write File Mark -SS.RFM rmb 1 Read past File Mark -SS.ELog rmb 1 Read Error Log -SS.SSig rmb 1 Send signal on data ready -SS.Relea rmb 1 Release device -SS.AlfaS rmb 1 Return Alfa Display Status (CoCo, SCF/GetStat ) -SS.Attr equ SS.AlfaS to serve 68K/RBF/SetStat only, thru NET -SS.Break rmb 1 Send break signal out acia -SS.RsBit rmb 1 Reserve bitmap sector (do not allocate in) LSB(X)=sct# - rmb 1 reserved -SS.FDInf equ $20 to serve 68K/RBF/GetStat only, thru NET - rmb 4 reserve $20-$23 for Japanese version (Hoshi) -SS.SetMF rmb 1 reserve $24 for Gimix G68 (Flex compatability?) -SS.Cursr rmb 1 Cursor information for COCO -SS.ScSiz rmb 1 Return screen size for COCO -SS.KySns rmb 1 Getstat/Putstat for COCO keyboard -SS.ComSt rmb 1 Getstat/Putstat for Baud/Parity -SS.Open rmb 1 Putstat to tell driver a path was opened -SS.Close rmb 1 Putstat to tell driver a path was closed -SS.HngUp rmb 1 Putstat to tell driver to hangup phone - -* -* System Specific and User defined codes above $80 - org $80 -SS.AAGBf rmb 1 Putstat to Allocate Additional Graphic Buffer -SS.SLGBf rmb 1 Putstat to Select a different Graphic Buffer -SS.Mount rmb 1 Network 4 Mount Setstat -SS.RdNet rmb 1 Read Raw Sector from Network 4 Omnidrive -SS.MpGPB rmb 1 Putstat to request a Get/Put Buffer be mapped in workspace -SS.Slots rmb 1 Network 4 slots? getstat -SS.WnSet rmb 1 Set up High Level Windowing Information - -SS.DRead equ SS.AAGBf ** SDisk3 Direct Sector Read ($80 GetStt) -SS.DWrit equ SS.DRead ** SDisk3 Direct sector Write ($80 SetStt) -SS.UnFrz equ SS.SLGBf ** SDisk3 UNFreeze DD info ($81 SetStt) -SS.MOFF equ SS.Mount ** SDisk3 fast motor off call ($82 SetStt) -SS.MoTim equ SS.RdNet ** SDisk3 Set motor shut off time ($83 SetStt) -SS.SDRD equ SS.MgGPD ** SDisk3 System direct read ($84 GetStt) -SS.SDWRT equ SS.SDRD ** SDisk3 System direct writes ($84 SetStt) -SS.Sleep equ SS.Slots ** SDisk3 (DMC ONLY) ($85 SetStt) Enable/disable F$Sleep calls in read/write 1773 I/O -SS.DrvCh equ SS.WnSet ** SDisk3 (DMC ONLY) ($86 GetStt/SetStt) Set drive number to cache, or return drive number being cached - -SS.MnSel rmb 1 Request High level Menu Handler take determine next event -SS.SBar rmb 1 Putstat to set position block on Window scroll bars -SS.Mouse rmb 1 Return Mouse information packet (COCO) -SS.MsSig rmb 1 Putstat to tell driver to send signal on mouse event -SS.AScrn rmb 1 Allocate a screen for application poking -SS.DScrn rmb 1 Display a screen allocated by SS.AScrn -SS.FScrn rmb 1 Free a screen allocated by SS.AScrn -SS.PScrn rmb 1 Polymorph Screen into different screen Type -SS.ScInf rmb 1 Get Current screen info for direct writes (new call - NitrOS9) - rmb 1 Reserved -SS.Palet rmb 1 Return palette information -SS.Montr rmb 1 Get and Set Monitor Type -SS.ScTyp rmb 1 Get screen type information -SS.GIP rmb 1 Global Input Parameters (SetStat) -SS.UMBar rmb 1 update menu bar (SetStat) -SS.FBRgs rmb 1 return color registers (GetStat) -SS.DfPal rmb 1 set/return default palette registers (GetStat/SetStat) -SS.Tone rmb 1 Generate a tone using 6 bit sound - -* -* new DACIA get/set status calls (per Bill Dickhaus) -SS.CDSta rmb 1 Get current DCD/DSR status byte (GetStat) -SS.CDSig rmb 1 Set signal for DCD change (SetStat) -SS.CDRel rmb 1 Release previous SS.CDSig (SetStat) - - org $A0 -* -* New Default SCF input buffer Set status call (NitrOS9) -SS.Fill rmb 1 Pre-load SCF device input buffer - -* -* new WDDisk get/set status calls - org $B0 -SS.ECC rmb 1 ECC corrected data error enable/disable (GetStat/SetStat) - - -*** -* Level II Block Map flags -NotRAM equ %10000000 Block Not RAM flag -ModBlock equ %00000010 Module in Block -RAMinUse equ %00000001 RAM Block in use flag - -* -* Service Dispatch Table special entries -IOEntry equ 254 - -*** -* Module Directory Entry Definitions - org 0 -MD$MPDAT rmb 2 Module DAT Image ptr -MD$MBSiz rmb 2 Memory Block size -MD$MPtr rmb 2 Module ptr -MD$Link rmb 2 Module Link count -MD$ESize equ . Module Directory Entry size - -*** -* Module Definitions -* -* Universal Module Offsets - org 0 -M$ID rmb 2 ID Code -M$Size rmb 2 Module Size -M$Name rmb 2 Module Name -M$Type rmb 1 Type / Language -M$Revs rmb 1 Attributes / Revision Level -M$Parity rmb 1 Header Parity -M$IDSize equ . Module ID Size -* -* Type-Dependent Module Offsets -* -* System, File Manager, Device Driver, Program Module -M$Exec rmb 2 Execution Entry Offset -* -* Device Driver, Program Module -M$Mem rmb 2 Stack Requirement -* -* Device Driver, Device Descriptor Module -M$Mode rmb 1 Device Driver Mode Capabilities -* -* Device Descriptor Module - org M$IDSize -M$FMgr rmb 2 File Manager Name Offset -M$PDev rmb 2 Device Driver Name Offset - rmb 1 M$Mode (defined above) -M$Port rmb 3 Port Address -M$Opt rmb 1 Device Default Options -M$DTyp rmb 1 Device Type (equals RBF's IT.DTP and SCF's IT.DVC) -* -* Configuration Module Entry Offsets - org M$IDSize -MaxMem rmb 3 Maximum Free Memory -PollCnt rmb 1 Entries in Interrupt Polling Table -DevCnt rmb 1 Entries in Device Table -InitStr rmb 2 Initial Module Name -SysStr rmb 2 System Device Name -StdStr rmb 2 Standard I/O Pathlist -BootStr rmb 2 Bootstrap Module name -ProtFlag rmb 1 Write protect enable flag - -*** -* Module Field Definitions -* -* ID Field -M$ID1 equ $87 Module ID code byte one -M$ID2 equ $CD Module ID code byte two -M$ID12 equ M$ID1*256+M$ID2 -* -* Module Type / Language byte -* -* Field Masks -TypeMask equ %11110000 Type Field -LangMask equ %00001111 Language Field - -* -* Type Values -Devic equ $F0 Device Descriptor Module -Drivr equ $E0 Device Driver Module -FlMgr equ $D0 File Manager -Systm equ $C0 System Module -Data equ $40 Data Module -Multi equ $30 Multi-Module -Sbrtn equ $20 Subroutine Module -Prgrm equ $10 Program Module - -* -* Language Values -Objct equ 1 6809 Object Code Module -ICode equ 2 Basic09 I-code -PCode equ 3 Pascal P-code -CCode equ 4 C I-code -CblCode equ 5 Cobol I-code -FrtnCode equ 6 Fortran I-code -Obj6309 equ 7 6309 object code -* -* Module Attributes / Revision byte -* -* Field Masks -AttrMask equ %11110000 Attributes Field -RevsMask equ %00001111 Revision Level Field -* -* Attribute Flags -ReEnt equ %10000000 Re-Entrant Module -ModProt equ %01000000 Gimix Module protect bit (0=protected, 1=write enable) -ModNat equ %00100000 6309 native mode attribute - - -*** -* Device Type Values -DT.SCF equ 0 Sequential Character File Type -DT.RBF equ 1 Random Block File Type -DT.Pipe equ 2 Pipe File Type -DT.SBF equ 3 -DT.NFM equ 4 Network File Manager - -*** -* CRC Result Constant -CRCCon1 equ $80 -CRCCon23 equ $0FE3 - -*** -* Path Descriptor Offsets - org 0 -PD.PD rmb 1 Path Number -PD.MOD rmb 1 Mode (Read/Write/Update) -PD.CNT rmb 1 Number of Open Images -PD.DEV rmb 2 Device Table Entry Address -PD.CPR rmb 1 Current Process -PD.RGS rmb 2 Caller's Register Stack -PD.BUF rmb 2 Buffer Address -PD.FST rmb 32-. File Manager's Storage -PD.OPT equ . PD GetSts(0) Options -PD.DTP rmb 1 Device Type - rmb 64-. Path options -PDSIZE equ . - -*** -* Pathlist Special Symbols -PDELIM equ '/ Pathlist Name Separator -PDIR equ '. Directory -PENTIR equ '@ Entire Device - -*** -* File Manager Entry Offsets - org 0 -FMCREA rmb 3 Create (Open New) File -FMOPEN rmb 3 Open File -FMMDIR rmb 3 Make Directory -FMCDIR rmb 3 Change Directory -FMDLET rmb 3 Delete File -FMSEEK rmb 3 Position File -FMREAD rmb 3 Read from File -FMWRIT rmb 3 Write to File -FMRDLN rmb 3 ReadLn -FMWRLN rmb 3 WritLn -FMGSTA rmb 3 Get File Status -FMSSTA rmb 3 Set File Status -FMCLOS rmb 3 Close File - -*** -* Device Driver Entry Offsets - org 0 -D$INIT rmb 3 Device Initialization -D$READ rmb 3 Read from Device -D$WRIT rmb 3 Write to Device -D$GSTA rmb 3 Get Device Status -D$PSTA rmb 3 Put Device Status -D$TERM rmb 3 Device Termination - -*** -* Device Table Format - org 0 -V$DRIV rmb 2 Device Driver module -V$STAT rmb 2 Device Driver Static storage -V$DESC rmb 2 Device Descriptor module -V$FMGR rmb 2 File Manager module -V$USRS rmb 1 use count -DEVSIZ equ . - -*** -* Device Static Storage Offsets - org 0 -V.PAGE rmb 1 Port Extended Address -V.PORT rmb 2 Device 'Base' Port Address -V.LPRC rmb 1 Last Active Process ID -V.BUSY rmb 1 Active Process ID (0=UnBusy) -V.WAKE rmb 1 Active PD if Driver MUST Wake-up -V.USER equ . Driver Allocation Origin - -*** -* Interrupt Polling Table Format - org 0 -Q$POLL rmb 2 Absolute Polling Address -Q$FLIP rmb 1 Flip (EOR) Byte ..normally Zero -Q$MASK rmb 1 Polling Mask (after Flip) -Q$SERV rmb 2 Absolute Service routine Address -Q$STAT rmb 2 Static Storage Address -Q$PRTY rmb 1 Priority (Low Numbers=Top Priority) -POLSIZ equ . - -*** -* VIRQ packet format - org 0 -Vi.Cnt rmb 2 count down counter -Vi.Rst rmb 2 reset value for counter -Vi.Stat rmb 1 status byte - -Vi.IFlag equ %00000001 status byte virq flag - -true equ 1 useful name -false equ 0 useful name - -*** -* Machine Characteristics Definitions -R$CC equ 0 Condition Codes register -R$A equ 1 A Accumulator -R$B equ 2 B Accumulator -R$D equ R$A Combined A:B Accumulator - ifeq H6309-true -R$E equ 3 Accumulator -R$F equ 4 Accumulator -R$W equ R$E Combined E:F Accumulator -R$Q equ R$A Combined A:B:E:F Accumulator -R$DP equ 5 Direct Page register -R$X equ 6 X Index register -R$Y equ 8 Y Index register -R$U equ 10 User Stack register -R$PC equ 12 Program Counter register -R$Size equ 14 Total register package size - else -R$DP equ 3 Direct Page register -R$X equ 4 X Index register -R$Y equ 6 Y Index register -R$U equ 8 User Stack register -R$PC equ 10 Program Counter register -R$Size equ 12 Total register package size - endc - -* MD register masks -* 6309 definitions - NitrOS9 -DIV0 equ %10000000 division by 0 trap flag : 1 = trap occured -badinstr equ %01000000 illegal instruction trap flag : 1 = trap occured - - -Entire equ %10000000 Full Register Stack flag -FIRQMask equ %01000000 Fast-Interrupt Mask bit -HalfCrry equ %00100000 Half Carry flag -IRQMask equ %00010000 Interrupt Mask bit -Negative equ %00001000 Negative flag -Zero equ %00000100 Zero flag -TwosOvfl equ %00000010 Two's Comp Overflow flag -Carry equ %00000001 Carry bit -IntMasks equ IRQMask+FIRQMask -Sign equ %10000000 sign bit - -*** -* Error Code Definitions -* -* WDDisk "TEST" Error Codes - org 101 -E$WD2797 rmb 1 WD 1002-05 WD2797 FD controller -E$WD1010 rmb 1 WD 1002-05 WD1010 HD controller -E$WDSBuf rmb 1 WD 1002-05 sector buffer -E$WD1014 rmb 1 WD 1002-05 WD1014 error detection or bus -E$WD1015 rmb 1 WD 1002-05 WD1015 control processor -* -* System Dependent Error Codes - org 186 -E$StkOvf rmb 1 Stack overflow -E$IllArg rmb 1 Illegal argument - rmb 1 reserved -E$ICoord rmb 1 Illegal coordinates -E$Bug rmb 1 Bug (should never be returned) -E$BufSiz rmb 1 Buffer size is too small -E$IllCmd rmb 1 Illegal command -E$TblFul rmb 1 Screen or window table is full -E$BadBuf rmb 1 Bad/Undefined buffer number -E$IWDef rmb 1 Illegal window definition -E$WUndef rmb 1 Window undefined -* -* Standard OS-9 Error Codes - org 200 -E$PthFul rmb 1 Path Table full -E$BPNum rmb 1 Bad Path Number -E$Poll rmb 1 Polling Table Full -E$BMode rmb 1 Bad Mode -E$DevOvf rmb 1 Device Table Overflow -E$BMID rmb 1 Bad Module ID -E$DirFul rmb 1 Module Directory Full -E$MemFul rmb 1 Process Memory Full -E$UnkSvc rmb 1 Unknown Service Code -E$ModBsy rmb 1 Module Busy -E$BPAddr rmb 1 Bad Page Address -E$EOF rmb 1 End of File - rmb 1 -E$NES rmb 1 Non-Existing Segment -E$FNA rmb 1 File Not Accesible -E$BPNam rmb 1 Bad Path Name -E$PNNF rmb 1 Path Name Not Found -E$SLF rmb 1 Segment List Full -E$CEF rmb 1 Creating Existing File -E$IBA rmb 1 Illegal Block Address -E$HangUp rmb 1 Carrier Detect Lost -E$MNF rmb 1 Module Not Found - rmb 1 -E$DelSP rmb 1 Deleting Stack Pointer memory -E$IPrcID rmb 1 Illegal Process ID -E$BPrcID equ E$IPrcID Bad Process ID (formerly #238) - rmb 1 -E$NoChld rmb 1 No Children -E$ISWI rmb 1 Illegal SWI code -E$PrcAbt rmb 1 Process Aborted -E$PrcFul rmb 1 Process Table Full -E$IForkP rmb 1 Illegal Fork Parameter -E$KwnMod rmb 1 Known Module -E$BMCRC rmb 1 Bad Module CRC -E$USigP rmb 1 Unprocessed Signal Pending -E$NEMod rmb 1 Non Existing Module -E$BNam rmb 1 Bad Name -E$BMHP rmb 1 (bad module header parity) -E$NoRam rmb 1 No (System) Ram Available -E$DNE rmb 1 Directory not empty -E$NoTask rmb 1 No available Task number - rmb $F0-. reserved -E$Unit rmb 1 Illegal Unit (drive) -E$Sect rmb 1 Bad SECTor number -E$WP rmb 1 Write Protect -E$CRC rmb 1 Bad Check Sum -E$Read rmb 1 Read Error -E$Write rmb 1 Write Error -E$NotRdy rmb 1 Device Not Ready -E$Seek rmb 1 Seek Error -E$Full rmb 1 Media Full -E$BTyp rmb 1 Bad Type (incompatable) media -E$DevBsy rmb 1 Device Busy -E$DIDC rmb 1 Disk ID Change -E$Lock rmb 1 Record is busy (locked out) -E$Share rmb 1 Non-sharable file busy -E$DeadLk rmb 1 I/O Deadlock error - -*** -* Direct Page Variable Definitions -* - -* $00 to $1F reserved for user - org 0 -D.WDAddr rmb 2 FHL/Isted WD 1002-05 interface base address -D.WDBtDr rmb 1 FHL/Isted WD 1002-05 boot device physical drive number - -* $20 to $FF used by system - org 32 -D.Tasks rmb 2 Task User Table -D.TmpDAT rmb 2 Temporary DAT Image stack -D.Init rmb 2 Initialization Module ptr -D.Poll rmb 2 Interrupt Polling Routine ptr -D.Time equ . System Time -D.Year rmb 1 (40d) -D.Month rmb 1 -D.Day rmb 1 -D.Hour rmb 1 -D.Min rmb 1 -D.Sec rmb 1 -TimPktSz equ .-D.Time Time Packet Size -D.Tick rmb 1 -D.Slice rmb 1 current slice remaining -D.TSlice rmb 1 Ticks per Slice -D.Boot rmb 1 Bootstrap attempted flag -D.MotOn rmb 1 Floppy Disk Motor-On time out -D.ErrCod rmb 1 Reset Error Code -D.Daywk rmb 1 day of week, com-trol clock -D.TkCnt rmb 1 Tick Counter -D.BtPtr rmb 2 Address of Boot in System Address space -D.BtSz rmb 2 Size of Boot - -* NitrOS9 additions -* 58d begins here -D.MDREG rmb 1 6309 MD (mode) shadow register -D.CRC rmb 1 CRC checking mode flag -D.Tenths rmb 1 Tenths and hundredths fof second for F$Xtime - - org 64 -D.BlkMap rmb 4 Memory Block Map ptr -D.ModDir rmb 4 Module Directory ptrs -D.PrcDBT rmb 2 Process Descriptor Block Table ptr -D.SysPrc rmb 2 System Process Descriptor ptr -D.SysDAT rmb 2 System DAT Image ptr -D.SysMem rmb 2 System Memory Map ptr -D.Proc rmb 2 Current Process ptr -D.AProcQ rmb 2 Active Process Queue -D.WProcQ rmb 2 Waiting Process Queue -D.SProcQ rmb 2 Sleeping Process Queue -D.ModEnd rmb 2 Module Directory end ptr -D.ModDAT rmb 2 Module Dir DAT image end ptr - -D.CldRes rmb 2 Cold Restart vector - - org 107 -D.Crash rmb 6 Pointer to CC Crash Routine -D.CBStrt rmb $B Reserved for CC warmstart ($71) - - org 128 -D.DevTbl rmb 2 I/O Device Table -D.PolTbl rmb 2 I/O Polling Table - rmb 4 reserved -D.PthDBT rmb 2 Path Descriptor Block Table ptr -D.DMAReq rmb 1 DMA Request flag - -* -* COCO3 GIME Shadow Registers - org 144 -D.HINIT rmb 1 GIME INIT0 register (hardware setup $FF90) -D.TINIT rmb 1 GIME INIT1 register (timer/task register $FF91) -D.IRQER rmb 1 Interrupt enable regsiter ($FF92) -D.FRQER rmb 1 Fast Interrupt enable register ($FF93) -D.TIMMS rmb 1 Timer most significant nibble ($FF94) -D.TIMLS rmb 1 Timer least significant byte ($FF95) -D.RESV1 rmb 1 reserved register ($FF96) -D.RESV2 rmb 1 reserved register ($FF97) -D.VIDMD rmb 1 video mode register ($FF98) -D.VIDRS rmb 1 video resolution register ($FF99) -D.BORDR rmb 1 border register ($FF9A) -D.RESV3 rmb 1 reserved register ($FF9B) -D.VOFF2 rmb 1 vertical scroll/offset 2 register ($FF9C) -D.VOFF1 rmb 1 vertical offset 1 register ($FF9D) -D.VOFF0 rmb 1 vertical offset 0 register ($FF9E) -D.HOFF0 rmb 1 horizontal offset 0 register ($FF9F) -D.Speed rmb 1 Speed of COCO CPU 0=slow,1=fast -D.TskIPt rmb 2 Task image Pointer table (CC) -D.MemSz rmb 1 128/512K memory flag (CC) -D.SSTskN rmb 1 System State Task Number (COCO) -D.CCMem rmb 2 Pointer to beginning of CC Memory -D.CCStk rmb 2 Pointer to top of CC Memory -D.Flip0 rmb 2 Change to Task 0 -D.Flip1 rmb 2 Change to reserved Task 1 -D.VIRQ rmb 2 VIRQ Polling routine -D.IRQS rmb 1 IRQ shadow register (CC Temporary) -D.CLTb rmb 2 VIRQ Table address -D.AltIRQ rmb 2 Alternate IRQ Vector (CC) -D.GPoll rmb 2 CC GIME IRQ enable/disable toggle -D.Clock2 rmb 2 CC Clock2 entry address - org 192 -D.SysSvc rmb 2 System Service Routine entry -D.SysDis rmb 2 System Service Dispatch Table ptr -D.SysIRQ rmb 2 System IRQ Routine entry -D.UsrSvc rmb 2 User Service Routine entry -D.UsrDis rmb 2 User Service Dispatch Table ptr -D.UsrIRQ rmb 2 User IRQ Routine entry -D.SysStk rmb 2 System stack -D.SvcIRQ rmb 2 In-System IRQ service -D.SysTsk rmb 1 System Task number - org 224 -D.Clock rmb 2 -D.XSWI3 rmb 2 -D.XSWI2 rmb 2 -D.XFIRQ rmb 2 -D.XIRQ rmb 2 -D.XSWI rmb 2 -D.XNMI rmb 2 -D.ErrRst rmb 2 - org 242 -D.SWI3 rmb 2 -D.SWI2 rmb 2 -D.FIRQ rmb 2 -D.IRQ rmb 2 -D.SWI rmb 2 -D.NMI rmb 2 - -*** -* Process Descriptor Definitions -DefIOSiz equ 16 Default I/O Data Length -NefIOSiz equ 12 On-Net Default I/O Data Length -NumPaths equ 16 Number of Local Paths -* - org 0 -P$ID rmb 1 Process ID -P$PID rmb 1 Parent's ID -P$SID rmb 1 Sibling's ID -P$CID rmb 1 Child's ID -P$SP rmb 2 Stack ptr -P$Task rmb 1 Task Number -P$PagCnt rmb 1 Memory Page Count -P$User rmb 2 User Index -P$Prior rmb 1 Priority -P$Age rmb 1 Age -P$State rmb 1 Status -P$Queue rmb 2 Queue Link (Process ptr) -P$IOQP rmb 1 Previous I/O Queue Link (Process ID) -P$IOQN rmb 1 Next I/O Queue Link (Process ID) -P$PModul rmb 2 Primary Module -P$SWI rmb 2 SWI Entry Point -P$SWI2 rmb 2 SWI2 Entry Point -P$SWI3 rmb 2 SWI3 Entry Point -P$Signal rmb 1 Signal Code -P$SigVec rmb 2 Signal Intercept Vector -P$SigDat rmb 2 Signal Intercept Data Address -P$DeadLk rmb 1 Dominant proc ID if I/O locked - rmb $20-. unused -P$DIO rmb DefIOSiz Default I/O ptrs -P$Path rmb NumPaths I/O Path Table -P$DATImg rmb 64 DAT Image -P$Links rmb 32 Block Link counts -P$NIO rmb 6*2 additional DIO ptrs for net, compatible with 68K -P$SelP rmb 1 Selected Path for COCO Windows (Default 0) -P$UTicks rmb 4 proc User Tick counter -P$STicks rmb 4 proc System Tick counter -P$FCalls rmb 4 proc F$ call counter -P$ICalls rmb 4 proc I$ call counter -P$DatBeg rmb 3 proc Date of creation (Y/M/D) -P$TimBeg rmb 3 proc Time of creation (H/M/S) -P$Alarm rmb 6 COCO individual process' alarm call date/time (Y/M/D/H/M/S) - rmb $200-. Local stack -P$Stack equ . Top of Stack -P$Size equ . Size of Process Descriptor -* -* Process State Flags -SysState equ %10000000 -TimSleep equ %01000000 -TimOut equ %00100000 -ImgChg equ %00010000 -Suspend equ %00001000 -Condem equ %00000010 -Dead equ %00000001