Mercurial > hg > Members > kono > nitros9-code
changeset 1626:c01a65c813ce
Definition files to use with as6809
author | boisy |
---|---|
date | Sat, 03 Jul 2004 00:02:14 +0000 |
parents | 80cff44f7e07 |
children | f7ece667f6f1 |
files | defs/boot.d defs/const.d defs/defsfile.d defs/errno.d defs/io.d defs/ioman.d defs/m6809.d defs/module.d defs/os9defs defs/proc.d defs/rbfdefs defs/signal.d defs/stat.d defs/syscall.d defs/sysglobs.d |
diffstat | 15 files changed, 1387 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/defs/boot.d Sat Jul 03 00:02:14 2004 +0000 @@ -0,0 +1,59 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; boot +; +; $Id$ +; +; Edt/Rev YYYY/MM/DD Modified by +; Comment +; ------------------------------------------------------------------ +; 2004/05/17 Boisy G. Pitre +; Started. + + .title Boot Definitions + + .area BOOT (ABS) + + .ifgt Level-1 + +; +; Boot defs for NitrOS-9 Level 1 +; +; These defs are not strictly for 'Boot', but are for booting the +; system. +; +Bt.Start == 0hEE00 ; Start address of the boot track in memory +Bt.Size == 0h1080 ; Maximum size of bootfile + + .else + +; +; Boot defs for NitrOS-9 Level 2 and above +; +; These defs are not strictly for 'Boot', but are for booting the +; system. +; +Bt.Block == 0h3B ; Block to map in for the 'OS9BOOT' screen +Bt.Flag == 0h8A34 ; Flag in Bt.Block to verify that it's unchanged +Bt.Offst == 2 ; Offset into the screen where the current ptr is +Bt.Start == 0hED00 ; Start address of the boot track in memory + + .endif + +Bt.Track == 34 ; Boot track + + + .ifgt Level-2 +; +; Level 3 Defs +; +; These definitions apply to NitrOS-9 Level 3 +; +L3.Start == 0h2000 ; Start off at slot 1 +L3.Size == 0h40 ; Go for 64 pages: 2 slots total +L3.Blks == L3.Size/0h20 ; Number of slots +L3.End == L3.Start+L3.Size*0h0100 ; end of L3 memory +L3.SCF == 0h0660 ; SCF block ptr +L3.RBF == L3.SCF+1 ; RBF block ptr + .endif + + .endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/defs/const.d Sat Jul 03 00:02:14 2004 +0000 @@ -0,0 +1,48 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; const +; +; $Id$ +; +; Edt/Rev YYYY/MM/DD Modified by +; Comment +; ------------------------------------------------------------------ +; 2004/05/17 Boisy G. Pitre +; Started. + + .title Constant Character Definitions + +C$NULL == 0h00 ; Null char +C$RPET == 0h01 ; (CTRL-A - SOH) Repeat last input line +C$INTR == 0h03 ; (CTRL-C - ETX) Keyboard interrupt +C$RPRT == 0h04 ; (CTRL-D - EOT) Reprint current input line +C$QUIT == 0h05 ; (CTRL-E - ENQ) Keyboard Abort +C$BELL == 0h07 ; (CTRL-G - BEL) Line overflow warning +C$BSP == 0h08 ; (CTRL-H - BS ) Back space +C$RARR == 0h09 ; Right Arrow +C$EL == 0h05 ; Erase Line +C$LF == 0h0A ; Line feed +C$HOME == 0h0B ; Home position Code +C$Clsgr == 0h15 ; Graphic screen clear (use FM-11) +C$Clsall == 0h16 ; Graphic & character clear (use FM-11) +C$CR == 0h0D ; Carriage return +C$FORM == 0h0C ; (CTRL-L - FF ) Form Feed ... screen clear +C$SI == 0h0F ; Shift IN Code +C$SO == 0h0E ; Shift OUT Code +C$DELETE == 0h10 ; Delete char (for SCF enhanced line editing) +C$XON == 0h11 ; (CTRL-Q - DC1) Transmit Enable +C$INSERT == C$XON ; Insert char (for SCF enhanced line editing) +C$XOFF == 0h13 ; (CTRL-S - DC3) Transmit Disable +C$PLINE == C$XOFF ; Print remaining line (for SCF enhanced line editing) +C$PAUS == 0h17 ; (CTRL-W - ETB) Pause character +C$DEL == 0h18 ; (CTRL-X - CAN) Delete line +C$SHRARR == 0h19 ; Shift Right-Arrow +C$EOF == 0h1B ; (CTRL-[ - ESC) END of file +C$RGT == 0h1C ; Cursor right +C$LFT == 0h1D ; Cursor left +C$UP == 0h1E ; Cursor up +C$DWN == 0h1F ; Cursor down +C$SPAC == 0h20 ; Space +C$PERD == '. +C$COMA == ', + +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/defs/defsfile.d Sat Jul 03 00:02:14 2004 +0000 @@ -0,0 +1,5 @@ +Level == 1 + .include "syscall.d" + .include "errno.d" + .include "const.d" + .include "io.d"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/defs/errno.d Sat Jul 03 00:02:14 2004 +0000 @@ -0,0 +1,179 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; errno +; +; $Id$ +; +; Edt/Rev YYYY/MM/DD Modified by +; Comment +; ------------------------------------------------------------------ +; 2004/07/02 Boisy G. Pitre +; Started + + .title NitrOS-9 Error Definitions + + .area ERRNO (ABS) + +; +; Basic09 Error Codes +; + .org 10 +E$UnkSym:: .rmb 1 ; Unknown symbol +E$ExcVrb:: .rmb 1 ; Excessive verbage +E$IllStC:: .rmb 1 ; Illegal statement construction +E$ICOvf:: .rmb 1 ; I-code overflow +E$IChRef:: .rmb 1 ; Illegal channel reference +E$IllMod:: .rmb 1 ; Illegal mode +E$IllNum:: .rmb 1 ; Illegal number +E$IllPrf:: .rmb 1 ; Illegal prefix +E$IllOpd:: .rmb 1 ; Illegal operand +E$IllOpr:: .rmb 1 ; Illegal operator +E$IllRFN:: .rmb 1 ; Illegal record field name +E$IllDim:: .rmb 1 ; Illegal dimension +E$IllLit:: .rmb 1 ; Illegal literal +E$IllRet:: .rmb 1 ; Illegal relational +E$IllSfx:: .rmb 1 ; Illegal type suffix +E$DimLrg:: .rmb 1 ; Dimension too large +E$LinLrg:: .rmb 1 ; Line number too large +E$NoAssg:: .rmb 1 ; Missing assignment statement +E$NoPath:: .rmb 1 ; Missing path number +E$NoComa:: .rmb 1 ; Missing coma +E$NoDim:: .rmb 1 ; Missing dimension +E$NoDO:: .rmb 1 ; Missing DO statement +E$MFull:: .rmb 1 ; Memory full +E$NoGoto:: .rmb 1 ; Missing GOTO +E$NoLPar:: .rmb 1 ; Missing left parenthesis +E$NoLRef:: .rmb 1 ; Missing line reference +E$NoOprd:: .rmb 1 ; Missing operand +E$NoRPar:: .rmb 1 ; Missing right parenthesis +E$NoTHEN:: .rmb 1 ; Missing THEN statement +E$NoTO:: .rmb 1 ; Missing TO statement +E$NoVRef:: .rmb 1 ; Missing variable reference +E$EndQou:: .rmb 1 ; Missing end quote +E$SubLrg:: .rmb 1 ; Too many subscripts +E$UnkPrc:: .rmb 1 ; Unknown procedure +E$MulPrc:: .rmb 1 ; Multiply defined procedure +E$DivZer:: .rmb 1 ; Divice by zero +E$TypMis:: .rmb 1 ; Operand type mismatch +E$StrOvf:: .rmb 1 ; String stack overflow +E$NoRout:: .rmb 1 ; Unimplemented routine +E$UndVar:: .rmb 1 ; Undefined variable +E$FltOvf:: .rmb 1 ; Floating Overflow +E$LnComp:: .rmb 1 ; Line with compiler error +E$ValRng:: .rmb 1 ; Value out of range for destination +E$SubOvf:: .rmb 1 ; Subroutine stack overflow +E$SubUnd:: .rmb 1 ; Subroutine stack underflow +E$SubRng:: .rmb 1 ; Subscript out of range +E$ParmEr:: .rmb 1 ; Parameter error +E$SysOvf:: .rmb 1 ; System stack overflow +E$IOMism:: .rmb 1 ; I/O type mismatch +E$IONum:: .rmb 1 ; I/O numeric input format bad +E$IOConv:: .rmb 1 ; I/O conversion: number out of range +E$IllInp:: .rmb 1 ; Illegal input format +E$IOFRpt:: .rmb 1 ; I/O format repeat error +E$IOFSyn:: .rmb 1 ; I/O format syntax error +E$IllPNm:: .rmb 1 ; Illegal path number +E$WrSub:: .rmb 1 ; Wrong number of subscripts +E$NonRcO:: .rmb 1 ; Non-record type operand +E$IllA:: .rmb 1 ; Illegal argument +E$IllCnt:: .rmb 1 ; Illegal control structure +E$UnmCnt:: .rmb 1 ; Unmatched control structure +E$IllFOR:: .rmb 1 ; Illegal FOR variable +E$IllExp:: .rmb 1 ; Illegal expression type +E$IllDec:: .rmb 1 ; Illegal declarative statement +E$ArrOvf:: .rmb 1 ; Array size overflow +E$UndLin:: .rmb 1 ; Undefined line number +E$MltLin:: .rmb 1 ; Multiply defined line number +E$MltVar:: .rmb 1 ; Multiply defined variable +E$IllIVr:: .rmb 1 ; Illegal input variable +E$SeekRg:: .rmb 1 ; Seek out of range +E$NoData:: .rmb 1 ; Missing data statement + +; +; System Dependent Error Codes +; + +; Level 2 windowing error codes + .org 183 +E$IWTyp:: .rmb 1 ; Illegal window type +E$WADef:: .rmb 1 ; Window already defined +E$NFont:: .rmb 1 ; Font not found +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 + +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 + + +; +; Standard NitrOS-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 == 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 0hF0-. ; reserved + .org 0hF0 +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 +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/defs/io.d Sat Jul 03 00:02:14 2004 +0000 @@ -0,0 +1,132 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; io +; +; $Id$ +; +; Edt/Rev YYYY/MM/DD Modified by +; Comment +; ------------------------------------------------------------------ +; 2004/05/17 Boisy G. Pitre +; Started. + + .title I/O Constant Definitions + + .area IO (ABS) + + + +READ. == 0b00000001 +WRITE. == 0b00000010 +UPDAT. == READ.+WRITE. +EXEC. == 0b00000100 +PREAD. == 0b00001000 +PWRIT. == 0b00010000 +PEXEC. == 0b00100000 +SHARE. == 0b01000000 +DIR. == 0b10000000 +ISIZ. == 0b00100000 + + +; +; 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 == . ; PD GetSts(0) Options +PD.DTP:: .rmb 1 ; Device Type + .rmb 64-. ; Path options +PDSIZE == . + +; +; Pathlist Special Symbols +; +PDELIM == '/ ; Pathlist Name Separator +PDIR == '. ; Directory +PENTIR == '@ ; 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 + .ifgt Level-1 +V$DRIVEX:: .rmb 2 ; Device Driver execution address +V$FMGREX:: .rmb 2 ; File Manager execution address + .endif +DEVSIZ == . + +; +; 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 == . ; 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) + .ifgt Level-1 +Q$MAP:: .rmb 2 ; NitrOS-9 Level 2 and above + .endif +POLSIZ == . + +; +; 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 == 0b00000001 ; status byte virq flag
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/defs/ioman.d Sat Jul 03 00:02:14 2004 +0000 @@ -0,0 +1,21 @@ +************************************** +* 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
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/defs/m6809.d Sat Jul 03 00:02:14 2004 +0000 @@ -0,0 +1,48 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; m6809 +; +; $Id$ +; +; Edt/Rev YYYY/MM/DD Modified by +; Comment +; ------------------------------------------------------------------ +; 2004/05/17 Boisy G. Pitre +; Started. + + .title Motorola 6809 Definitions + + .area M6809 (ABS) + + .org 0 +R$CC:: .rmb 1 ; Condition Codes register +R$A:: .rmb 2 ; A Accumulator +R$B:: .rmb 2 ; B Accumulator +R$D == R$A ; Combined A:B Accumulator + .ifdef H6309 +R$E:: .rmb 1 ; E Accumulator +R$F:: .rmb 1 ; F Accumulator +R$W == R$E ; Combined E:F Accumulator +R$Q == R$A ; Combined A:B:E:F Accumulator + .endif +R$DP:: .rmb 1 ; Direct Page register +R$X:: .rmb 2 ; X Index register +R$Y:: .rmb 2 ; Y Index register +R$U:: .rmb 2 ; User Stack register +R$PC:: .rmb 2 ; Program Counter register +R$Size == . ; Total register package size + +; MD register masks +; 6309 definitions +DIV0 == 0b10000000 ; division by 0 trap flag : 1 = trap occured +badinstr == 0b01000000 ; illegal instruction trap flag : 1 = trap occured + +Entire == 0b10000000 ; Full Register Stack flag +FIRQMask == 0b01000000 ; Fast-Interrupt Mask bit +HalfCrry == 0b00100000 ; Half Carry flag +IRQMask == 0b00010000 ; Interrupt Mask bit +Negative == 0b00001000 ; Negative flag +Zero == 0b00000100 ; Zero flag +TwosOvfl == 0b00000010 ; Two's Comp Overflow flag +Carry == 0b00000001 ; Carry bit +IntMasks == IRQMask+FIRQMask +Sign == 0b10000000 ; sign bit
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/defs/module.d Sat Jul 03 00:02:14 2004 +0000 @@ -0,0 +1,172 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; module +; +; $Id$ +; +; Edt/Rev YYYY/MM/DD Modified by +; Comment +; ------------------------------------------------------------------ +; 2004/05/17 Boisy G. Pitre +; Started. + + .title Module Definitions + + .area MODULE (ABS) + + .org 0 + + .ifgt Level-1 +MD$MPDAT:: .rmb 2 ; Module DAT Image ptr +MD$MBSiz:: .rmb 2 ; Memory Block size + .endif +MD$MPtr:: .rmb 2 ; Module ptr +MD$Link:: .rmb 2 ; Module Link count +MD$ESize == . ; Module Directory Entry size + +; +; 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 == . ; 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 +IT.DTP == M$DTyp ; Descriptor type offset +; +; 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 + +OSLevel:: .rmb 1 ; OS level +OSVer:: .rmb 1 ; OS version +OSMajor:: .rmb 1 ; OS major +OSMinor:: .rmb 1 ; OS minor +Feature1:: .rmb 1 ; feature byte 1 +Feature2:: .rmb 1 ; feature byte 2 + .rmb 8 ; reserved for future use + .ifgt Level-1 +; -- CC3IO area -- (NitrOS-9 Level 2 and above) +MonType:: .rmb 1 ; Monitor type (0=CMP,1=RGB,2=MONO) +MouseInf:: .rmb 2 ; Mouse resolution/Mouse port; was 1, major error RG. +KeyRptS:: .rmb 1 ; Key repeat start constant +KeyRptD:: .rmb 1 ; Key repeat delay constant + .endif + +; Feature1 byte definitions +CRCOn == 0b00000001 ; CRC checking on +CRCOff == 0b00000000 ; CRC checking off + +; Module Field Definitions +; +; ID Field - First two bytes of a NitrOS-9 module +; +M$ID1 == 0h87 ; Module ID code byte one +M$ID2 == 0hCD ; Module ID code byte two +M$ID12 == M$ID1*256+M$ID2 + +; +; Module Type/Language Field Masks +; +TypeMask == 0b11110000 ; Type Field +LangMask == 0b00001111 ; Language Field + +; +; Module Type Values +; +Devic == 0hF0 ; Device Descriptor Module +Drivr == 0hE0 ; Physical Device Driver +FlMgr == 0hD0 ; File Manager +Systm == 0hC0 ; System Module +ShellSub == 0h50 ; Shell+ shell sub module +Data == 0h40 ; Data Module +Multi == 0h30 ; Multi-Module +Sbrtn == 0h20 ; Subroutine Module +Prgrm == 0h10 ; Program Module + +; +; Module Language Values +; +Objct == 1 ; 6809 Object Code Module +ICode == 2 ; Basic09 I-code +PCode == 3 ; Pascal P-code +CCode == 4 ; C I-code +CblCode == 5 ; Cobol I-code +FrtnCode == 6 ; Fortran I-code +Obj6309 == 7 ; 6309 object code + +; +; Module Attributes / Revision byte +; +; Field Masks +; +AttrMask == 0b11110000 ; Attributes Field +RevsMask == 0b00001111 ; Revision Level Field + +; +; Attribute Flags +; +ReEnt == 0b10000000 ; Re-Entrant Module +ModProt == 0b01000000 ; Gimix Module protect bit (0=protected, 1=write enable) +ModNat == 0b00100000 ; 6309 native mode attribute + +; +; Device Type Values +; +; These values define various classes of devices, which are +; managed by a file manager module. The Device Type is embedded +; in a device's device descriptor. +; +DT.SCF == 0 ; Sequential Character File Manager +DT.RBF == 1 ; Random Block File Manager +DT.Pipe == 2 ; Pipe File Manager +DT.SBF == 3 ; Sequential Block File Manager +DT.NFM == 4 ; Network File Manager +DT.CDFM == 5 ; CD-ROM File Manager + + +; +; CRC Result Constant +; +CRCCon1 == $80 +CRCCon23 == $0FE3
--- a/defs/os9defs Wed Jun 30 12:04:09 2004 +0000 +++ b/defs/os9defs Sat Jul 03 00:02:14 2004 +0000 @@ -294,8 +294,8 @@ SS.Close rmb 1 SetStat to tell driver a path was closed SS.HngUp rmb 1 SetStat to tell driver to hangup phone SS.FSig rmb 1 new signal for temp locked files -SS.DSize equ SS.ScSiz Return disk size (RBF) -SS.VarSect rmb 1 Variable Sector Size (called by RBF) +SS.DSize equ SS.ScSiz Return disk size (RBF GetStat) +SS.VarSect equ SS.DStat Variable Sector Size (RBF GetStat) * System Specific and User defined codes above $80 org $80
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/defs/proc.d Sat Jul 03 00:02:14 2004 +0000 @@ -0,0 +1,120 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; proc +; +; $Id$ +; +; Edt/Rev YYYY/MM/DD Modified by +; Comment +; ------------------------------------------------------------------ +; 2004/05/17 Boisy G. Pitre +; Started. + + .title Process Constants + + .area PROC (ABS) + + .if Level=1 + +; Level 1 process descriptor defs +DefIOSiz == 12 +NumPaths == 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$CHAP:: .rmb 1 ; process chapter number +P$ADDR:: .rmb 1 ; user address beginning page number +P$PagCnt:: .rmb 1 ; Memory Page Count +P$User:: .rmb 2 ; User Index $09 +P$Prior:: .rmb 1 ; Priority $0B +P$Age:: .rmb 1 ; Age $0C +P$State$0D +P$Queue:: .rmb 2 ; Queue Link (Process ptr) $0E +P$IOQP:: .rmb 1 ; Previous I/O Queue Link (Process ID) $10 +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 $18 +P$DIO:: .rmb DefIOSiz ; default I/O ptrs $1A +P$PATH:: .rmb NumPaths ; I/O path table $26 +P$Signal:: .rmb 1 ; Signal Code $36 +P$SigVec:: .rmb 2 ; Signal Intercept Vector +P$SigDat:: .rmb 2 ; Signal Intercept Data Address +P$NIO:: .rmb 4 ; additional dio pointers for net + .rmb 0h40-. ; unused +P$Size == . ; Size of Process Descriptor + +; +; Process State Flags +; +SysState == 0b10000000 +TimSleep == 0b01000000 +TimOut == 0b00100000 +ImgChg == 0b00010000 +Condem == 0b00000010 +Dead == 0b00000001 + + .else + +; Level 2 process descriptor defs +DefIOSiz == 16 ; Default I/O Data Length +NefIOSiz == 12 ; On-Net Default I/O Data Length +NumPaths == 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 0h20-. ; 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 (L2V3) +P$STicks:: .rmb 4 ; proc System Tick counter (L2V3) +P$FCalls:: .rmb 4 ; proc F$ call counter (L2V3) +P$ICalls:: .rmb 4 ; proc I$ call counter (L2V3) +P$DatBeg:: .rmb 3 ; proc Date of creation (Y/M/D) (L2V3) +P$TimBeg:: .rmb 3 ; proc Time of creation (H/M/S) (L2V3) +P$Alarm:: .rmb 6 + .rmb 0h200-. ; Local stack +P$Stack == . ; Top of Stack +P$Size == . ; Size of Process Descriptor + +; +; Process State Flags +; +SysState == 0b10000000 +TimSleep == 0b01000000 +TimOut == 0b00100000 +ImgChg == 0b00010000 +Suspend == 0b00001000 +Condem == 0b00000010 +Dead == 0b00000001 + + .endif
--- a/defs/rbfdefs Wed Jun 30 12:04:09 2004 +0000 +++ b/defs/rbfdefs Sat Jul 03 00:02:14 2004 +0000 @@ -104,16 +104,18 @@ * IT.TYP Definitions * +TYP.HARD equ %10000000 Hard disk TYP.FLP equ %00000000 Floppy disk -TYP.HARD equ %10000000 Hard disk +TYP.NSF equ %01000000 Non-standard format +TYP.SOF equ %00000000 Standard NitrOS-9 format * IT.TYP bit definitions if bit 7 of IT.TYP is set (hard disk) -TYPH.256 equ %00000000 256 byte sector media -TYPH.512 equ %00000001 512 byte sector media -TYPH.1024 equ %00000010 1024 byte sector media -TYPH.2048 equ %00000011 2048 byte sector media -TYPH.SSM equ %00000011 Sector size mask -TYPH.DSQ equ %00010000 Drive size query flag +TYPH.256 equ %00000000 256 byte sector media +TYPH.512 equ %00000001 512 byte sector media +TYPH.1024 equ %00000010 1024 byte sector media +TYPH.2048 equ %00000011 2048 byte sector media +TYPH.SSM equ %00000011 Sector size mask +TYPH.DSQ equ %00010000 Drive size query flag * IT.TYP bit definitions if bit 7 of IT.TYP is clear (floppy disk) TYP.5 equ %00000000 5" media @@ -122,11 +124,12 @@ TYP.512 equ %00000100 512 byte sector media TYP.CCF equ %00100000 CoCo format TYP.NCCF equ %00000000 Non-CoCo format -TYP.SOF equ %00000000 Standard NitrOS-9 format -TYP.NSF equ %01000000 Non-standard format * IT.DNS Definitions * + +* If bit 7 of IT.TYP is set, IT.DNS is driver-dependent + * IT.DNS bit definitions if bit 7 of IT.TYP is clear (floppy disk) DNS.FM equ %00000000 Single-density (FM) DNS.MFM equ %00000001 Double-density (MFM)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/defs/signal.d Sat Jul 03 00:02:14 2004 +0000 @@ -0,0 +1,24 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; signal +; +; $Id$ +; +; Edt/Rev YYYY/MM/DD Modified by +; Comment +; ------------------------------------------------------------------ +; 2004/07/02 Boisy G. Pitre +; Started + + .title Signal definitions + + .area sys (ABS) + + .org 0 + +S$Kill:: .byte 1 ; Non-Interceptable Abort +S$Wake:: .byte 1 ; Wake-up Sleeping Process +S$Abort:: .byte 1 ; Keyboard Abort +S$Intrpt:: .byte 1 ; Keyboard Interrupt +S$Window:: .byte 1 ; Window Change +S$Alarm:: .byte 1 ; CoCo individual process' alarm signal +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/defs/stat.d Sat Jul 03 00:02:14 2004 +0000 @@ -0,0 +1,157 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; stat +; +; $Id$ +; +; Edt/Rev YYYY/MM/DD Modified by +; Comment +; ------------------------------------------------------------------ +; 2004/07/02 Boisy G. Pitre +; Started + + .title GetStat/SetStat Code Definitions + + .area sys (ABS) + + .org 0 + +SS.Opt:: .byte 1 ; Read/Write PD Options +SS.Ready:: .byte 1 ; Check for Device Ready +SS.Size:: .byte 1 ; Read/Write File Size +SS.Reset:: .byte 1 ; Device Restore +SS.WTrk:: .byte 1 ; Device Write Track +SS.Pos:: .byte 1 ; Get File Current Position +SS.EOF:: .byte 1 ; Test for End of File +SS.Link:: .byte 1 ; Link to Status routines +SS.ULink:: .byte 1 ; Unlink Status routines +SS.Feed:: .byte 1 ; issue form feed +SS.Frz:: .byte 1 ; Freeze DD. information +SS.SPT:: .byte 1 ; Set DD.TKS to given value +SS.SQD:: .byte 1 ; S == ence down hard disk +SS.DCmd:: .byte 1 ; Send direct command to disk +SS.DevNm:: .byte 1 ; Return Device name (32-bytes at [X]) +SS.FD:: .byte 1 ; Return File Descriptor (Y-bytes at [X]) +SS.Ticks:: .byte 1 ; Set Lockout honor duration +SS.Lock:: .byte 1 ; Lock/Release record +SS.DStat:: .byte 1 ; Return Display Status (CoCo) +SS.Joy:: .byte 1 ; Return Joystick Value (CoCo) +SS.BlkRd:: .byte 1 ; Block Read +SS.BlkWr:: .byte 1 ; Block Write +SS.Reten:: .byte 1 ; Retension cycle +SS.WFM:: .byte 1 ; Write File Mark +SS.RFM:: .byte 1 ; Read past File Mark +SS.ELog:: .byte 1 ; Read Error Log +SS.SSig:: .byte 1 ; Send signal on data ready +SS.Relea:: .byte 1 ; Release device +SS.AlfaS:: .byte 1 ; Return Alfa Display Status (CoCo, SCF/GetStat) +SS.Attr == SS.AlfaS ; to serve 68K/RBF/SetStat only, thru NET +SS.Break:: .byte 1 ; Send break signal out acia +SS.RsBit:: .byte 1 ; Reserve bitmap sector (do not allocate in) LSB(X)=sct# + .byte 1 ; reserved +SS.FDInf == 0h20 ; to serve 68K/RBF/GetStat only, thru NET + .byte 4 ; reserve $20-$23 for Japanese version (Hoshi) +SS.SetMF:: .byte 1 ; reserve $24 for Gimix G68 (Flex compatability?) +SS.Cursr:: .byte 1 ; Cursor information for COCO +SS.ScSiz:: .byte 1 ; Return screen size for COCO +SS.KySns:: .byte 1 ; Getstat/SetStat for COCO keyboard +SS.ComSt:: .byte 1 ; Getstat/SetStat for Baud/Parity +SS.Open:: .byte 1 ; SetStat to tell driver a path was opened +SS.Close:: .byte 1 ; SetStat to tell driver a path was closed +SS.HngUp:: .byte 1 ; SetStat to tell driver to hangup phone +SS.FSig:: .byte 1 ; new signal for temp locked files +SS.DSize == SS.ScSiz ; Return disk size (RBF GetStat) +SS.VarSect == SS.DStat ; Variable Sector Size (RBF GetStat) + +; System Specific and User defined codes above $80 + + .org 0h80 + +SS.AAGBf:: .byte 1 ; SetStat to Allocate Additional Graphic Buffer +SS.SLGBf:: .byte 1 ; SetStat to Select a different Graphic Buffer +SS.Mount:: .byte 1 ; Network 4 Mount Setstat +SS.RdNet:: .byte 1 ; Read Raw Sector from Network 4 Omnidrive +SS.MpGPB:: .byte 1 ; SetStat to r == est a Get/Put Buffer be mapped in workspace +SS.Slots:: .byte 1 ; Network 4 slots? getstat + + .ifgt Level-1 + +; Level 2 Windowing +SS.WnSet:: .byte 1 ; Set up High Level Windowing Information +SS.MnSel:: .byte 1 ; R == est High level Menu Handler take determine next event +SS.SBar:: .byte 1 ; SetStat to set position block on Window scroll bars +SS.Mouse:: .byte 1 ; Return Mouse information packet (COCO) +SS.MsSig:: .byte 1 ; SetStat to tell driver to send signal on mouse event +SS.AScrn:: .byte 1 ; Allocate a screen for application poking +SS.DScrn:: .byte 1 ; Display a screen allocated by SS.AScrn +SS.FScrn:: .byte 1 ; Free a screen allocated by SS.AScrn +SS.PScrn:: .byte 1 ; Polymorph Screen into different screen type +SS.ScInf:: .byte 1 ; Get Current screen info for direct writes + .byte 1 ; Reserved +SS.Palet:: .byte 1 ; Return palette information +SS.Montr:: .byte 1 ; Get and Set Monitor Type +SS.ScTyp:: .byte 1 ; Get screen type information +SS.GIP:: .byte 1 ; Global Input Parameters (SetStat) +SS.UMBar:: .byte 1 ; update menu bar (SetStat) +SS.FBRgs:: .byte 1 ; return color registers (GetStat) +SS.DfPal:: .byte 1 ; set/return default palette registers (Getstat/Setstat) +SS.Tone:: .byte 1 ; Generate a tone using 6 bit sound +SS.GIP2:: .byte 1 ; Global Input Params #2 (L2V3) +SS.AnPal:: .byte 1 ; Animate palettes (L2V3) +SS.FndBf:: .byte 1 ; Find named buffer (L2V3) + +; sc6551 defined +SS.CDSta == SS.GIP2 +SS.CDSig == SS.AnPal +SS.CDRel == SS.FndBf + + .else + +; These are wide open in Level 1 + .byte 19 + +; sc6551 defined +SS.CDSta:: .byte 1 +SS.CDSig:: .byte 1 +SS.CDRel:: .byte 1 + + .endif + + + .org 0hA0 + +; New Default SCF input buffer Set status call +SS.Fill:: .byte 1 ; Pre-load SCF device input buffer +SS.Hist:: .byte 1 ; Enable command-line history easily + + + .org 0hB0 + +; New WDDisk get/set status calls +SS.ECC:: .byte 1 ; ECC corrected data error enable/disable (GetStat/SetStat) + + .ifgt Level-1 + +; VRN get/set status calls. Named by Alan DeKok. +SS.VCtr == 0h80 ; Return FS2 total VIRQ counter +SS.VSig == 0h81 ; Return FS2 number of signals sent + +SS.FClr == 0h81 ; Set/clear FS2 VIRQ +SS.FSet == 0hC7 ; Set FS2+ VIRQ +SS.KSet == 0hC8 ; Set KQ3 VIRQ +SS.KClr == 0hC9 ; Clr KQ3 VIRQ +SS.ARAM == 0hCA ; Allocate RAM blocks +SS.DRAM == 0hCB ; De-allocate RAM blocks + +; SDisk 3 Definition equates +SS.DRead == SS.AAGBf ; SDisk3 Direct Sector Read ($80) +SS.DWrit == SS.DRead ; SDisk3 Direct sector Write ($80) +SS.UnFrz == SS.SLGBf ; SDisk3 UNFreeze DD info ($81) +SS.MOFF == SS.Mount ; SDisk3 fast motor off call ($82) +SS.MoTim == SS.RdNet ; SDisk3 Set motor shut off time ($83) +SS.SDRD == SS.MpGPB ; SDisk3 System direct read ($84) +SS.SDWRT == SS.SDRD ; SDisk3 System direct writes ($84) +SS.Sleep == SS.Slots ; SDisk3 (DMC ONLY) Enable/disable F$Sleep calls in read/write 1773 I/O ($85) +SS.DrvCh == SS.WnSet ; SDisk3 (DMC ONLY) Set drive number to cache, or return drive number being cached ($86) + + .endif +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/defs/syscall.d Sat Jul 03 00:02:14 2004 +0000 @@ -0,0 +1,170 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; syscall +; +; $Id$ +; +; Edt/Rev YYYY/MM/DD Modified by +; Comment +; ------------------------------------------------------------------ +; 2004/07/02 Boisy G. Pitre +; Started + + .title NitrOS-9 System Definitions + + .area SYS (ABS) + + .ifndef Level +Level == 2 + .endif + +; Common definitions +true == 1 +false == 0 + + .page +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; 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 + + .ifgt Level-1 + +; NitrOS-9 Level 2 system calls +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 3 Alarm Call + .rmb 2 ; Reserved - For overlap of other systems +F$NMLink:: .rmb 1 ; Color Computer 3 Non-Mapping Link +F$NMLoad:: .rmb 1 ; Color Computer 3 Non-Mapping Load + .org 0h25 +F$TPS:: .rmb 1 ; Return System's Ticks Per Second +F$TimAlm:: .rmb 1 ; CoCo individual process alarm call + + .endif + + .org 0h27 ; 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 + + .ifgt Level-1 + +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 + +; Alan DeKok 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) +F$VBlock:: .rmb 1 ; Verify modules in a block of memory, add to module directory + + .endif + +; +; Numbers $70 through $7F are reserved for user definitions +; + .org 0h70 + + .if Level=1 + + .rmb 16 ; Reserved for user definition + + .else + +F$RegDmp:: .rmb 1 ; Ron Lammardo's debugging register dump +F$NVRAM:: .rmb 1 ; Non Volatile RAM (RTC battery backed static) read/write + + .rmb 0h80-. ; Reserved for user definitions + + .endif + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; I/O Service Request Code Definitions +; + .org 0h80 +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
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/defs/sysglobs.d Sat Jul 03 00:02:14 2004 +0000 @@ -0,0 +1,238 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; sysglobs +; +; $Id$ +; +; Edt/Rev YYYY/MM/DD Modified by +; Comment +; ------------------------------------------------------------------ +; 2004/05/17 Boisy G. Pitre +; Started. + + .title System Globals + + .area SYSGLOBS (ABS) + + + .if Level=1 +; Level 1 DP vars + .org 0 +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 0h20 +D.FMBM:: .rmb 4 ; Free memory bit map pointers +D.MLIM:: .rmb 2 ; Memory limit $24 +D.ModDir:: .rmb 4 ; Module directory $26 +D.Init:: .rmb 2 ; Rom base address $2A +D.SWI3:: .rmb 2 ; Swi3 vector $2C +D.SWI2:: .rmb 2 ; Swi2 vector $2E +D.FIRQ:: .rmb 2 ; Firq vector $30 +D.IRQ:: .rmb 2 ; Irq vector $32 +D.SWI:: .rmb 2 ; Swi vector $34 +D.NMI:: .rmb 2 ; Nmi vector $36 +D.SvcIRQ:: .rmb 2 ; Interrupt service entry $38 +D.Poll:: .rmb 2 ; Interrupt polling routine $3A +D.UsrIRQ:: .rmb 2 ; User irq routine $3C +D.SysIRQ:: .rmb 2 ; System irq routine $3E +D.UsrSvc:: .rmb 2 ; User service request routine $40 +D.SysSvc:: .rmb 2 ; System service request routine $42 +D.UsrDis:: .rmb 2 ; User service request dispatch table +D.SysDis:: .rmb 2 ; System service reuest dispatch table +D.Slice:: .rmb 1 ; Process time slice count $48 +D.PrcDBT:: .rmb 2 ; Process descriptor block address $49 +D.Proc:: .rmb 2 ; Process descriptor address $4B +D.AProcQ:: .rmb 2 ; Active process queue $4D +D.WProcQ:: .rmb 2 ; Waiting process queue $4F +D.SProcQ:: .rmb 2 ; Sleeping process queue $51 +D.Time:: .equ . ; Time +D.Year:: .rmb 1 ; $53 +D.Month:: .rmb 1 ; $54 +D.Day:: .rmb 1 ; $55 +D.Hour:: .rmb 1 ; $56 +D.Min:: .rmb 1 ; $57 +D.Sec:: .rmb 1 ; $58 +D.Tick:: .rmb 1 ; $59 +D.TSec:: .rmb 1 ; Ticks / second $5A +D.TSlice:: .rmb 1 ; Ticks / time-slice $5B +D.IOML:: .rmb 2 ; I/O mgr free memory low bound $5C +D.IOMH:: .rmb 2 ; I/O mgr free memory hi bound $5E +D.DevTbl:: .rmb 2 ; Device driver table addr $60 +D.PolTbl:: .rmb 2 ; Irq polling table addr $62 +D.PthDBT:: .rmb 2 ; Path descriptor block table addr $64 +D.BTLO:: .rmb 2 ; Bootstrap low address $66 +D.BTHI:: .rmb 2 ; Bootstrap hi address $68 +D.DMAReq:: .rmb 1 ; DMA in use flag $6A +D.AltIRQ:: .rmb 2 ; Alternate IRQ vector (CC) $6B +D.KbdSta:: .rmb 2 ; Keyboard scanner static storage (CC) $6D +D.DskTmr:: .rmb 2 ; Disk Motor Timer (CC) $6F +D.CBStrt:: .rmb 16 ; reserved for CC warmstart ($71) +D.Clock:: .rmb 2 ; Address of Clock Tick Routine (CC) $81 +D.Boot:: .rmb 1 ; Bootstrap attempted flag +D.URtoSs:: .rmb 2 ; address of user to system routine (VIRQ) $84 +D.CLTb:: .rmb 2 ; Pointer to clock interrupt table (VIRQ) $86 +D.MDREG:: .rmb 1 ; 6309 MD (mode) shadow register $88 (added in V2.01.00) +D.CRC:: .rmb 1 ; CRC checking mode flag $89 (added in V2.01.00) +D.Clock2:: .rmb 2 ; CC Clock2 entry address + + .org 0h100 +D.XSWI3:: .rmb 3 +D.XSWI2:: .rmb 3 +D.XSWI:: .rmb 3 +D.XNMI:: .rmb 3 +D.XIRQ:: .rmb 3 +D.XFIRQ:: .rmb 3 + +; Table Sizes +BMAPSZ == 32 ; Bitmap table size +SVCTNM == 2 ; Number of service request tables +SVCTSZ == (256-BMAPSZ)/SVCTNM-2 ; Service request table size + + .else + +; Level 2 DP vars + .org 0 +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 0h20 +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 == . ; System Time +D.Year:: .rmb 1 +D.Month:: .rmb 1 +D.Day:: .rmb 1 +D.Hour:: .rmb 1 +D.Min:: .rmb 1 +D.Sec:: .rmb 1 +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 + .ifdef H6309 +D.MDREG:: .rmb 1 ; 6309 MD (mode) shadow register + .else + .rmb 1 ; Currently unused in NitrOS-9/6809 + .endif +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 + + .org 0h40 +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 +D.BtBug:: .rmb 3 ; Boot debug information +D.Pipe:: .rmb 2 + + .org 0h6B +D.Crash:: .rmb 6 ; Pointer to CC Crash Routine +D.CBStrt:: .rmb 0hB ; Reserved for CC warmstart ($71) +D.QCnt:: .rmb 1 ; Count of number of quick system calls performed + + .org 0h80 +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 + +; CoCo 3 STUFF COMES NEXT +; This area is used for the CoCo Hardware Registers +; + .org 0h90 +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 ($A0) +D.TskIPt:: .rmb 2 ; Task image Pointer table (CC) ($A1) +D.MemSz:: .rmb 1 ; 128/512K memory flag (CC) ($A3) +D.SSTskN:: .rmb 1 ; System State Task Number (COCO) ($A4) +D.CCMem:: .rmb 2 ; Pointer to beginning of CC Memory ($A5) +D.CCStk:: .rmb 2 ; Pointer to top of CC Memory ($A7) +D.Flip0:: .rmb 2 ; Change to Task 0 ($A9) +D.Flip1:: .rmb 2 ; Change to reserved Task 1 ($AB) +D.VIRQ:: .rmb 2 ; VIRQ Polling routine ($AD) +D.IRQS:: .rmb 1 ; IRQ shadow register (CC Temporary) ($AF) +D.CLTb:: .rmb 2 ; VIRQ Table address ($B0) +D.AltIRQ:: .rmb 2 ; Alternate IRQ Vector (CC) ($B2) +D.GPoll:: .rmb 2 ; CC GIME IRQ enable/disable toggle +D.Clock2:: .rmb 2 ; CC Clock2 entry address + .org 0hC0 +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 0hE0 +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 +D.SysVec:: .rmb 2 ; F$xxx system call vector for NitrOS-9 Level 3 +D.SWI3:: .rmb 2 +D.SWI2:: .rmb 2 +D.FIRQ:: .rmb 2 +D.IRQ:: .rmb 2 +D.SWI:: .rmb 2 +D.NMI:: .rmb 2 + +; +; Level 2 Block Map flags +; +NotRAM == 0b10000000 ; Block Not RAM flag +VidRAM == 0b00000100 ; Block is being used as Video RAM +ModBlock == 0b00000010 ; Module in Block +RAMinUse == 0b00000001 ; RAM Block in use flag + +; +; Service Dispatch Table special entries +; +IOEntry == 254 + + .endif