; DK DL ; B1 C0 D0 C1 D0 E0 ;DKDR.V 1 2 3 RK11 Driver ;DLDR.V 1 2 3 RL11 Driver ;INIT.V 1 2 3 1 2 3 Init engine ;BTCH.V 1 2 1 2 Batch engine ;TERM.V 1 2 3 1 2 3 Terminal Engine ;ROOT.V 1 2 3 1 2 3 OS Monitor ;END.V 1 1 Monitor End .MACRO .ADDR REG, SKIP, ADDR .IF IDN ,<-(SP)> PUSH PC LET TOP := TOP + ADDR-. .IFF LET REG := PC + ADDR-. .ENDC .ENDM .ADDR .MACRO .ADDR2 REG, SKIP, ADDR, ?L .IF IDN ,<-(SP)> PUSH ADDR-L LET TOP := TOP + PC .IFF LET REG := ADDR-L + PC .ENDC .EMITL .ENDM .ADDR2 .MACRO .ADDR3 REG, SKIP, ADDR .IF IDN ,<-(SP)> PUSH ADDR LET TOP := TOP + PC - #. .IFF LET REG := ADDR + PC - #. .ENDC .ENDM .ADDR3 .MACRO .ADDR4 REG, SKIP, ADDR .IF IDN ,<-(SP)> PUSH PC LET TOP := TOP - #. + ADDR .IFF LET REG := PC - #. + ADDR .ENDC .ENDM .ADDR4 ; Relative .MACRO LETR DST, EQOP, SRC LET DST EQOP SRC + S$YREL .ENDM LETR ; Overlay Relative .MACRO LETOR DST, EQOP, SRC LET DST EQOP SRC + S$YREL-OVLREG .ENDM LETOR ; Patched Relative .MACRO LETPR DST, EQU, SRC, IDX .EMIT > LET DST EQU SRC .ENDM LETPR ; .SBTTL XXDP API ; ; I've renamed the system services to reflect their functional role within the monitor ; The original service names are listed in the MACROM column ; ; EMT XXDPP MACROM Function ; --- ------ ------ -------- ; 000 GetLin GCmdSt Get terminal/batch command line ; 001 ParFld GToken Parse next command line field ; 002 TypMon PutLin Type (relocated) monitor message ; 003 TypMsg TypMsg Type (unrelocated) message ; 004 PutChk PutChr Display character, check for Ctrl/C ; 005 GetAvl CKybd Check keyboard character available ; 006 GetChk GetChr Get character and check for Ctrl-C ; 007 Newlin CrLf Display newline ; 010 PutTab Tabs Display tab ; 011 ParOct GetNum Parse octal number ; 012 OpnFil Open Open file ; 013 CloFil Close Close file ; 014 LoaFil Load Load LDA-format program ; 015 ReaWrd GetWrd Input word from file ; 016 ReaByt GetByt Input byte from file ; 017 PutCha OneChr Display character ; 020 ReaNxt NxtBlk Read next sequential block ; 021 ReaBlk BkRead Read any block ; 022 SetAbt SetErr Set abort location ; 023 JmpAbt Error Jump to abort location ; 024 CmpSpc CmpNam Compare filespecs ; 025 SpcAsc UPkNam Convert Rad50 to ascii ; 026 SetLin KSwitch Set terminal buffer address/length ; 027 GetDat Date Get the system date ; 030 OctAsc IToA Convert octal to ascii ; 031 GetDev Default Get system device information ; 032 RptFld RToken Repeat the current field ; 033 LptMod LinePtr Write output to printer ; 034 TerMod NoPrtr Restore terminal output ; 035 LoaSup AutoLoad Load supervisor program ; 036 ParDec GetDec Parse decimal number ; 037 PadTer Fill Write nulls to the terminal ; 040 PshBat PutScp Set batch mode ; 041 PopBat CChain Set terminal mode ; 042 GetCom Comm Get monitor information common ; 043 GetDrv Rdrive Copy the system driver ; 044 TypBrk FrcTyp Type breakthrough message .MACRO API NAM COD .MACRO NAM .EMIT .ENDM .ENDM API API GetLin <^O<0>> ; Get terminal/batch command line API ParFld <^O<1>> ; Parse next command line field API TypMon <^O<2>> ; Type (relocated) monitor message API TypMsg <^O<3>> ; Type (unrelocated) message API PutChk <^O<4>> ; Display character, check for Ctrl/C API GetAvl <^O<5>> ; Check keyboard character available API GetChk <^O<6>> ; Get character and check for Ctrl-C API NewLin <^O<7>> ; Display newline API PutTab <^O<10>> ; Display tab API ParOct <^O<11>> ; Parse octal number API OpnFil <^O<12>> ; Open file API CloFil <^O<13>> ; Close file API LoaFil <^O<14>> ; Load LDA-format program API ReaWrd <^O<15>> ; Input word from file API ReaByt <^O<16>> ; Input byte from file API PutCha <^O<17>> ; Display character API ReaNxt <^O<20>> ; Read next sequential block API ReaBlk <^O<21>> ; Read any block API SetAbt <^O<22>> ; Set abort location API JmpAbt <^O<23>> ; Jump to abort location API CmpSpc <^O<24>> ; Compare filespecs API SpcAsc <^O<25>> ; Convert Rad50 to ascii API SetLin <^O<26>> ; Set terminal buffer address/length API GetDat <^O<27>> ; Get the system date API OctAsc <^O<30>> ; Convert octal to ascii API GetDev <^O<31>> ; Get system device information API RptFld <^O<32>> ; Repeat the current field API LptMod <^O<33>> ; Write output to printer API TerMod <^O<34>> ; Restore terminal output API LoaSup <^O<35>> ; Load supervisor program API ParDec <^O<36>> ; Parse decimal number API PadTer <^O<37>> ; Write nulls to the terminal API PshBat <^O<40>> ; Set batch mode API PopBat <^O<41>> ; Set terminal mode API GetCom <^O<42>> ; Get monitor information common API GetDrv <^O<43>> ; Copy the system driver API TypBrk <^O<44>> ; Type breakthrough message ; ; Memory layout ; ; kw memory kw image disk pointer label ; --------- -------- ---- ------- ----- ; 28 160000 4 20000 S$YTOP: X$XTOP: I/O page ; 157777 17777 X$XLIM: Address limit ; 157xxx 17xxx X$XDRV: Driver ; 27 154000 3 14000 X$XSTA: Static ; 152000 12000 12 S$YPER: X$XPER: Permanent ; 26 150000 2 10000 10 S$YTRA: X$XTRA: Transient ; 146000 06000 06 X$XBAT: Batch ; 25 144000 1 04000 X$XHGH: Init high ; 141000 01000 01 X$XINI: Init and MFD ; 24 140000 0 00000 00 S$YREL: X$XBOT: Boot ; 137000 S$YSUP: X$XSUP: Supervisor ; ; Monitor region block numbers ; ; MOBOO. =: ^O ; boot ; MOMFD. =: ^O<1> ; MFD block ; MOBAT. =: ^O</1000> ; batch area block ; MOTRA. =: ^O</1000> ; transient area block ; MOCLI. =: ^O</1000> ; cli area block ; OVLREG =: ^O<4000> ; Overlay Region size - offset for relative mode relocation ; ; Low memory syscom variables ; $JSW =: ^O<52> ; .WORD job status word SCMAN$ =: ^O<1> ; Manual control flag (SMI/CMI) ;SCXMA$ =: ^O<10000> ; XM-monitor app (XXDP V2) DEFSTRT =: ^O<200> ; default LDA start address, patched to default "JMP @#2100" by LoaFil ; ; S$YCFG - hardware config flags ; SYLTC$ =: ^O<1> ; line clock present SYKWP$ =: ^O<2> ; programmable clock present SYLPT$ =: ^O<4> ; line printer present SYNUB$ =: ^O<10> ; NoUniBus SY50H$ =: ^O<20> ; 50 Hertz clock ; ; Command line structure ; CL.PTR =: ^O<0> ; command line base pointer CL.LEN =: ^O<2> ; command line length CLLEN. =: ^O<54> ; default command line length CLAVL. =: ^O<52> ; available characters ; ; Device information block ; DV.NAM =: ^O<0> ;"XX" ; driver name DV.UNI =: ^O<2> ;"0" ; device unit DV.MED =: ^O<3> ;XXMED. ; media code DVRK5. =: ^O<2> ;2 ; DK: disk (RT-11 RK:) DVRL1. =: ^O<14> ;12. ; DL: disk ; ; Driver interface ; DR.BUF =: ^O<-26> ; 752 ; buffer pointer DR.ENT =: ^O<-24> ; 754 ; directory entry number in segment DR.FNM =: ^O<-22> ; 756 ; rad50 filename DR.SBL =: ^O<-14> ; 764 ; first file block DR.OPN =: ^O<-12> ; 766 ; open file function DR.RST =: ^O<-10> ; 770 ; read monitor function DR.TRA =: ^O<-6> ; 772 ; transfer function DR.DEV =: ^O<-4> ; 774 ; get device info function DR.UNI =: ^O<-2> ; 776 ; device unit DR.STS =: ^O<-1> ; 777 ; operation status DR.CSR =: ^O<0> ; 000 ; CSR address IO.WCT =: ^O<2> ; 002 ; word count IO.BUF =: ^O<4> ; 004 ; buffer address IO.BLK =: ^O<6> ; 006 ; block number IO.UFD =: ^O<10> ; 012 ; (user file) directory start block IO.SPC =: ^O<12> ; 014 ; ascii filespec ; ; DR.STS - driver status ; DRSUC. =: ^O<0> ; an absence of errors DRTRA. =: ^O<-1> ; DR.TRA - transfer error DRFNF. =: ^O<1> ; DR.OPN - file not found