;cold boot for Apple ][ with CPM56 FALSE EQU 0 TRUE EQU NOT FALSE apcout equ 0db43h apcin equ 0db12h apconst equ 0db08h changer equ 0BBBBh ndir EQU TRUE iobase equ 0f780h ndbase equ 0f680h ;W McGee 15 Feb 1983 ;Version 1W1 maclib zcprhdr ;ZCPR2 is set up with a command line to execute this file on cold boot ;and by patching the ZCPR2 code to point to the command line ;The purpose of this code is to initialize the buffers needed for ZCPR2 ;in the Apple ][ screen area. Thus, this will not work with the ;40-column screen!!! $-macro @GENDD MACRO ?DD IF (?DD GT 7FH) AND (?DD LT 0FF80H) DB 100H ELSE DB ?DD ENDIF ENDM jr MACRO ?N DB 18H @GENDD ?N-$-1 ENDM org 100h ;Initialize Multiple command line if multcmd lxi h,clbase shld changer lxi d,cmdset lxi h,clbase call mover endif ;Initialize named directory if ndir lxi d,ndvals lxi h,ndbase call mover endif ;Initialize Default Command Search Path lxi d,path lxi h,pathbase mvi b,9 call movlop ;go back ;initialize IOBYTE and redirectable I/O drivers lxi d,iodrivers lxi h,iobase call mover jmp 0000h ;mover arbitrary 119 bytes from de to hl mover: mvi b,119 movlop: ldax d mov m,a inx h inx d dcr b jnz movlop ret ; ;initial external path pathbase equ 40h path: db '$$' db '$',0 db 1,'$' db 1,0 db 0 ;initialize command line if multcmd buflen equ 119 cmdset: dw clbase+4 db buflen db 0 db 0 endif iodrivers: jr ioerror db 0 jr ioerror db 0 jr ioerror db 0 ret db 0,0 jmp APCONST jmp apcin jmp apcout jmp apcout jmp apcin mvi a,0ffh ora a ret ioerror: xra a ret if ndir ndvals: db 50 db 0 db 0 db 0 db 0 endif end