home *** CD-ROM | disk | FTP | other *** search
- ORG 100h
-
- OLD EQU 0
-
- IF OLD
- SYSPRT EQU 1CH ; old kaypro 2's and fours
- ELSE
- SYSPRT EQU 14H ; tens, 4-84's, 2-84's
- ENDIF
-
- OFFSET EQU 8000h ; offset for calculating high addresses
-
- LD DE,HISTRT ; the destination of the High memory code
- LD HL,LODEND+1 ; the source code is just beyond this loader
- LD BC,HIEND-HISTRT ; the number 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 0 ; 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
-