; PHASE1.AZM - Mike Rubenstein ; ORG 100H ; OLD EQU 0 ; IF OLD SYSPRT EQU 1CH Old Kaypro 2's and fours ENDIF OLD ; IF NOT.OLD SYSPRT EQU 14H Tens, Kaypro 4-84's, 2-84's ENDIF NOT OLD ; OFFSET EQU 8000H Offset for calculating high addresses ; LD DE,HISTRT Destination of the High memory code LD HL,LODEND+1 Source code is just beyond this loader LD BC,HIEND-HISTRT Nnumber of bytes to move (end - start) LDIR Move it up there JP HISTRT Jump to it LODEND NOP To calculate end of loader/start of high memory code segment ; HISTRT EQU $+OFFSET Begin using offset ; IN A,(SYSPRT) Get present sysport data SET 7,A Bank select bit OUT (SYSPRT),A CALL MOVIT Move the code routine IN A,(SYSPRT) RES 7,A Back to RAM bank OUT (SYSPRT),A CALL TPAMOV Now move to 100H for save JP 0000H Back to CP/M ; MOVIT EQU $+OFFSET ; LD HL,0 Source is at 0 (in ROM) LD DE,OFFSET+1000H Load above us LD BC,1000H Pick up 4K (2732) LDIR RET ; TPAMOV EQU $+OFFSET ; LD HL,OFFSET+1000H Destination becomes source LD DE,100H Move to TPA start LD BC,1000H 4K bytes to move LDIR RET ; HIEND EQU $+OFFSET ; END ;