MKZ3BASECOM MKZ3BASEFOR `MKZ3BASEZ80Q(AZ3ENV[FCB>Z3BASE LIBNot Z33+* |(* n?f@~%!n f ~ %n f ~%%nf4~F%nfU~g%nfy~%nf~%nf~%nf~ %~! %n"f#n$f%2n&f'Fn)f*Y͸͔͸v!vͩ̈́͞; Z3BASE - DYNAMIC CONFIGURATION FALSE equ 0 TRUE equ not FALSE Z3Rev equ 000h Base equ 00000h EXPATH equ 00000h EXPATHS equ 000h RCP equ 00000h RCPS equ 000h IOP equ 00000h IOPS equ 000h FCP equ 00000h FCPS equ 000h Z3NDIR equ 00000h Z3NDIRS equ 000h Z3CL equ 00000h Z3CLS equ 000h Z3ENV equ 00000h Z3ENVS equ 000h SHSTK equ 00000h SHSTKS equ 000h ShSize equ 000h Z3MSG equ 00000h ExtFCB equ 00000h ExtStk equ 00000h Z3Whl equ 00000h ; end of Z3BASE.LIB ͔(w w#~#(3 ( 6 ( ( (  y( yG>GO> 6|%}%MQ. <O:gLƐ'@' MKZ3BASE Make Z3BASE.LIB (C) 1991 Herbert zur Nedden, Germany MKZ3BASE is a small program which builds the file Z3BASE.LIB by reading the current value for the equates from the environment descriptor. The only equate not necessarily built correct is BASE which ist set to zero - that value being common, I suppose. MKZ3BASE is no sophisticated program - as a matter of fact except for checking Z33 or better it just goes ahead, gets the requested data from the Z3ENV and then deletes, makes, writes and closes Z3BASE.LIB on the current drive and user with NO error checking whatsoever. In case that you think this program not worth staying that simple (or shall I better say dirty) - go ahead and make it a good one! I wrote it in order to make life a little easier when adjusting a FCP or just a new ZCPR 3.3 version (I enjoy editing source code). Did you note that I wrote 'a LITTLE easier'. The word little had as a consequence that MKZ3BASE is so simple. Enjoy MKZ3BASE ... or not! Herbert zur Nedden Alte Landstr. 21 D-2071 Siek  ; basic constants lf equ 10 cr equ 13 RAMBase equ 0 ; SYSLIB ext eprint ext ma2hc ext mhl4hc ext SetDMA ext F$Delete ext F$Make ext F$Write ext F$Close .request syslib ; several macros LDHLIX MACRO Offset ld l,(ix+&Offset&) ld h,(ix+&Offset&+1) ENDM ByteVal MACRO Name db '&Name& equ 0' &Name&: db '00h',cr,lf ENDM WordVal MACRO Name db '&Name& equ 0' &Name&: db '0000h',cr,lf ENDM Module MACRO Name WordVal &Name& ByteVal &Name&S ENDM PutByte MACRO Name,Offset if not NUL Offset ld a,(IX+&Offset&) endif ld de,&Name& call MA2HC ENDM PutWord MACRO Name,Offset if not NUL Offset LDHLIX &Offset& endif ld de,&Name& call MHL4HC ENDM ; start of program jp Start db 'Z3ENV',1 ; Type-1 environment Z3Envi: dw 0 ; Filled in by Z33 db '[FCB>' FCB: db 0,'Z3BASE LIB' ds 24,0 NotZ33: call eprint db 'Not Z33+',0 ; Abort message if not Z33-compatible ret ; start of program Start: ld hl,(Z3Envi) ; get env addr ld a,h or l jr z,NotZ33 ld ix,(Z3Envi) LDHLIX 3fh ; adress of CPR ld de,5 ; offset to version ID add hl,de ld a,(hl) ; version ID PutByte Z3Rev ld hl,RAMBase ; first available RAM adress PutWord Base PutWord EXPATH,09h PutByte EXPATHS,0Bh PutWord RCP,0Ch PutByte RCPS,0Eh PutWord IOP,0Fh PutByte IOPS,11h PutWord FCP,12h PutByte FCPS,14h PutWord Z3NDIR,15h PutByte Z3NDIRS,17h PutWord Z3CL,18h PutByte Z3CLS,1Ah PutWord Z3ENV,1Bh PutByte Z3ENVS,1Dh PutWord SHSTK,1Eh PutByte SHSTKS,20h PutByte SHSIZE,21h PutWord Z3MSG,22h PutWord ExtFCB,24h PutWord ExtStk,26h PutWord Z3Whl,29h ld de,FCB call InitFCB call F$Delete ld de,FCB call InitFCB call F$Make ld b,FileSize ld hl,FileData FileWrite: call SetDMA push hl ld de,FCB call F$Write pop hl ld de,80h add hl,de djnz FileWrite ld de,FCB call F$Close ret FileData: db '; Z3BASE - DYNAMIC CONFIGURATION',cr,lf,cr,lf db 'FALSE equ 0',cr,lf db 'TRUE equ not FALSE',cr,lf,cr,lf ByteVal Z3Rev WordVal Base Module EXPATH Module RCP Module IOP Module FCP Module Z3NDIR Module Z3CL Module Z3ENV Module SHSTK ByteVal ShSize WordVal Z3MSG WordVal ExtFCB WordVal ExtStk WordVal Z3Whl db '; end of Z3BASE.LIB',cr,lf,1ah FileSize equ [ $ - FileData + 127 ] / 128