TITLE "SLOWDOWN - SPEEDUP Module Remover - 15 Jan 89" ;=============================================================== ; SLOWDOWN. Module remover for SPEEDUP RSX ; ; This routine removes the SPEEDUP Directory Cache Buffer RSX ; routine. Portions of code extracted from RSX toolbox, Copy- ; right (c) by: Plu*Perfect Systems ; 410 23d Street ; Santa Monica, CA 90402 ; ; Harold F. Bower ; P.O. Box 313 ; Ft. Meade, MD 20755 ;=============================================================== VERS EQU 10 ; Equates used in this module. WBOOT EQU 0000H ; Cold boot vector in BIOS FCB EQU 005CH ; Address of default File Control Block BELL EQU 7 LF EQU 10 CR EQU 13 ; Offsets from Warm Boot vector in Header list. OREMOV EQU 3 ONAME EQU 10 ;********************* Program Starts Here ********************** LD HL,BANNER ; ..and print announce ourselves CALL PRTLIN LD A,(FCB+1) ; Get first char in FCB CP '/' ; Is it a Help request? LD HL,HLPMSG ; ..(preset help message ptr) JR Z,PRTLIN ; Jump if Help, return via stack ; Intro done, No Help, so go to work. LD SP,STACK ; Set local stack for protection LD HL,(WBOOT+1) ; Get BIOS Warm Boot address INC HL ; ..point at WB addr in BIOS jmp vector LD A,(HL) INC HL LD H,(HL) LD L,A EX DE,HL LD HL,(WBOOT+1) ; Is (HL = BIOS+4) < Addr? OR A SBC HL,DE ; Set Carry flag if no Modules EX DE,HL JR C,NOTHIN ; ..exit if Carry set (No modules) PUSH HL ; Save Warm Boot vector LD DE,ONAME ; ..and offset to RSX Name ADD HL,DE LD A,(HL) INC HL LD H,(HL) LD L,A ; Put addr of Name string in HL LD (RSXID),HL ; Save ID String in case good LD DE,SPDNAM ; ..and compare to "SPEEDUP" LD B,NAMLEN CMPNAM: LD A,(DE) CP (HL) JR NZ,WRONG ; Exit if this is wrong module INC HL INC DE DJNZ CMPNAM ; ..loop til whole string validated POP HL ; Name is a match, Restore addr for removal LD DE,OREMOV ADD HL,DE CALL JPHL ; "Fake" a call to HL, return to START2 LD HL,REMOK ; ..(preset for Ok removal) JR NC,ERXIT ; Jump Error if Carry CALL PRTLIN ; .else print removal string LD HL,(RSXID) ; ..then RSX ID CALL PRTLIN LD HL,CRLF ; ...followed by New line JR EXIT ; ....and quit ERXIT: LD HL,ERRMSG ; We have an error, print message EXIT: CALL PRTLIN ; ..fall thru to exit LD HL,EXITMS ; Print exit message DONE0: CALL PRTLIN JP WBOOT ; ..and warm boot to reset everything NOTHIN: LD HL,NONMSG ; Print non-existance message JR EXIT WRONG: LD HL,WRNMSG ; Set message addr JR EXIT ;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ; Utility print/in/out routines. ; Print nul/8-bit terminated string at HL PRTLIN: LD A,(HL) RLCA SRL A ; Shift right logical (reg) A INC HL RET Z PUSH HL PUSH AF CALL CONOUA POP AF POP HL JR NC,PRTLIN RET ;..... ; Use Bios for all output to avoid problems with other modules. CONOUA: LD C,A ; Put character in C for BIOS LD HL,(WBOOT+1) ; Warm boot BIOS vector LD L,12 ; Set BIOS offset to CONOUT JPHL: JP (HL) ; ..and jump to it returning by stack ;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ; Messages and print strings BANNER: DEFB CR,LF,'SPEEDUP RSX Removal Routine, Ver ',VERS/10+'0','.' DEFB VERS MOD 10+'0',' H.F.Bower',CR,LF,0 HLPMSG: DEFB CR,LF DEFB LF,' Purpose: Remove SPEEDUP Directory Buffer RSX',CR,LF,LF DEFB ' Usage: SLOWDOWN <-- Remove SPEEDUP RSX',CR,LF DEFB ' SLOWDOWN // <-- Print this message',CR,LF,LF,0 ERRMSG: DEFB '==> Removal Error (Permanent Module?) <==',BELL,CR,LF,0 WRNMSG: DEFB '==> Lowest module Not SPEEDUP. Can''t remove <==',BELL CRLF DEFB CR,LF,0 REMOK: DEFB CR,LF,' Removing: ',0 EXITMS: DEFB ' ..done..',CR,LF,0 NONMSG: DEFB CR,LF,' No RSX''s installed..',BELL,CR,LF,0 SPDNAM: DEFB 'SPEEDUP' ; Remove only this module NAMLEN EQU $-SPDNAM ;..... ; Data Area for routine RSXID: DEFS 2 DEFS 32 STACK: DEFS 0 END