;======================================================================= ; ; ; E D Z C M ; ; An NZCOM ZCM System Descriptor File Editor ; ; by ; Terry Hazen ; 21460 Bear Creek Road ; Los Gatos CA 95030 ; ; Voice.......... (408) 354-7188 ; Zee-Machine.... (408) 245-1420 ; Ladera Znode... (213) 670-9465 ; ;======================================================================= ; ; Revision history ; ---------------- ; ; 11/08/91 Initial release. ; v1.0 - Terry Hazen ; ; ;----------------------------------------------------------------------- ; ; EDZCM is an NZCOM ZCM descriptor file editor to help NZCOM users ; create customized NZCOM systems. It can edit a specified existing ; ZCM file (filename.ZCM) or can create a ZCM file from the environment ; (Z3ENV.ZCM). The edited file may be saved to the same or a different ; filename. ; ;======================================================================= ; ; Equates ; vers equ 10 ; Version int equ 01 ; Internal revision month equ 11 ; Revision date day equ 08 year equ 91 ; on equ 0ffh off equ 0 ; ; System equates ; fcb equ 5ch fcb2 equ 6ch cmdbuff equ 80h ; ; ASCII character equates ; null equ 0 ; Null ctrla equ 'A'-40h ; Control-A ctrlc equ 'C'-40h ; Control-C ctrld equ 'D'-40h ; Control-D ctrle equ 'E'-40h ; Control-E ctrlf equ 'F'-40h ; Control-F ctrlh equ 'H'-40h ; Control-H ctrlq equ 'Q'-40h ; Control-Q ctrls equ 'S'-40h ; Control-S ctrlt equ 'T'-40h ; Control-T ctrlw equ 'W'-40h ; Control-W ctrlx equ 'X'-40h ; Control-X ctrly equ 'Y'-40h ; Control-y bell equ 7 ; Bell bs equ 8 ; Backspace tab equ 9 ; Tab lf equ 10 ; Line feed cr equ 13 ; Carriage return eof equ 1ah ; EOF space equ ' ' ; Space esc equ 27 ; Escape del equ 127 ; Delete ; ; BDOS equates ; bdos equ 5 srchf equ 17 ; Search first srchn equ 18 ; Search next getdrv equ 25 ; Get logged drive getdpb equ 31 ; Get DPB gsusr equ 32 ; Get/set user ; ; Program equates ; ndxrec equ 19 ; Length of index record blen equ 72 ; Length of horizontal graphics line lcol equ 26 ; Column to start label display fcol equ 34 ; Column to start address field display scol equ 40 ; Column to start size 1 field display menuln equ 23 ; Line to start menus ; ; Request library routines ; .request zplib ; Special routines ext vprint,vpstr,gotoxy,gxymsg,@parsv .request zslib ext tline .request vlib ext z3vinit,cls,tinit,dinit ext stndout,stndend,curon,curoff ext grxon,grxoff,@ghl .request z3lib ext z3log,zprsfn .request syslib ext $memry,setdma,retud ext f$exist,f$open,f$make,f$appl ext f$close,f$read,f$write ext capin,capstr,cout,phl4hc ext compb,fillb,acase3,isctrl ext eval10,eval16,mhl4hc,madc,mafdc ext ssbini,sort,mulhd,hmovb,andhd ; ; Program start ; edzcm: jp start db 'Z3ENV' ; This is a ZCPR3 Utility db 1 ; External environmental descriptor z3eadr: dw 0 ; Pointer to environment ; ; Display sign-on banner ; banner: call vprint name: db 'EDZCM ' ; Default program name db 'v' db vers/10+'0','.',vers mod 10+'0' dc ' - ' ret ; ; Display help screen ; help: call banner ; Display program name call desc ; Display description call vprint db 'Editor',cr,lf db 'Syntax:',cr,lf tsp: dc ' ' call dispfn ; Display current program name call vprint db ' [[dir:]zcmfile[.ZCM]]' db cr,lf,lf db ' If no filename is specified, the system configuration' db cr,lf db ' information from the ZCPR3 environment will be displayed.' db cr,lf db ' It may then be edited and/or saved as a file.' dc cr,lf ret ; ; Start of program ; start: ld (stack),sp ; Save system stack pointer ld sp,stack ; Local stack ld hl,exit ; Save exit routine address push hl ; on the stack ; ld ix,(z3eadr) ; Get env address ld a,(ix+3) cp 'Z' ; Quick Z-system check jr z,start0 ; Ok ; ld c,9 ; Display error message and exit ld de,z3msg jp bdos ; z3msg: db bell,'Requires ZCPR3!$' ; start0: xor a ; Initialize data area ld hl,data ld b,datalen call fillb ; ld hl,(z3eadr) ; Get Z3env address call z3vinit call tinit ; Initialize terminal ; ld hl,(z3eadr) ld de,90h add hl,de ; Point to start of arrow keys ld (upkey),hl ; Move address to buffer ; ld l,(ix+24h) ; HL=efcb address ld h,(ix+25h) inc hl ; Skip to filename ld a,(hl) or a ; Anything there? jr z,start2 ; ld (fnam),hl ; Yes, save it ; ; Parse FCB for help request ; start2: ld hl,fcb+1 ; Point to first character ld a,'/' cp (hl) ; Help request? jp z,help ; Yes inc hl ; Point to next cp (hl) ; Help request? jp z,help ; Yes ; ; Check file spec ; call defdr ; Save default drive for du:filename msg ld a,(fcb+1) ; Get first filename byte cp ' ' ; Filename? jp z,getenv ; No, go fill edit buffer from the env ; ; Check infile file type ; ld de,fcb ; Point to infile fcb call movdft ; Check filetype, use default if none call z3log ; Log into DU call f$exist ; Look for file jr nz,readf ; File found ; ; File not found ; fnferr: call vprint dc cr,lf,'File ' ld de,fcb ; Display filename call pdu call vprint dc ' Not Found',bell,cr,lf ret ; ; Error in reading file ; ferr: call vprint dc cr,lf,'File Error',bell,cr,lf ret ; readf: call f$open ; Open file jr nz,ferr ; ; Read file ; ld hl,($memry) ; Get pointer to start of file buffer ld de,fcb ; Point to fcb ld b,5 ; Read in 5 records ; rdloop: call setdma call f$read ; Read file into cmdbuf jr z,rdl0 ; Good read ; rra ; Check for eof ret c ; Done jr ferr ; Read error ; rdl0: push de ; Save fcb pointer ld de,128 ; Bump dma by one record add hl,de pop de djnz rdloop ; ; Do quick check for proper file contents ; ld hl,($memry) ; Point to input file buffer ld de,5 ; Offset to 'CBIOS' add hl,de ld de,cbioslab ld b,5 call compb ; Check for 'CBIOS' jr nz,ferr ; Input file error ; prsf: call parsfil ; Read input file into buffer jp initndx ; ; Load file buffer with system element data from environment ; getenv: ld a,on ; Set environment flag ld (envflg),a ; ld hl,(z3eadr) ; Point to environment ld de,8 add hl,de ld a,(hl) ; Get environment type bit 7,a jr nz,ge0 ; enverr: call vprint dc cr,lf,'Requires extended environment',bell,cr,lf ret ; ge0: ld de,f$envtyp call ldhbyte ; Load envtyp ; push hl ; Save environment pointer ld hl,(z3eadr) ; Point to environment inc hl ; Get CBIOS address ld de,f$cbios call ldaddr ; Load CBIOS address pop hl ; Restore environment pointer ; ld de,f$expath call ldaddr ; Load expath address ld de,f$expaths call ldhbyte ; Load expath size ; ld de,f$rcp call ldaddr ; Load rcp address ld de,f$rcps call ldhbyte ; Load size ; ld de,f$iop call ldaddr ; Load iop address ld de,f$iops call ldhbyte ; Load iop size ; ld de,f$fcp call ldaddr ; Load fcp address ld de,f$fcps call ldhbyte ; Load fcp size ; ld de,f$z3ndir call ldaddr ; Load z4ndir address ld de,f$z3ndirs call ldhbyte ; Load z3ndir size ; ld de,f$z3cl call ldaddr ; Load z3cl address ld de,f$z3cls call ldhbyte ; Load z3cl size ; ld de,f$z3env call ldaddr ; Load z3env address ld de,f$z3envs call ldhbyte ; Load z3env size ; ld de,f$shstk call ldaddr ; Load shstk address ld de,f$shstks call ldhbyte ; Load number of shstk elements ld de,f$shsize call ldhbyte ; Load shstk element size ; ld de,f$z3msg call ldaddr ; Load z3msg address ; ld de,f$extfcb call ldaddr ; Load extfcb address ; ld de,f$extstk call ldaddr ; Load extstk address ; ld de,f$quiet call ldhbyte ; Load quiet flag ; ld de,f$z3whl call ldaddr ; Load z3whl address ; ld de,f$speed call ldhbyte ; Load speed ; ld de,f$maxdrv call ldhbyte ; Load maxdrv ld de,f$maxusr call ldhbyte ; Load maxusr ld de,f$duok call ldhbyte ; Load duok flag ; ld de,f$crt call ldhbyte ; Load crt selection ld de,f$prt call ldhbyte ; Load prt selection ; ld de,f$cols call ldhbyte ; Load number of columns ld de,f$rows call ldhbyte ; Load number of lines ld de,f$lins call ldhbyte ; Load number of text lines ; ld de,f$drvec call ldaddr ; Load drvec ; ld de,f$spar1 call ldhbyte ; Load spare1 ; ld de,f$pcol call ldhbyte ; Load number of columns ld de,f$prow call ldhbyte ; Load number of lines ld de,f$plin call ldhbyte ; Load number of text lines ld de,f$form call ldhbyte ; Load form feed flag ; ld de,f$spar2 ; Load spares 2-5 call ldhbyte ld de,f$spar3 call ldhbyte ld de,f$spar4 call ldhbyte ld de,f$spar5 call ldhbyte ; ld de,f$ccp call ldaddr ; Load ccp address ld de,f$ccps call ldhbyte ; Load ccp size ; ld de,f$dos call ldaddr ; Load dos address ld de,f$doss call ldhbyte ; Load dos size ; ld de,f$bio call ldaddr ; Load bio address ; ld de,37h ; Skip shell data add hl,de ld de,f$pubdrv call ldhbyte ; Load ZRDOS pubdrv ld de,f$pubusr call ldhbyte ; Load ZRDOS pubusr ; ; Initialize order tables ; initndx:ld hl,aorder ; Point to order table ld de,ssb ; Point to SSB call ssbini ; Init order table call decsiz ; Convert size fields to ASCII decimal ; ; Display header ; call cls ; Home cursor and clear screen call banner ; Display banner call vprint ; Start standout and header display dc 'Displaying ' ld a,(envflg) ; Check for environment or a jr nz,dif ; Yes, skip file message ; call desc ; Display description ; dif: call dspinfn ; Display infile name or 'Env..' call stndend ; End standout call gline ; Draw graphics line ; dsply: call display ; Display screen ; ; Display menu, get command and process it ; menuin: call gxymsg ; Display main menu db menuln,1,4 db ' ' db 'E ',1,'Edit ZCM',2,' ' db 'R ',1,'Recalculate ZCM',2,' ' db 'W ',1,'Write File',2,' ' dc 'ESC/Q/X ',1,'Quit ?',bs,2 ; newin: call capin ; Get command ld de,mtbl ; Point to menu table call acase3 jr dsply ; Return from matched routines ; mtbl: db 8 ; Number of cases dw newin ; No match, try again db 'E' dw edit ; Edit ZCM elements db 'R' dw recalc ; Recalculate ZCM elements db 'W' ; Write file dw wrtfil db 'Q' ; 'Q', 'X', ESC and ^C are all dw eexit ; alternate exit commands db esc dw eexit db 'X' dw eexit db ctrlc dw eexit db 'R'-40h ; (^R to refresh display) dw dsply ; ; Position cursor at menu line and erase rest of screen before exit ; eexit: call gxymsg db menuln,1,4,0 ; ; Main exit point ; exit: call dinit ; Deinitialize terminal ld sp,(stack) ; Restore CCP stack ret ; And return to system ;----------------------------------------------------------------------- ; ; Parse input file at ($memry) into output file buffer at zcmbuf: ; parsfil:ld hl,($memry) ; Point to file input buffer ld de,zcmbuf ; Point to our file buffer ; pflp: ld a,(hl) cp eof ret z ; Quit at end of file ; ld b,d ; File buffer pointer to BC ld c,e call eval16 ; Get hex value push hl ; Save input file pointer ex de,hl ; Hex value to HL ld d,b ld e,c ; Restore file buffer pointer call mhl4hc ; Move value pop hl ; Restore input file pointer ex de,hl call skip ; Skip in file buffer ex de,hl call skip ; Skip in input file buffer jr pflp ; Loop ; ; Display input filename or 'Environment' ; dspinfn:call stndout ld de,fcb ; Point to infile name ld a,(envflg) ; Check if we're editing env data or a jr z,pdu ; Display infile name ; call vprint dc 'NZCOM Environment' ret ; ; Display description ; desc: call vprint ; Display file prefix message dc 'NZCOM ZCM System Descriptor File ' ret ; ; Display outfile drive and user ; DE=FCB pointer ; pdu: ld a,(de) ; Get drive (A=1) add '@' ; Make it ASCII call cout ; Display it ld hl,13 ; Offset to user add hl,de ld a,(hl) ; Get user and 7fh ; Filter high bit ld b,'0'-1 ; Set counter cp 10 ; Single digit? jr c,pdu1 ; Yes ; pdu0: inc b sub 10 ; Keep subtracting until CARRY set jr nc,pdu0 ; add a,10 ; Get remaining units digit back ld c,a ; Save it ld a,b ; Tens digit call cout ; Display it ld a,c ; Restore units digit ; pdu1: add a,'0' ; Make ASCII call cout ld a,':' call cout ex de,hl ; Fcb pointer in HL inc hl ; Point to filename push hl ; Save pointer ld b,8 call dfnlp ; Display filename ; ld a,'.' call cout ; pop hl ; Restore filename pointer ld de,8 ; Point to filetype add hl,de ld b,3 call dfnlp ; Display filetype jp stndend ; End standout ; ; Recalculate ZCM file ; recalc: ld hl,i$cbios ; Get CBIOS address call getaddr ld e,0 ; Ignore wboot offset dec de ; One less to make sure UMA follows CBIOS ld hl,i$uma call putaddr ; Poke it ; ld hl,i$bio ; Get NZBIOS address call getaddr dec de ; Make sure DOS follows NZBIOS ld hl,i$dos call putaddr ; Move it to DOS address field dec de ; Make sure CCP follow it ld hl,i$ccp call putaddr ; Move it to CCP address field call resort ; And sort index accordingly ; ld hl,i$cbios ; Point to CBIOS index record call getaddr ; Get address in DE ld e,0 ; Ignore wboot offset call ndxord ; HL=order table pointer ; ; Enter with B=CBIOS order index ; DE=element address ; HL=element order table pointer ; dec b ; Don't do CBIOS ; reclp: push hl ; Save order table pointer push de ; Save higher element address call lhlhl ; Get index record pointer call lastsz ; DE=lower element size pop hl ; HL=higher element address or a ; Clear CARRY sbc hl,de ; Low address=high address-low size ex de,hl ; DE=lower element address pop hl ; Restore order table pointer inc hl ; Point to next lowest element inc hl push hl ; Save new order table pointer call lhlhl ; Get index record address call putaddr ; Move address to field pop hl ; HL=new order table pointer djnz reclp ; ; Make sure NZBIOS, DOS, CCP are on page boundaries ; ld hl,i$bio ; Point to index record call getaddr ; Address in DE ld a,e ; Must be on page boundary or a jp z,resort ; Done ; call adjaddr ; ld hl,(i$bio+1) ; Get hex size ld de,80h ; Add a record add hl,de ld (i$bio+1),hl ; Save new size ; ld hl,m$bios+2 ; Point to last decimal record digit inc (hl) ; Bump it one also ; ld hl,i$dos ; Adjust DOS address call adjaddr ; ld hl,i$ccp ; Adjust CCP address call adjaddr jp resort ; Resort records ; ; Display main screen ; display:call tpa ; Get TPA from ZCM file, poke in msg call curoff ; Turn off cursor call gxymsg ; Initialize cursor position db 2,1,0 call initrow ; Initialize row position ld hl,aorder ; Point to order table ld b,17 ; Set counter ; displp: call incrow ; Increment current row push hl ; Save order pointer push bc ; Save counter call lhlhl ; Point to index record inc hl ; Point to size push hl ; Save size pointer inc hl ; Point to message address inc hl push hl ; Save index pointer call lhlhl ; Point to message ld b,26 ; Set counter call bpstr ; Display message and space to next call bspace ; ld b,7 ; Set counter call bpstr ; Display label and space to field call bspace ; pop hl ; Restore index pointer inc hl ; Point to address field length inc hl push hl ; Save pointer call dispf ; Display element address call twosp ; Add 2 spaces ; pop hl ; Restore pointer inc hl ; Point to size1 length byte inc hl inc hl call dispsz ; Display size 1 field jr z,dispdun ; Nothing there ; inc hl ; Point to size2 length byte inc hl call dispsz ; Display size 2 field ; dispdun:ld b,12 ; Erase any size message text call bspace ; pop hl ; Restore size pointer pop bc ; Restore counter ld a,68 ; Size column call gocol call lhlhl ; Get hex size call phl4hc ; Display it ld a,'h' ; And display suffix call cout pop hl ; Restore order table pointer inc hl ; Point to next inc hl djnz displp ; call gline call vprint ; Display TPA size db cr,lf,' Effective TPA: ' s$tpa: dc ' . k' ; ; Draw horizontal line ; gline: call crlf ; Start new line call curoff ; Turn cursor off call grxon ; Turn graphics on ld a,(@ghl) ; Horizontal line character jr nz,gl0 ; If graphics supported - ; ld a,'-' ; Else no graphics, so use dash ; gl0: ld b,blen ; Length of line call brepeat call grxoff ; Turn graphics off jp curon ; Restore cursor ; ; Initialize row position ; initrow:exx ld hl,row ld (hl),2 ; Set starting row - 1 exx ret ; ; Increment current row ; incrow: exx ld hl,row ; Increment current row inc (hl) exx ret ; decrow: exx ld hl,row ; Decrement current row dec (hl) exx ret ; ; Load hex byte as 3 ASCII decimal characters ; Entry: HL = source, DE = destination ; lddbyte:ld a,(hl) ; Get byte in A inc hl ; Point to next jp madc ; Move byte to DE ; ; Load hex byte as 4 ASCII hex characters ; Entry: HL = source, DE = destination ; ldhbyte:push hl ; Save env pointer ld l,(hl) ; Get byte in HL ld h,0 call mhl4hc ; Move byte to DE pop hl ; Restore pointer inc hl ; Point to next ret ; ; Load hex address as 4 ASCII hex characters ; Entry: HL = source, DE = destination ; ldaddr: push hl ; Save env pointer ld a,(hl) ; Get address in HL inc hl ld h,(hl) ld l,a call mhl4hc ; Move address to DE pop hl ; Restore pointer inc hl ; Point to next inc hl ret ; ; Skip to next ascii hex string ; skip: inc hl ; Skip first character ; skiplp: ld a,(hl) ; Get character and 7fh ; Filter it inc hl ; Point to next cp tab ret z ; We're done cp lf ret z ; We're done cp ' ' jr nz,skiplp ; No, keep skipping ; cp ' ' ; Check if next character is space jr z,skiplp ; Yes, keep skipping ret ; We're done ; ; Return hex address of element ; Entry: HL=index pointer ; Exit: DE=hex address ; Uses: AF,DE ; getaddr:push hl ; Save index pointer ld de,adroff+1 ; Skip length byte add hl,de ; Point to address call lhlhl ; Get it in HL call eval16 ; Hex address in DE pop hl ; Restore index pointer ret ; ; Adjust address to page boundary ; adjaddr:call getaddr ; Get address in DE ld e,0 ; Adjust address and fall thru ; ; Move hex address to element ASCII field ; Entry: HL=index pointer ; DE=hex address ; Uses: None ; putaddr:push hl ; Save index pointer push de ; Save hex address push de ld de,adroff+1 ; Skip length byte add hl,de ; Point to field address ld e,(hl) ; Get it in DE inc hl ld d,(hl) pop hl ; Restore hex address call mhl4hc ; Move ASCII hex address to record pop de ; Restore hex address pop hl ; Restore index pointer ret ; ; Get size of current element ; Entry: HL=index pointer ; Exit: HL=size ; Uses: All ; elesz: call getaddr ; Hex address in DE ld a,17 ; Table is in reverse order sub (hl) ; Get order number jr nz,ele0 ; or a ld hl,0 ; Element is highest sbc hl,de ret ; ele0: ld hl,aorder ; Point to order table add a,a ; Offset into table call aahl ; Locate order entry dec hl ; Point to next highest dec hl call lhlhl ; Point to high index entry push de ; Save address call getaddr ; High hex address ex de,hl ; in HL pop de ; Restore low address or a sbc hl,de ; Size in HL ret ; ; Get size and address of next lower element ; Entry: HL=index pointer ; Exit: DE=size, HL=address ; Uses: AF,DE,HL ; lastsz: push bc ; Save counter call ndxord ; Get order table pointer inc hl ; Point to next lowest inc hl call lhlhl ; Get lower index pointer call getaddr ; Lower address in DE inc hl ; Point to size call lhlhl ; Size in HL ex de,hl ; Size in DE, address in HL pop bc ; Restore counter ret ; ; Get order table pointer ; Entry: HL=index record pointer ; Exit: B=order index, HL=corresponding order table pointer ; Uses: AF,BC,HL ; ndxord: ld b,(hl) ; Order index ld a,17 ; Table is in reverse order sub b add a,a ; Offset into table ld hl,aorder ; Point to order table and fall thru ; ; Add A to HL ; aahl: add a,l ld l,a ret nc ; Quit if no overflow ; inc h ; Increment H if overflow ret ; ; Move 4 byte ASCII address ; HL points to source ; DE points to dest ; movadr: ld b,4 jp hmovb ; ; Return ASCII decimal size as hex byte in A ; HL points to source ; Returns hex size in A ; movsiz: push hl ; Save buffer pointer call eval16 ; Convert ASCII to hex in DE ld a,e ; And in A pop de ; Buffer pointer in DE call madc ; Convert to decimal ex de,hl ld (hl),' ' ; Load space over last hex byte ex de,hl ret ; ; Convert number of ASCII hex records pointed to by HL to hex size in HL ; movsiz1:call movsiz ; Get hex size in A and fall thru ; ; Return with HL=A*80h ; mul80: ld l,0 srl a ld h,a rr l ret ; ; Return with A=HL/80h, rounded to next record boundary ; div80: xor a sub l ld a,h rla ret ; ; Return with HL=DE*A ; mult: ld h,0 ld l,a call mulhd ; Multiply and fall thru to round up ; ; Round number of bytes in HL up to next record boundary ; rndup: ld a,7fh call aahl ld de,0ff80h jp andhd ; ; Get actual default drive in fcb for better du:filename display ; defdr: ld a,(fcb) ; Get drive or a jr nz,defdun ; Not default, save it ; call retud ; Default, so get default du in BC ld a,b inc a ; Make it A=1 ; defdun: ld (fcb),a ; Save actual drive in fcb for du:fn msg ld (outfcb),a ; And in outfile fcb ret ; ; Check filetype and if none, use default ; movdft: push de ; Save fcb pointer ld hl,9 add hl,de ; ld a,(hl) ; Get first character cp ' ' jr nz,movd ; Something there ; ex de,hl ; Fcb pointer in DE ld hl,zcmtyp ; Point to default file type ld bc,3 ; File type length ldir ; Move it to fcb ; movd: pop de ; Restore fcb pointer ret ; ; Display program name, quitting at first space, null or after 8 bytes ; dispfn: ld hl,(fnam) ; Get filename pointer ld b,8 ; Max length ; dfnlp: ld a,(hl) ; Get character and 7fh ; Filter it inc hl or a ; End? ret z ; Yes cp ' ' ; End? ret z ; call cout djnz dfnlp ret ; ; Display B standout spaces ; pad: call stndout ; Set standout call bspace ; Display spaces jp stndend ; ; Send B space characters to console ; bspace: ld a,' ' ; brepeat:ld c,a ; Save character ld a,b or a ; Test for b=0 ld a,c ; Restore character ret z ; Quit if b=0 ; bsplp: call cout djnz bsplp ret ; ; Display new line ; crlf: ld hl,s$crlf jp vpstr ; ; Ring bell ; beep: ld a,bell jp cout ; ; Display field in standout if length byte hi bit clear, else normal ; ; Entry: HL points to length byte followed by field address ; dispf: ld a,(hl) ; Check for 0 size or a ret z ; rlc a ; Check for hi bit, filter it srl a ld b,a ; Set length call nc,stndout ; Display address in standout ; push hl ; Save pointer inc hl ; Point to field address call lhlhl ; Get address call bpstr ; Display field call stndend ; End standout pop hl ; Restore pointer or 0ffh ; Set NZ ret ; ; Display element size ; dispsz: ld a,(hl) ; Get field length inc hl ; Point to field address or a ret z ; Nothing there ; rlc a ; Check for hi bit, filter it srl a ld b,a ; Set length call nc,stndout ; Display address in standout ; push hl ; Save record pointer call lhlhl ; Get address in HL call bpstr ; Display field call stndend ; End standout ; pop hl ; Restore pointer inc hl ; Point to units address inc hl push hl ; Save pointer call lhlhl ; Point to units message call vpstr ; Display message pop hl ; Restore pointer or 0ffh ; Set NZ ret ; ; Display two spaces ; twosp: ld hl,tsp jp vpstr ; ; Display string pointed to by HL for B bytes ; bpstr: ld a,(hl) inc hl rlc a ; Check for hi bit, filter it srl a push af call cout pop af ret c djnz bpstr ret ; ; Get contents of HL in HL ; lhlhl: ld a,(hl) inc hl ld h,(hl) ld l,a ret ; ; Compare element addresses, return CARRY if HL>DE, so sort will be ; in reverse order (highest addresses first). ; acomp: push hl push de ld b,adroff+1 ; Set counter ; aclp: inc hl ; Point to field addresses inc de djnz aclp ; call lhlhl ; Point to fields ex de,hl call lhlhl ex de,hl ; ld b,4 ; Compare 4 bytes call compb pop hl pop de ret ; ; Calculate system TPA from ZCM file and poke it in the display message ; tpa: ld hl,f$ccp ; Point to ASCII CCP address call eval16 ; Get it in hex ex de,hl dec h ; Round down ; xor a ; Divide by 4 ld l,a ld a,h rra ld h,a ld a,l rra ld l,a ld a,h rra ld h,a ld a,l rra rlca ; 1/4 K remaining rlca ld l,a ; Remainder in L ; push hl ; Save K ld h,25 ; Convert it to decimal K xor a ; divlp: dec l jp m,tpa0 ; add a,h jr divlp ; tpa0: pop hl ; Restore K ld l,a ; Save decimal K ld a,h ; Get K in A... ld de,s$tpa ; Point to screen message call madc ; Save K in message ; inc de ; Skip decimal ld a,l ; Decimal K in A... jp mafdc ; Save decimal K in message ; ; Convert ASCII decimal size fields to ASCII hex fields and back ; to reformat them after any editing changes ; resize: call hexsiz ; Convert size fields to ASCII hex ; ; Convert ASCII hex element sizes to decimal in file size fields, ; calculate hex element sizes, save in index ; decsiz: ld hl,ndxlst ; Point to index element list ld b,6 ; Do first 6 elements call dsloop ; ; Do size fields that require different size calculations ; ld hl,f$expaths ; Point to element size call movsiz ; Return hex size in A add a,a ; 2 bytes per element inc a ; Plus termination ld (i$expath+1),a ; Save size in bytes ; ld hl,f$z3ndirs ; Point to element size call movsiz ; Return hex size in A ld de,18 call mult ; Get size in bytes to next record ld (i$z3ndir+1),hl ; Save size ; ld hl,f$z3cls ; Point to element size call movsiz ; Return hex size in A ld hl,5 ; 5 bytes of overhead call aahl ld (i$z3cl+1),hl ; Save size in bytes ; ld hl,f$shstks ; Point to element size call movsiz ; Return hex size in A push af ld hl,f$shsize ; Point to size call movsiz ; Return hex size in A ld e,a ld d,0 pop af call mult ; Get size in bytes to next record ld (i$shstk+1),hl ; Save size ; ld hl,ftime ld a,(hl) ; Already initialized? or a jr nz,sizb ; Yes ; dec (hl) ; No, set flag for next time ; ; Compute User Memory Area address and size ; call resort ; Resort file ld hl,i$cbios ; Point to CBIOS index entry call getaddr ; Get CBIOS address in DE ld e,0 ; Adjust to boundary push de ; Save CBIOS address call lastsz ; Get next lowest element address and size add hl,de ; Get top of lower element ld de,m$uma ; Save as UMA address call mhl4hc ex de,hl ; UMA address in DE pop hl ; Restore CBIOS address or a ; Clear CARRY sbc hl,de ; UMA size in HL ld (i$uma+1),hl ; Save size in index call div80 ; Hex size in A ld de,m$umas call madc ; Save decimal size ; ; Compute CBIOS size ; ld hl,i$cbios ; Point to index entry call elesz ; Get size call rndup ; Round up to next record ld (i$cbios+1),hl ; Save it in index call div80 ld de,m$cbioss call madc ; Save in index ; ; Compute NZBIOS size ; ld hl,i$bio ; Point to index entry call elesz ; Get size ld de,06h sbc hl,de ; CBIOS has wboot offset call rndup ; Round up to next record ld (i$bio+1),hl ; Save it in index call div80 ld de,m$bios call madc ; Save in index jr resort ; sizb: ld hl,bflds ; Resize cbios, uma, nzbio size fields ld b,3 push hl push bc call hsloop ; Convert to ASCII hex pop bc pop hl call dsloop ; Reconvert to ASCII decimal ; ; Sort records by address, add order bytes to records ; resort: call nuladr ; Null out addresses for 0-length elements ld de,ssb call sort ; Resort by address, fall thru ; ; Add order bytes to index entries ; ordndx: ld hl,aorder ; Point to order table ld b,17 ; Set index offset ; ordlp: push hl ; Save order pointer call lhlhl ; Get address ld (hl),b ; Poke index offset in index record pop hl ; Restore order pointer inc hl ; Point to next inc hl djnz ordlp ret ; ; Decsiz working loop ; dsloop: push hl ; Save list pointer call lhlhl ; Point to index record inc hl ; Point to hex size push hl ; Save hex size pointer ld de,siz1off ; Offset to size 1 field add hl,de call lhlhl ; Get field address call movsiz1 ; Move decimal size and return size in HL ex de,hl ; Size in DE pop hl ; Restore hex size pointer ld (hl),e ; Save hex size inc hl ld (hl),d pop hl ; Restore list pointer inc hl ; Point to next inc hl djnz dsloop ret ; ; Convert ASCII decimal size fields to ASCII decimal hex ; hexsiz: ld hl,ndxlst ld b,10 ; hsloop: push hl ; Save list pointer call lhlhl ; Point to index record ld de,siz1off+1 ; Offset to size 1 field add hl,de ; hsl0: push hl ; Save index pointer call lhlhl ; Get field address push hl ; Save it call eatsp ; Skip leading spaces, get hex size in DE ex de,hl ; Size in HL pop de ; Restore field address call mhl4hc ; Move hex size to field pop hl ; Restore index pointer ld de,4 ; Offset to next size length byte add hl,de ld a,(hl) ; Check length or a inc hl ; Point to field address jr nz,hsl0 ; Do next size ; pop hl ; Restore list pointer inc hl ; Point to next index record inc hl djnz hsloop ret ; ; Skip leading spaces in field pointed to by HL, get hex size in DE ; eatsp: ld a,' ' ; Get space ; eatlp: cp (hl) ; Check for space jp nz,eval10 ; No, get size in DE ; inc hl ; Else keep eating jr eatlp ; ; Write output file ; wrtfil: ld a,(envflg) ; Are we editing env data? or a jr z,getofn ; No ; ld hl,zcmnam ; Point to default env filename ld de,fcb+1 ld bc,11 ldir ; Move it to input fcb ; getofn: call gxymsg ; Ask for filename dc menuln,1,3,'Output filename ',1,'(RET to use ' ld de,fcb ; Display current input du:fn.ft call pdu call vprint dc 1,', ^C to quit)',2,': ' ld hl,fnbuf ; Point to buffer ld b,22 ; Set buffer length xor a ; Set input echo call tline ; Get input cp 3 ; ^C abort? jp z,exit ; Yes, quit ; ld a,(hl) ; Get first character or a ; Use input filename? jr z,useifn ; Yes ; ; Use entered outfile filename ; call capstr ; Capitalize filename ld hl,fnbuf ; Point to filename ld de,outfcb ; Point to fcb xor a call zprsfn ; Parse filename to outfile fcb jr nz,wldcrds ; No wildcards ; call movdft ; Add ZCM filetype if none specified ld a,(de) ; Check for default drive or a jr nz,wrtf ; No, continue ; ld a,(fcb) ; Yes, set actual drive ld (outfcb),a jr wrtf ; wldcrds:call vprint dc cr,lf,bell,1,'No Wildcards Allowed!' jp wrtfil ; Try again ; ; Use input filename as output filename ; useifn: ld hl,fcb ; Point to infile fcb ld de,outfcb ; Point to outfile fcb ld bc,13 ; Drive+fn/ft+usr ldir ; Move filename ; wrtf: call gxymsg dc menuln,1,3,1,'Writing ' ld a,(editflg) or a jr z,noed ; call vprint dc 'Edited ' ; noed: call dspinfn ; Display infile name call vprint dc 1,' to ' ld de,outfcb ; Point to outfile name call pdu ; Display du:filename call hexsiz ; Convert size fields to hex ; ld hl,zcmbuf ; Point to ZCM buffer ld de,($memry) ; Point to file buffer ld bc,zcmlen ldir ; Move file to buffer and pad ex de,hl ; the last record with EOF's ld a,1ah ld b,80h call fillb ; ld de,outfcb ; Point to output fcb call z3log ; Log into du: call f$make ; Create file, delete any existing file inc a ; Check for error jr nz,wrtf2 ; call vprint dc cr,lf,lf,'Directory Full',bell,cr,lf ret ; wrtf2: ld hl,($memry) ; Point to file buffer ld b,5 ; 5 Records ; ; Write loop ; wrtlp: call setdma push de ld de,128 add hl,de pop de call f$write ; Write record jr z,wrtf3 ; call vprint dc cr,lf,lf,'File Write Error',bell,cr,lf ret ; wrtf3: djnz wrtlp ; Write 5 records ; call f$close ; Close file and quit jp exit ; ; Edit ZCM fields ; edit: call gxymsg ; Display edit menu db menuln,1,4 db '^E/^X ',1,'Prev/Nxt Address',2 db ' ^S/^D ',1,'Prev/Nxt Character',2 db ' (ESC)^W ',1,'End Edit ',2 db cr,lf db '^A/^F ',1,'Prev/Nxt Field ',2 db ' ^Y ',1,'Era Cursor Right ',2 dc ' ^Q ',1,'Quit to System',2 ; ld hl,row ; Initialize row position ld (hl),3 ld hl,aorder ; Point to order table ld a,17 ; Number of index records ld (editflg),a ; Set edit flag ld b,a ; Set record counter ; ; Loop to set and edit index records ; efloop: push hl ; Save order pointer call setfcol ; Set cursor to field column call lhlhl ; Point to index record ld de,5 ; Point to address length add hl,de ; ; Loop to set and edit record fields ; efl0: push bc ; Save record count push hl ; Save index record pointer call edloop ; Edit field pop hl ; Restore index record pointer pop bc ; Restore record counter ; ; Parse edloop command returned in A ; cp ctrle ; ^E - previous index record jr z,prevr cp esc ; Quit edloop? jr z,eddun ; Yes, go to end cp ctrlw ; ^W same as ESC jr z,eddun cp ctrlf ; ^F - next record field jr z,nxtf cp cr ; RET - next record field jr z,nxtf cp ctrla ; ^A - previous record field jr z,prevf ; nxtrd: djnz nxtr ; Else next index record ; ; Edit exit ; eddun: pop hl ; Restore order pointer jp resize ; Reformat sizes and save new hex sizes ; ; Edit next index record ; nxtr: pop hl ; Restore order pointer inc hl ; Point to next record inc hl call incrow ; Increment row position jr efloop ; And go edit it ; ; Edit previous index record ; prevr: pop hl ; Restore order pointer dec hl ; Point to previous dec hl push hl or a ; Clear CARRY ld de,zcmnd ; End of index sbc hl,de jr c,eddun ; Past top ; pop hl ; Restore order pointer inc b ; Adjust count call decrow ; Decrement row position jr efloop ; And go edit it ; ; Edit previous index field ; prevf: ld a,(hl) cp 4 ; Are we at address? jr z,prevr ; Yes, do previous record ; dec hl ; Point to size length dec hl dec hl ; ex de,hl ; Record pointer in DE ld hl,col ld a,scol+4 ; Check current column cp (hl) ; Are we in size 2 field? ld a,fcol jr nc,sacol ; No ; ld a,scol ; Size 1 field dec de dec de ; sacol: ld (hl),a ; Set starting pointer ex de,hl ; Record pointer in HL ; enxt: call movcur ; Set cursor jr efl0 ; And edit next field ; ; Edit next index field ; nxtf: inc hl ; Point to size length inc hl inc hl ; ex de,hl ; Record pointer to DE ld hl,col ld a,scol-1 ; Check current column cp (hl) ; Are we in a size field? jr nc,sscol ; No ; ld a,scol+4 ; Size 2 field inc de ; Point to next size length inc de ; sscol: inc a ld (hl),a ; Set starting column ; ex de,hl ; Record pointer in HL ld a,(hl) or a jr z,nxtrd ; No more, do next record jr enxt ; ; Edit field (except when hi bit of length byte is set) ; ; Entry: HL points to field length,field address ; (radix) = OFF for decimal input, ON for hex input ; edloop: ld a,(hl) ; Get length rlc a ; Set CARRY if hi bit set srl a ; Filter hi bit ld b,a ; Set radix ld (radix),a ld c,0 ; Initialize character count jr nc,edlp0 ; Hi bit clear ; dec c ; Don't allow editing of this field ; edlp0: dec b ; Rel 0 ; inc hl call lhlhl ; Get field pointer ; edlp1: call capin ; Get capitalized input call isctrl ; Is it a control character? jr z,edcmd ; Yes ; call ishex ; Must be hex or decimal jr nz,noroom ; No ; ld e,a ; Save character ld a,(radix) ; Check radix (3=dec, 4=hex) cp 3 ld a,e ; Restore character jr z,cdec ; Decimal ; cp ' ' ; Skip space in hex mode jr nz,maxc jr noroom ; Else error ; cdec: call isdec ; Must be decimal jr nz,noroom ; No ; maxc: ld a,b ; Maximum number of characters? cp c jr nc,edlp2 ; Not yet ; noroom: call beep ; Sound bell jr edlp1 ; edlp2: ld a,e ; Restore character ld (hl),a ; Add character to string call aso ; Set standout, saving A call cout ; Display character call stndend call currt ; Update cursor position jr edlp1 ; Get next character ; ; Parse edit command table ; edcmd: ld de,edtbl call acase3 jr edlp1 ; Return from match routines ; edtbl: db 15 ; Number of cases dw termky ; No other match db esc ; ESC - edit done - save and exit dw edldun db ctrlw ; ^W - edit done - save and exit dw edldun db ctrlq ; ^Q - quit to system without saving edit dw eexit db ctrle ; ^E - previous index record dw edldun db cr ; RET - next record field dw edldun db tab ; TAB - next index record dw edldun db ctrlx ; ^X - next index record dw edldun db ctrlf ; ^F - next record field dw edldun db ctrla ; ^A - previous record field dw edldun db ctrlt ; ^T - erase from cursor to end of line dw clrln db ctrly ; ^Y - same as ^T dw clrln db del ; DEL - cursor left dw lcurs db ctrls ; ^S - cursor left dw lcurs db bs ; ^H - cursor left dw lcurs db ctrld ; ^D - cursor right dw rcurs ; ; Terminal arrow key exit for next/previous field/record ; teddun: pop hl ; edldun: pop hl ; Discard return address and 0ffh ; Set NZ return ret ; ; Check for terminal arrow keys ; termky: push hl ; Save pointer ld hl,(upkey) ; Get arrow key address cp (hl) ; Is it up arrow? jr nz,termky0 ; No ; ld a,ctrle ; Yes, convert to ^E jr teddun ; Go do previous field ; termky0:inc hl ; Move to next char in tcap cp (hl) ; Is it down arrow? jr nz,termky1 ; No ; jr teddun ; Go do next field ; termky1:inc hl ; Move to next char in tcap cp (hl) ; Is it right arrow? jr nz,termky2 ; No ; pop hl ; Restore pointer jr rcurs ; Yes ; termky2:inc hl ; Move to next char in tcap cp (hl) ; Is it left arrow? pop hl ; Restore pointer ret nz ; Fall thru if so, else quit ; ; Cursor left ; lcurs: ld a,c ; Check for start of field cp 0 jp z,beep ; Yes, beep and quit, else fall thru ; curlf: dec c ; Decrement character count dec hl ; Decrement field pointer exx ; Decrement cursor location ld hl,col dec (hl) ; savcur: exx jr movcur ; ; Cursor right ; rcurs: ld a,b ; Check for end of field cp c ; Check for last character jp c,beep ; Yes, beep and quit ; currt: inc c ; Increment character count inc hl ; Increment field pointer exx ; Increment cursor position ld hl,col inc (hl) jr savcur ; ; Clear from cursor to end of line to spaces ; clrln: push bc ; Save count ld a,b sub a,c ; How many spaces to end of field? jr c,cldun ; We're past it ; ld b,a ; Number of spaces to erase inc b push bc ; Save count ld a,' ' call aso ; Set standout, save A call brepeat ; Display in standout call stndend pop bc ; Restore count push hl ; Save field pointer ld a,' ' ; Fill field with spaces ; cllp: ld (hl),a inc hl djnz cllp ; pop hl ; Restore field pointer ; cldun: pop bc ; Restore count jr movcur ; Restore cursor position ; ; Set cursor to address label column ; setlcol:ld a,lcol ; Set column jr gocol ; ; Set cursor to address field column ; setfcol:ld a,fcol ; Set cursor column ; ; Save new cursor column and move cursor to new column in current row ; Entry: A=new cursor column ; gocol: ld (col),a ; Save it and fall thru to move it ; ; Move cursor to stored position ; movcur: push hl ld hl,(col) call gotoxy pop hl ret ; ; Check if capitalized ASCII character in A is a valid decimal character ; isdec: exx ld bc,11 ; Check for decimal jr is ; ; Check if capitialized ASCII character in A is a valid hex character ; ishex: exx ld bc,17 ; Check for hex ; is: ld hl,hexnum cpir exx ret ; ; Set standout but save A and flags ; aso: push af call stndout pop af ret ; ; Null out addresses for 0-length elements ; nuladr: ld hl,i$extstk+1 ; Skip CBIOS, UMA ld b,12 call nulalp ; ld de,ndxrec ; Skip NZBIO add hl,de ld b,2 ; Do DOS, CCP ; nulalp: push hl ; Save index pointer call lhlhl ; Get size ld a,h ; Check for 0 or l jr nz,nxtsz ; ex de,hl ; Size to DE pop hl ; Restore index pointer push hl ; Save it again inc hl ; Point to address field inc hl inc hl inc hl inc hl call lhlhl ex de,hl ; Field pointer in DE, size in HL call mhl4hc ; Zero out address ; nxtsz: pop hl ; Restore index pointer ld de,ndxrec add hl,de djnz nulalp ret ;----------------------------------------------------------------------- ; ; Initialized data area ; ; hexnum: db ' 0123456789ABCDEF'; Acceptable decimal/hex characters fnam: dw name ; Pointer to default program name zcmnam: db 'Z3ENV ' ; Default outfile filename zcmtyp: db 'ZCM' ; Default outfile filetype ; ; ZCM file buffer ; zcmbuf: f$cbios: db ' ' cbioslab: db 'CBIOS',tab f$envtyp: db ' ENVTYP',tab f$expath: db ' EXPATH',tab f$expaths: db ' EXPATHS',tab f$rcp: db ' RCP',cr,lf f$rcps: db ' RCPS',tab f$iop: db ' IOP',tab f$iops: db ' IOPS',tab f$fcp: db ' FCP',tab f$fcps: db ' FCPS',cr,lf f$z3ndir: db ' Z3NDIR',tab f$z3ndirs: db ' Z3NDIRS',tab f$z3cl: db ' Z3CL',tab f$z3cls: db ' Z3CLS',tab f$z3env: db ' Z3ENV',cr,lf f$z3envs: db ' Z3ENVS',tab f$shstk: db ' SHSTK',tab f$shstks: db ' SHSTKS',tab f$shsize: db ' SHSIZE',tab f$z3msg: db ' Z3MSG',cr,lf f$extfcb: db ' EXTFCB',tab f$extstk: db ' EXTSTK',tab f$quiet: db ' QUIET',tab f$z3whl: db ' Z3WHL',tab f$speed: db ' SPEED',cr,lf f$maxdrv: db ' MAXDRV',tab f$maxusr: db ' MAXUSR',tab f$duok: db ' DUOK',tab f$crt: db ' CRT',tab f$prt: db ' PRT',cr,lf f$cols: db ' COLS',tab f$rows: db ' ROWS',tab f$lins: db ' LINS',tab f$drvec: db ' DRVEC',tab f$spar1: db ' SPAR1',cr,lf f$pcol: db ' PCOL',tab f$prow: db ' PROW',tab f$plin: db ' PLIN',tab f$form: db ' FORM',tab f$spar2: db ' SPAR2',cr,lf f$spar3: db ' SPAR3',tab f$spar4: db ' SPAR4',tab f$spar5: db ' SPAR5',tab f$ccp: db ' CCP',tab f$ccps: db ' CCPS',cr,lf f$dos: db ' DOS',tab f$doss: db ' DOSS',tab f$bio: db ' BIO',tab f$pubdrv: db ' PUBDRV',tab f$pubusr: db ' PUBUSR',cr,lf zcmlen equ $-zcmbuf ;-------------------------------- ; ; Screen message display buffer ; s$cbios: dc cr,lf,'CBIOS' dc 'CBIOS' s$uma dc cr,lf,' User Memory Area' dc 'UMA' s$expath: dc cr,lf,'External Path' dc 'EXPATH' s$rcp: dc cr,lf,'Resident Command Pkg' dc 'RCP' s$iop: dc cr,lf,'Input/Output Package' dc 'IOP' s$fcp: dc cr,lf,'Flow Control Package' dc 'FCP' s$z3ndir: dc cr,lf,'Named Directory' dc 'Z3NDIR' s$z3cl: dc cr,lf,'Multiple Command Line' dc 'Z3CL' s$z3env: dc cr,lf,'Environment Descriptor' dc 'Z3ENV' s$shstk: dc cr,lf,'Shell Stack' dc 'SHSTK' s$z3msg: dc cr,lf,'Message Buffer' dc 'Z3MSG' s$extfcb: dc cr,lf,'External FCB' dc 'EXTFCB' s$extstk: dc cr,lf,'External Stack' dc 'EXTSTK' s$z3whl: dc cr,lf,'Wheel Byte' dc 'Z3WHL' s$ccp: dc cr,lf,'Command Processor' dc 'CCP' s$dos: dc cr,lf,'Disk Operating System' dc 'DOS' s$bio: dc cr,lf,'NZCOM BIOS' dc 'BIO' s$crlf dc cr,lf ; s$byt: dc ' Bytes' s$ele: dc ' Elements' s$ent: dc ' Byte Entries' s$nam: dc ' Names' s$rec: dc ' Records' ; ; Sort Specification Block ; ssb: dw zcmndx ; Address of the first record dw 17 ; Number of records dw ndxrec ; Length of each record dw acomp ; Address of our compare routine dw aorder ; Address of the order table db on ; ON to use pointers db on ; ON to only sort pointers ; ; Index record lists for size calculations ; bflds: dw i$cbios dw i$uma dw i$bio ; ; Elements with single size in records ; ndxlst: dw i$rcp dw i$iop dw i$fcp dw i$z3env dw i$dos dw i$ccp ; ; Elements with special sizes ; dw i$expath dw i$z3ndir dw i$z3cl dw i$shstk ; adroff equ 5 ; db Offset to length of address field siz1off equ 8 ; db Offset to length of size1 field siz2off equ 13 ; db Offset to length of size2 field ; ; Macro to generate index records from case table ; Note: ; If field length byte is 0, don't display field ; If hi bit is set, display field in normal video but don't allow editing ; index macro odr,siz,dptr,alen,aptr,s1l,s1ptr,s1u,s2l,s2ptr,s2u,etm db odr ; Order index dw siz ; Element size in bytes dw dptr ; Display pointer db alen ; Length of address field dw aptr ; Address of address field db s1l ; Length of size1 field dw s1ptr ; Address of size 1 field dw s1u ; Size 1 units pointer db s2l ; Length of size2 field dw s2ptr ; Address of size2 field dw s2u ; Size 2 units pointer db etm ; Edit termination endm ; ------------------- ; 19 bytes per record ; ; Index of ZCM NZCOM system elements, initially in MKZCM standard order ; zcmndx: i$cbios: index 17,0, s$cbios, 4,f$cbios,83h,m$cbioss,s$rec, 0,0,0,0 i$uma: index 16,0, s$uma, 84h,m$uma, 3,m$umas,s$rec, 0,0,0,0 i$extstk: index 15,48,s$extstk, 4,f$extstk, 0,0,0,0,0,0,0 i$z3cl: index 14,0, s$z3cl, 4,f$z3cl, 3,f$z3cls,s$byt, 0,0,0,0 i$z3whl: index 13,1, s$z3whl, 4,f$z3whl, 0,0,0,0,0,0,0 i$expath: index 12,0, s$expath, 4,f$expath, 3,f$expaths,s$ele, 0,0,0,0 i$extfcb: index 11,36,s$extfcb, 4,f$extfcb, 0,0,0,0,0,0,0 i$z3msg: index 10,80,s$z3msg, 4,f$z3msg, 0,0,0,0,0,0,0 i$z3env: index 9,0, s$z3env, 4,f$z3env, 3,f$z3envs,s$rec, 0,0,0,0 i$shstk: index 8,0, s$shstk, 4,f$shstk, 3,f$shstks,tsp, 3,f$shsize,s$ent,0 i$z3ndir: index 7,0, s$z3ndir, 4,f$z3ndir, 3,f$z3ndirs,s$nam, 0,0,0,0 i$fcp: index 6,0, s$fcp, 4,f$fcp, 3,f$fcps,s$rec, 0,0,0,0 i$rcp: index 5,0, s$rcp, 4,f$rcp, 3,f$rcps,s$rec, 0,0,0,0 i$iop: index 4,0, s$iop, 4,f$iop, 3,f$iops,s$rec, 0,0,0,0 i$bio: index 2,0, s$bio, 4,f$bio, 3,m$bios,s$rec, 0,0,0,0 i$dos: index 2,0, s$dos, 84h,f$dos, 3,f$doss,s$rec, 0,0,0,0 i$ccp: index 1,0, s$ccp, 84h,f$ccp, 3,f$ccps,s$rec, 0,0,0,0 zcmnd equ $ ; End of index ;-------------------------------- ; ; Uninitialized data area, initialized at startup ; dseg data equ $ ; Start of data area to be initialized ; ; Order table for SORT ; aorder: ds 17*2 ; Number of index records * 2 ; ; ASCII fields not included in the ZCM file. Field size + termination ; m$cbioss:ds 5 ; CBIOS size field m$uma: ds 6 ; User area address field m$umas: ds 5 ; User area size field m$bios: ds 5 ; NZBIOS size field ; radix: ds 1 ; 0 for decimal, else hex col: ds 1 ; Current column row: ds 1 ; Current row outfcb: ds 36 ; Outfile FCB envflg: ds 1 ; ON if input is from environment editflg:ds 1 ; ON indicates edit fnbuf: ds 25 ; Output filename buffer ; upkey: ds 2 ; Address of arrow keys in TCAP ftime: ds 1 ; datalen equ $-data ; Length of data area to be initialized ; ds 64 ; Local stack stack: ds 2 ; CCP stack pointer end