home *** CD-ROM | disk | FTP | other *** search
- ; PROGRAM: RamTools
- ; VERSION: 1.0
- VERS1 EQU 1+48 ;THIS GIVES US THE 2 DECIMAL DIGITS FOR THE VERSION #
- VERS2 EQU 0+48
- ; AUTHOR : Sam Weiss (Alias **Mad@Kaypro**)
- ; DATE : May 1, 1987 Yes... May Day... the only holiday the poor Russians
- ; Probably get!
-
- BIOS EQU 0F400H ;This is for CP/M... For Zcpr3 for 4'84, the address
- ; is: E200
-
- CONIN EQU BIOS+0AH ;BIOS CONIN OFFSET
- VIDOUT EQU BIOS+0CH ;BIOS VIDOUT OFFSET
-
- ;
- ;
- ; Ok.. let's start...
- ;
- ; initialize patch by copying to FF10h
-
- ORG 100H
-
- FALSE EQU 0000
- TRUE EQU .NOT.FALSE
- CR EQU 0DH
- LF EQU 0AH
-
-
- LD A,(CONIN) ; make sure we don't patch twice
- CP 010H
- JP Z,ALRED ; jump here if program already in MEM
-
- CALL UNBL ;this turns the cursor into a block.
-
-
- ;This moves our program into high memory
-
- DEST EQU 0FF10H ; destination address
- RCODE EQU 0300H ; where code to relocate is
- BYTCNT EQU 0EFH ; copy 239 bytes(although it is too much
-
- LD DE,DEST ; destination address (0F800H)
- LD HL,RCODE ; source address
- LD BC,BYTCNT ; length of patch
- LDIR
-
- ; initialize bios by changing the conin jump table entry to jump to this
- ; program first to see if screen dump desired
-
- LD DE,(CONIN)
- LD (DEST+1),DE
- LD HL,DEST ; this is our conin jump entry
- LD (CONIN),HL ; patch into bios jump table
-
- LD DE,MSG ; tell user we are on line
- LD C,9 ; bdos print string function
- CALL 5 ; calling Mr. Bdos
- RET ; takes us back to CCP control
-
- MSG: DEFB CR,LF
- DEFB ' **** RAM Tools v',VERS1,'.',VERS2,' **** '
- DEFB 'By: Sam Weiss'
- DEFB CR,LF,' has now been installed.',CR,LF,1BH,'B6',1BH,'B7'
- DEFB 1BH,'=',56D,32D,'RT commands: ^@=SC,^^=Solid cursor,'
- DEFB '^]=clear screen,^_=Cold boot,^\print chars',1BH,'C6','$'
-
- ALRED: LD DE,ALR ; Tell user RT has been activated
- LD C,9 ; bdos print string function
- CALL 5 ; call Bdos Brothers
- LD HL,(DEST+1) ; Here we are removing our wonderful BIOS patch
- LD (CONIN),HL
- RET ; to CCP control
-
-
- UNBL: LD A,10
- OUT (28),A
- LD A,0
- OUT (29),A
- RET
-
- ALR: DEFB CR,LF
- DEFB ' **** RAM Tools v',VERS1,'.',VERS2,' **** '
- DEFB 'By: Sam Weiss'
- DEFB CR,LF,' has now been removed.',CR,LF,1BH,'B6'
- DEFB 1BH,'=',56D,32D,18H,1BH,'C7',1BH,'C6','$'
- END