Title Hard Disk Drive Park Program (10_Jan_85) ; ; Copyright 1984 ; Morrow Designs, Inc. ; San Leandro, Ca. ; John Zalabak .z80 aseg org 0100h ; Index: Park (20_Jul_84) ;------------------------ ; ; PARK Park the Hard Disk Heads ; DOCOLD Call the Bios Cold Boot Entry Point ; DATA Print Strings ; ;---------------------------------------------------------------------- ; Equates (10_Jan_85) ;-------------------- ; Rev equ 30h ;Park Program Revision Number ;System Addresses and Constants Bios_Address equ 1 ;Base Address of the Bios Bdos_Entry equ 5 ;Bdos Entry Point Bdos_PString equ 9 ;Bdos Print String Function Rom_Park equ 2Bh ;Offset to the start of the Park jump vector High_Memory equ 0FF00h ;Memory in Common Area RamDatY_Offset equ 42h - 3 ;Offset to the RamDatY Pointer ;Bank Strobe Port Definitions BnkStb equ 41h ;Bank Strobe Port CpyBnk equ 23h ;Offset of Bank Strobe Copy in RamDatY $Bank2 equ 00000010b ;Bank 2 Enable Bit $_RmEnb equ 00000001b ;Rom DisAble Bit ;Ascii Character Definitions Cr equ 0Dh ;Carriage Return Lf equ 0Ah ;Line Feed Tab equ 9 ;Tab page ;---------------------------------------------------------------------- ; PARK - Park the Hard Disk Heads (10_Jan_85) ;-------------------------------------------- ; Park: ld de,SignOn ld c,Bdos_PString call Bdos_Entry ;Print the Sign-On Message ld sp,High_Memory call Do_Cold ;Park the Hard Disk Drives ld de,DonMsg ld c,Bdos_PString call Bdos_Entry ;Print the Sign-Off Message Halt ;Stop Processing ;---------------------------------------------------------------------- ; Call the Bios Cold Boot Entry Point (10_Jan_85) ;------------------------------------------------ ; 1) The Cold Boot Entry point to the bios (1st entry in the bios ; jump table) is located by looking at locations 1 & 2 which ; point to the warm boot address (the desired address + 3). ; Do_Cold: ld hl,Execute_Park ld de,High_Memory ld bc,End_Park - Start_Park ldir ;Move Bank Switch Code into place ld hl,(Bios_Address) ld de,RamDatY_Offset add hl,de ld e,(hl) inc hl ld d,(hl) push de pop iy ;IY:= System RamDatY call High_Memory ;Call the Routine ret ;Return Execute_Park: .Phase High_Memory ;---------------------------------------------------------------------- ; Local Routine to do Bank Switching (10_Jan_85) ;----------------------------------------------- ; 1) This is the common routine for seting or clearing bits in the ; Bank Strobe register. ; 5) Example: to set bit 3; B=11110111b, C=00001000b A=Don't Care ; Start_Park: ld a,0 ld (iy+CpyBnk),a out (BnkStb),a ;Enable the Rom and Bank 1 call Rom_Park ld a,$BANK2 or $_RMENB out (BnkStb),a ret End_Park: .DePhase ;---------------------------------------------------------------------- ; DATA - Print Strings (20_Jul_84) ;--------------------------------- ; SignOn: db 1Ah,'MD-HD Drive Shut Down Program Rev ' db ((rev and 0F0h) shr 4) + '0', '.', (rev and 0Fh) + '0' db Tab,Tab,Tab,Tab,' Copyright 1984' db cr,lf,'Morrow Designs Inc.' db Tab,Tab,Tab,Tab,Tab,Tab,'San Leandro, Ca' db Cr,Lf,Lf,Lf,Lf,Lf,Lf,Lf,Lf,Lf,Lf,'$' DonMsg: db Cr,Lf,Tab db ' You may now turn off the power to your system' db Cr,Lf,Tab db ' or press Reset to ReStart your system$' end