title AT -- loader for AT 12/22/90 prev: 9/6/89 .xlist OLDWAY equ 0 TESTING EQU 0 ; include atdefs.lib .comment ~ FILES: at.asm } AT loader at2.lib } at3.lib } atrsx.asm } AT RSX monitor atdefs.lib } equates & macros, for both z3libs.rel } library routines syslibs.rel } julian.slr PRODUCTION: ; ; for loader (AT.COM): assemble with global symbols: sg at/r,,,, link: slrnk80+ at/n/p:100/j/m:4,at,/e ; ; for rsx modules: ; set cpm22 equ 1 in ATrsx.asm ; assemble ATRSX to REL slrnk80+ ATrsx/r,ATrsx22,, ; link to PRL slrnk ATrsx22/k,ATrsx22/j,ATrsx22/e ; set cpm22 equ 0 in ATrsx.asm ; assemble ATRSX to REL slrnk80+ ATrsx/r,ATrsx30,, slrnk ATrsx30/k,ATrsx30/j,ATrsx30/e ; ; (optionally use global-labels option in assembler) ; assemble AT to REL slrnk80+ AT/r,,,, ; link in library routines and output with sym file slrnk AT/n/p:100/j/m:4,AT,/e ; load RSX PRL images into buffers zsid AT.com d1A00 d1E00 iATrsx22.prl r1900 iATrsx30.prl r1D00 g0 ; save completed file save 24h xAT.com ~ .xlist RSXBUFSIZE equ 400h ; space for prefix, code, & PRL bitmap ; definitions and equates maclib atdefs.lib ; External references .request z3libs,syslibs,julian extrn z3init,getmsg,getcl1,getcl2,getwhl extrn codend,cin,cout,print,pstr,crlf,phlfdc, pa2hc extrn hmovb,fillbc,compb extrn getud,putud,logud extrn envptr,codend,wait1ms extrn bcd2jul,jul2bin,jbcd2bn ; in JULIAN ;============== ; Start of code ;============== ; begin: jp start db 'Z3ENV' ; This is a ZCPR3 Utility db 1 ; External Environment Descriptor z3eadr: dw 0000 ; z3env ; ; ID area db 'AT',0 db vers ; decimal db vletter ; beta letter rept 16 db 0 ;; filler endm ; ; Configuration area ====================== db 'DEBUG>' debugflg:db YES ; db 'SILENT>' ; omit banner when AT is auto-invoked? dsilent:db no db 'SPEED>' ; larger value reduces # call to clock dspeed: db DELAYVALUE ; db 'WAITVALUE>' ; wait before aborting shell/ccp dwait: db 10h ; db 'BELL>' ; ring bell on errors? bellflg:db yes db '# RINGS>' ; # of times to RING. Must be >0 dringcnt:db DEFRINGCNT ; ;================================= ; start: ld (ccpstk),sp ; Set up local stack ld sp,ccpstk call z80test ; Ensure Z80 cpu call ckz33 ; check hl = installed addr call z3init ; Initialize the ZCPR3 ENV call initdseg ; Initialize data space call ckvers ; check CPM BDOS version call ckclk ; check for real-time clock call checkz3 ; Make sure Z34 facilities are available call gocheck call rsxhere? ; be sure rsx image is in this file call calctop ; find top of usable tpa (protecting CCP) call meminit ld de,rsxname ; see if rsx already in memory call findrsx call lockrsx call ckwhl ; wheel must be set, or AT autoinvoked call ckauto ; if auto-invoked ld a,0 jr c,2$ ld a,(dsilent) ; .. obey silent flag 2$: or a call z,signon ; Display signon message call ckcmdline ; if blank cmd line, get interactively ; & dispatch help and print options ld a,(newrsxflg) ld (mustwboot),a call dodu ; save/set drive/user call options ; help, other options requested? ; dispatch if able call ckauto ; if not auto jr c,newcmd ; ..accept new cmd ; autocmd: ; (A = code of cmd to execute) call doautocmd ; .. set up mcl and sked next alarm jr exit ; ..and exit ; newcmd: call parse ; else parse cmd line call putrsx ; install rsx call donewcmd ; install the command in rsx ; exit: call unlockrsx .testa needdu call nz,putud ; restore entering du .testa mustwboot ; if new rsx jp nz,0000 ; ..warmboot it ret2ccp:ld sp,(ccpstk) ; else return to ccp ret ; if wheel NOT set, ; abort unless auto-invoked ; ckwhl: call getwhl ; ok if wheel is ON jr nz,whlok call ckauto ; else must be auto cmd jr c,badwhl ld hl,(rsxptr6) ; and activated by the rsx ld de,autoOFF-6 add hl,de ld a,(hl) or a ld (hl),0 ; turn it off ret nz badwhl: jp exit ; exit quietly ; whlok: ld hl,(rsxptr6) ; turn off flag ld de,autoOFF-6 add hl,de ld (hl),0 ret gocheck: ld hl,goflag ld a,(hl) ld (hl),TRUE or a ret nz ; ; first execution ld hl,(xfcb.) ; copy AT.COM's fcb ld de,atfcb ld bc,36 ldir ld a,(atfcb+14) ; drive dec a ; A: = 0 ld (atdrive),a ; save binary value ld a,(atfcb+13) ; get du from ccp's fcb ld (atuser),a ; binary user ret ; goflag:db 0 ; static ; rsxname:db 'AT',0 ; ------------------------------ ; save and set Duu: ; dodu: call setdu ; put "Duu:" into RSX cmd. line ld a,TRUE ld (needdu),a call getud ; save current du ld bc,(atuser) ; log into AT.COM's du jp logud ; =============== Z-System CHECKS =============== ; z80test: sub a jp pe,sayz80 ret sayz80: ld de,z80msg ld c,9 call bdos jp exit z80msg: db 'Requires Z80!$' ; ckz33: ld a,h or l jr z,notz33 ld de,(z3eadr) sbc hl,de ex de,hl ; Point to ZCPR3 environment ret z notz33: .abort m.z33 ; ; Check for availability of message buffer, multiple command line, and ; external path. checkz3: call getextenv jr z,badz3 call getmsg ; Get address of message buffer jr z,badz3 ; If none, branch ld (zmsg.),hl ld de,7 add hl,de ld (zstat.),hl ; call getcl1 ; Check for multiple command line or a jr z,badz3 ; Branch if size is zero ld a,h or l jr z,badz3 ; Branch if no MCL ld (zmcl.),hl ; Otherwise, save the address inc hl inc hl ; ld e,(hl) ; get length of mcl buffer inc hl ld d,0 ; !! generalize later inc hl push hl add hl,de ; calc byte following buffer ld de,-5 add hl,de ld (zmclend),hl pop hl ld (cmdlin.),hl ; ld de,(envptr) ld hl,24h add hl,de .gethl ld (xfcb.),hl ld hl,2bh add hl,de ld a,(hl) ld (mhz),a ret badz3: call bellout call print defb cr,lf,' Aborting: inadequate ZCPR3 facilities.',cr,lf,0 jp ccpret ; Return to CCP. Don't set error number. ; (msg buffer may not exist). getextenv: ld bc,(z3eadr) ld hl,envtypOFF ; test for extended env. add hl,bc bit 7,(hl) ret z ld hl,ccpbaseOFF add hl,bc .getde ld (ccp_base),de inc hl inc hl ; skip size byte .getde ld (bdos_base),de inc hl inc hl .getde ld (bios_base),de ld hl,(0001) ; be sure a brain-damaged RSX dec hl ; has not changed 0001 dec hl dec hl xor a sbc hl,de jp nz,bad0001 dec a ; set NZ ; ; Set pointers for direct references to Z-System addresses ; setzptrs: .new ld de,(z3eadr) ld hl,z3mOFF ; Z-System message buffer add hl,de .gethl ld bc,3 ; cmd status byte add hl,bc ld (zcst.),hl ld bc,mzexstatOFF-3 ; ZEX status byte add hl,bc ld (zstat.),hl ld hl,z3qOFF add hl,de ld (zquiet.),hl ret ; get addr of BG flags, or a ptr to guaranteed NUL inside rsx ; ckbg: .new .testa cpm3flg ; if cp/m 22 ret nz ld hl,(0001) ; test for BGii in memory ld de,-15A8h add hl,de ld b,4 ld de,bgiistr call compb jr nz,2$ ld hl,(ccp_base) ; have BGii inc hl inc hl ld h,(hl) ; get hi byte ld l,81h ; point at addr in 'jp cksstate' .gethl ; get cksstate addr inc hl ; skip 'ld' op in 'ld hl,bgflg' .gethl ; get addr of bgflg jr 3$ ; no BGii, point the pointer at a guaranteed nul 2$: ld hl,(rsxptr6) ld de,scb_base-cfgdata + configOFF - 6 add hl,de 3$: ld (bgflg.),hl ret ; bgiistr:db 'BGii' ;---------------------------------------- ; Zero out the entire data segment and initialize the values ; inbuf and beglin to the codend address. initdseg: ld hl,dinit ; Zero out uninitialized data space ld de,dinit+1 ld bc,clearlen ld (hl),0 ldir call codend ; set ptr to database buffer ld (xbuf.),hl ret ; convert AT.COM's du to ascii ; setdu: ld hl,firstdu ; do this just first invocation ld a,(hl) ld hl,0 or a ret z ; (z means go was used ; but goflag already changed) ld a,(atdrive) add 'A' ld hl,acmd ; -> ascii buffer ld (hl),a ; ascii drive ld a,(atuser) ld b,'0' ; tens sed1: cp 10 jr c,ones inc b sub 10 jr sed1 ones: add '0' inc hl ; -> tens of ascii user buf ld (hl),b ; install ascii nn inc hl ld (hl),a ret ; firstdu:db TRUE ; =============== VERSION and RSX ROUTINES =============== ckvers: ld c,12 ; get BDOS version # call bdos cp 30h ld a,0 jr c,ckvers1 dec a ckvers1:ld (cpm3flg),a ; set CP/M Plus flag accordingly or a ret z ; ; move CP/M Plus PRL image into cp/m22 buffer for subsequent loading ; ld hl,rsxbuf3 ld de,rsxbuffer ld bc,RSXBUFSIZE ldir ; ; get scb base ; ld c,49 ld de,getscbpb call bdos ld l,0 ld (scb_base),hl ld l,0FAh ld a,(hl) ld (bankedflg),a ret ; getscbpb: db 3ah ; offset db 0 ; 'get' opcode ; ; Be sure rsx image is in fact in this file. ; rsxhere?: ld hl,(rsxlen) ld a,h or l ret nz call bellout call print db cr,lf,'RSX image missing!',0 ld c,ecRSXLOAD jp error ; ; Calculate base address of rsx. ; setrsxbase: ;??? ld hl,(lastch) ld bc,(rsxlen) ; subtract rsx length xor a sbc hl,bc ld l,a ; ??page-align the rsx ld (rsx_base),hl ret ; ; set flags and configure rsx ; setrsx: .new ; ; Transfer configurable data to contigous buffer ; Then move into the rsx. ; NOTE: Data structure must match RSX's exactly! ; transfer configuration bytes ; call ckbg ; set bgflg. ld a,(dspeed) ld (speed),a ld a,(dwait) ; must be > 0 or a jr nz,1$ inc a 1$: ld (dogdelay),a .testa cpm3flg ; if cp/m3 jr z,cpycnfig ; ld bc,6 ; ..transfer more parameters ld hl,(scb_base) ld l,bnkwbOFF ; save orig. op code ld a,(hl) ; at 2nd bios jp table ; ld (wboot_op),a ; (not used, but keep for alignment) ; add hl,bc ld a,(hl) ld (const_op),a ; add hl,bc ld a,(hl) ld (conin_op),a ; ; Copy configuration data into the rsx in high memory. ; cpycnfig: ld hl,(rsx_base) ; Get address of RSX code ld de,configOFF add hl,de ex de,hl ld hl,cfgdata ; Point to source of data ld bc,ncfgdata ; Number of bytes to move ldir ; Now the RSX has its data ret ;---------------------------------- ; ; This code patches the RSX into the BIOS and BDOS chains. First, it ; copies the original BIOS vectors into storage in the RSX. Then, it ; copies the vectors to the RSX routines into the BIOS. The RSX must ; store its data in compatible locations. ; ; Patch in the rsx header. ; patchrsx: .testa cpm3flg jr nz,patchplus ld bc,(rsx_base) ; it's page aligned ld hl,6+9 ; store original 0001 value add hl,bc ld de,(0001) .putde ld hl,6+12h+1 ;install addr of next rsx/bdos add hl,bc ld de,(0006) .putde ; push de ; save old target of 0006 ld hl,(bdos_base) ; if it is the BDOS ld de,0006 add hl,de pop de or a sbc hl,de jr z,setccp ; ..save BDOS entry as "next wb" ; ld hl,0 ; check for a Plu*Perfect Sys. standard call ckc3 ; rsx header. jr nz,notstd ld hl,3 call ckc3 jr nz,notstd ld hl,6 call ckc3 jr nz,notstd ld hl,15 call ckc3 jr nz,notstd stdrsx: inc de ; -> 2nd jp (jp wboot routine) inc de inc de jr setrsxwb ; notstd: ; ; non-P*PS rsx in memory. Must not execute its warmboot routine. ; So use ccp entry as target for "jp wb" in AT rsx. ; setccp: ld de,(ccp_base) inc de ; -> rsx+3 = warmboot entry inc de inc de setrsxwb: ld hl,6+0fh+1 ; install ptr to next wb or ccp add hl,bc .putde jr protect ; ; patch in cp/m 3 rsx ; patchplus: ; ld hl,(scb_base) ; get current protect addr ld l,0FFh ld h,(hl) ld l,0 ld de,(rsx_base) ; copy 6-byte serial number ld bc,6 ; into AT rsx ldir ; ; h= page of next rsx, d = page of AT rsx ld l,0Ch ; set (prev) in next rsx = ld e,0Ah+1 ; addr of AT rsx's (next) hi byte .putde ; ex de,hl ; hl-> AT rsx's hi byte of jp next ld (hl),d ; install addr of next higher rsx dec hl ; in AT rsx ld a,6 ld (hl),a ; ex de,hl ld hl,(scb_base) ; set new maxtpa in scb ld l,0FEh ld (hl),a ; 6 inc hl ld (hl),d ; ld hl,(0001) ; get next wboot addr inc hl ld e,(hl) ; from bios vector inc hl ld d,(hl) ; ld hl,(rsx_base) ; install in rsx ld l,towbOFF+1 ld (hl),e inc hl ld (hl),d ; protect: ld hl,(rsx_base) ; protect the rsx ld b,h ld c,l ld l,6 stop: ld (0006),hl ; header is now fully patched. ; Patch bios jumps. ; ; DON'T TRACE this ; swap: ld hl,biosvecOFF add hl,bc ; hl ->origwb jp tbl in rsx ld de,(1) ld b,3*3 ; 3 !! .testa cpm3flg ; if cp/m3 jr z,swplp inc hl ; ..start with const inc hl inc hl inc de inc de inc de ld b,2*3 swplp: ld a,(de) ld c,(hl) ld (hl),a ld a,c ld (de),a inc hl inc de djnz swplp .testa cpm3flg ret z ; ; for CP/M PLUS, patch secondary jp table ; .testa bankedflg ; is this a banked system? ret z ; ..no ; ; (opcode bytes previously saved at 'setrsx') ; ld bc,6 ld hl,(scb_base) ld l,bnkwbOFF ld a,21h ; set "ld hl,direct" opcode ld (hl),a ; for 2 places !! add hl,bc ld (hl),a ret ; ckc3: add hl,de ld a,(hl) cp 0C3h ret gohl: jp (hl) ; ; ;========================== ; LOAD AND RELOCATE THE RSX ;========================== ; ; calc top of AT data buffer: ; return: hl = highest byte in available tpa that preserves ccp ; calctop:ld hl,(ccp_base) push hl ld de,(0006) or a sbc hl,de pop hl jr c,ctop1 ; ccp is lower, protect it ex de,hl ; rsx is below ccp, protect it ctop1: dec hl ld (lastch),hl ret ;---------------------------------------- zreloc: ; Determine rsx page offset ld de,(rsx_base) ld a,d ; Get page address into A dec a ; Relocation offset is destination page - 1 ld (offset),a ; Save the offset value for relocator ; ; Now move code into place and relocate it ; ld hl,rsxbuffer+100h ; Point to RSX code again ld bc,(rsxlen); Get length of RSX code ; Copy unrelocated code to destination push bc ; Save code length on stack push de ; Save destination code address ldir ; After move, HL points to bit map ; Set up for relocation operation on code ld b,h ; Copy bit map pointer to BC ld c,l pop hl ; Pointer to code in HL pop de ; Code length in DE push bc ; Put bit map address on top of stack ; Modify code to run at relocation address load1: ld b,8 ; Counter for 8 bits in byte ex (sp),hl ; Swap bit map pointer to HL ld c,(hl) ; Get next byte of bit map inc hl ; Bump bitmap pointer ex (sp),hl ; Swap code pointer back to HL load2: xor a ; Preset offset to 0 rl c ; Move next relocation bit into carry flag jr nc,noff ; Leave A=0 if bit not set ld a,(offset) ; Otherwise get the offset value noff: add a,(hl) ; Add code to offset ld (hl),a ; ..and put result back inc hl ; Bump code pointer dec de ; See if all code relocated ld a,d or e jr z,reldone djnz load2 ; Loop through 8 bits jr load1 ; When done, fetch next relocation byte reldone:pop bc ; Clean up stack ret ;-------------------- ; Display signon message ; signon: ;; ld hl,(zquiet.) ; if quiet ;; ld a,(hl) ;; or a ;; ret nz ; ..omit msg call print db 'AT v.' db vers/10+'0','.',(vers mod 10)+'0',vletter,' ' db ' Z-System command scheduler' db ' ',0 call printdate jp saycrlf ret ; printdate: jp putdate ; Remove RSX ; remove: .new .testa newrsxflg jr nz,2$ .testa cpm3flg jr nz,3$ ld hl,(rsxptr6) push hl ld de,6 add hl,de call gohl call saycrlf pop hl push af ld de,13h-6h ; -> name add hl,de .gethl call pstr pop af ld hl,m.notrem jr nc,1$ 0$: ld hl,m.removed 1$: jp pstr 2$: .abort m.norsx ; 3$: ld de,0 ld c,2Bh call bdos ld hl,(rsxptr6) ; -> name ld l,10h ld b,10 5$: ld a,(hl) call cout inc hl djnz 5$ jr 0$ ; ; m.removed: db ' RSX removed.',0 m.notrem: db 'Can''t remove AT.',0 ; ; =============== ERROR ROUTINES =============== ; Ring bell if bellflg is set bellout: .testa bellflg ret z ld a,BELL jp cout bad0001: call print db cr,lf,'Incompatible RSX has altered (0001h)',0 jp error6 error6: ld c,ecECPERR ; ; Set up the ZCPR34 Error Handler. Error Code in C. ; error: ld hl,(zmsg.) ; Point to the Error code ld (hl),c ; Plug it in inc hl inc hl inc hl ; Point to cmdstatflg ld a,1110b ; Error mask or (hl) ld (hl),a ; Put it away ; ;; ld hl,(zquiet.) ; restore initial quiet flag ;; ld a,(quiet) ;; ld (hl),a ; ;============= ; EXIT TO CCP ;============= ccpret: jp exit ; abort: call pstr jp exit m.z33: db cr,lf,'Requires ZCPR v. >= 3.3',0 m.norsx:db cr,lf,'No rsx in memory',0 ; ; ========== HELP ========== ; getline: .new ld hl,m.syntax call pstr ld hl,m.prompt call pstr ld a,07Fh ld de,inbuf-2 ld (de),a ld c,10 call bdos ld hl,inbuf-1 ; nul-terminate it ld a,(hl) inc hl add a,l ld l,a jr nc,1$ inc h 1$: ld (hl),0 ret ; If no cmd line, get one interactively. ; Check for '/' options and dispatch to non-disk options only. ; ckcmdline: .new ld hl,inbuf call skipwhite ld a,(hl) ; if NO cmd line or a jr nz,1$ call getline ; .. go interactive jr ckcmdline 1$: cp '/' ; option flag? ret nz ; If not, return inc hl ld a,(hl) cp '/' jr nz,2$ call help jr 3$ 2$: and 5Fh cp 'P' ; /P prints cmds ret nz call showcmds 3$: jp exit ; ; check for disk-related options. ; dispatch those that require no further processing. ; options: .new ld hl,inbuf call skipwhite ld a,(hl) push af push hl call readclk ; get fresh time pop hl pop af cp '/' ; option flag? ret nz ; If not, return inc hl ld a,(hl) and 5Fh cp 'D' ; delete jr z,8$ cp 'P' ; /P prints cmds jr nz,1$ call showcmds jr jex2ccp 1$: cp 'R' jr nz,2$ call remove jr jex2ccp 2$: cp 'X' jr nz,3$ call deleteall jr jex2ccp 3$: cp 'L' jr nz,4$ call loadrsx jex: jp exit 4$: ret ; ; exit, but don't warmboot. ; jex2ccp:xor a ld (mustwboot),a jr jex ; delete specified cmd if "/D !x" ; 8$: call towhite call skipwhite call ckbangc ; and !x ret c call deletea jr jex2ccp ; ; ;Syntax: [+] [RING] [DAILY | WEEKLY | EVERY ] commandline m.syntax: db cr,lf,'Syntax:' db ' [+] [RING] [DAILY | WEEKLY | EVERY ] commandline' db cr,lf,0 ; m.prompt: db cr,lf,'enter>',0 ; Display built-in help screen and return to operating system help: .new call fixdefs ; set defaults in msg ld hl,m.syntax call pstr call print db cr,lf db ' = ' db 'AT command1 ! command2' db cr,lf db 'yr/mo/da hr:mi:se ' db 'AT RING -- rings (' ringtimes: db 'x) times' db cr,lf db ' mo/da hr:mi:se ' db 'AT "RING" -- executes RING.COM' db cr,lf db ' mo/da hr:mi ' db 'AT + ... execute + increment from now' db cr,lf db ' hr:mi:se ' db 'AT EVERY ... periodic' db cr,lf db ' hr:mi ' db 'use ... !x commandline to define cmd separator ''x''' db cr,lf,lf db ' AT /P -- Print scheduled commands',cr,lf db ' AT /L -- reLoad and schedule next command',cr,lf db ' AT /D !x -- Delete scheduled command X',cr,lf db ' AT /X -- eXpunge all commands, remove scheduler',cr,lf db ' AT /R -- Remove scheduler from memory',cr,lf ; db 0 ; ret ; make active default UPPER CASE, and opposile lower case ; in the big msg. fixdefs: ld a,(dringcnt) add '0' ld (ringtimes),a ret ; ;======================================== include at2.lib include at3.lib ;======================================== ; WORKING STORAGE AREA dstart: ; INITIALIZED DATA atuser: db 0 ; ud of AT.COM atdrive: db 0 ; atfcb: ds 36 ; copy of xfcb on 1st invocation ; ;---------------------------------------- ds 48 ; stack space ccpstk: ds 2 ; ccp stack ptr ;---------- ; Uninitialized data area - cleared to NUL ; startclear equ $ dinit: needdu: db 0 ; must restore du on exit? lastdelim: db 0 ptr: dw 0 outptr: dw 0 ; zmsg.: ds 2 lastch: ds 2 ; lowest char in data buffer ; zquiet.: ds 2 bitmap: ds 1 ; present offset bit's offset: ds 1 ; for relocator cpm3flg: ds 1 ; nz if CP/M plus ; rsx_base: ds 2 ; base (xx00h) of AT RSX monitor ccp_base: ds 2 ; base of CCP bdos_base: ds 2 ; base of BDOS bios_base: ds 2 ; base of BIOS ; ;------------------ newrsxflg: db 0 mustwboot: db 0 rsxptr6: dw 0 ; base of rsx + 6 xbuf.: dw 0 ; page-aligned buffer at codend ; savero: db 0 ; orig. fcb read-only byte xfcb.: dw 0 ; z34 external fcb recs: db 0 ; # of records to write ; cur.yr: cur.se equ cur.yr+5 clkbuf: ds 6 ; current time ; ;---------- ; ; This data block is copied into the RSX to configure it ; The RSX data area must agree EXACTLY with this structure. ; CFGDATA: ; scb_base: dw 0000 ; ptr to CP/M Plus scb, or NUL in cp/m 2 bankedflg: db 0 ; NZ if banked system ; ; orig. values of CP/M Plus 2nd bios JP table opcodes ; wboot_op: db 0 const_op: db 0 conin_op: db 0 ; dsclk.: dw 0 ; ptr to Datestamper clock zmcl.: nxtchr.: dw 0 cmdlin.: dw 0 zmclend: dw 0 zcst.: dw 0 zstat.: dw 0 mhz: db 0 ; bgflg.: dw 0 ; ptr to bgflag byte, or to NUL byte dogdelay: db 01 ; static, configurable lowdog: db 0 dog: dw 0 ; watchdog count ; CLEARLEN equ $-startclear ; ; ========================================== ; ; update area ; updatebuf: updateOFF equ $-cfgdata + configOFF pendingflg: db 0 ; in lock: db 0FFh ; exactly count: dw DELAYVALUE*256+0 ; this speed: db DELAYVALUE ; order ringflg: ringcnt: db 0 ; ringflg, # of rings dueflg: db 0 ; set by rsx autoOFF equ $-cfgdata + configOFF autoflg: db 0 ; set nz by rsx ; atime: db 89h,08h,01h,23h,00h,00h ; the alarm date/time atimej equ atime+1 ; julian date atcmd: db ';' acmd: db 'M00:AT !' acode: db ' ',0 atcmdlen equ $-atcmd ; codeOFF equ acode - updatebuf + updateOFF updatelen equ $-updatebuf ; ========================================== NCFGDATA equ $ - CFGDATA .xlist ;---------- ; loader data area ; x.yr: db 0 x.mo: db 0 x.da: db 0 x.hr: db 0 x.mi: db 0 x.se: db 0 ; ;------------------ nextcode: db 'A' tokbuf: ds 80h outbuf: ds 100h ; ; space out to page boundary spare: ds 100h - ((spare-begin) and 00ffh ) ; dataend: ; End of data to be zero-filled ; ; .list ; Put the RSX and its prl bitmap here ; rsxbuffer:: rsxlen equ $+1 db 0,0,0 ; nuls for missing-PRL testing db '<<-- CP/M 2.2 RSX BUFFER --------' rsxbl0 equ $-rsxbuffer ds RSXBUFSIZE - rsxbl0 ; ; And the CP/M Plus RSX here ; rsxbuf3:: db 0,0,0 db '<<-- CP/M PLUS RSX BUFFER --------' rsx3bl0 equ $-rsxbuf3 ds RSXBUFSIZE - rsx3bl0 ; .comment ~ Structure of one AT command in database. ; xbuf: ds 1 ; code (A...Z) ds 1 ; ringflag (0, count) xtypeOFF equ 2 ds 1 ; type (0,D,W,other) xincOFF equ 3 change this in ATDEFS.LIB if needed ds 6 ; incr datespec xtimeOFF equ 6+3 change this in ATDEFS.LIB if needed ds 6 ; datespec codebytes equ $ - code MAXCMDLINE equ 256 - codebytes ds MAXCMDLINE ; the command ~ ;--------------------------- ; IF2 .prtval 16,,100+rsxbuffer-begin, .prtval 16,,100+rsxbuf3-begin, pending_offset equ pendingflg-cfgdata+configOFF ENDIF END