Title Micro_Decision Installation SubProceedure Number 2 (10_Sept_84) ; ; Copyright 1984 ; Morrow Designs, Inc. ; San Leandro, Ca. ; John Zalabak ; .z80 Aseg Org 0100h ; This is the Second of Three SubProceedures used to install the ; number of Physical Drives on a Micro-Decision. This is done as part ; of the Micro-Desision installation proceedure. ; ; This SubProceedure announces the end of the installation ; proceedure and then waits for the user to type a carriage return ; before continuing. ; ;---------------------------------------------------------------------- ; Index (10_Sept_84) ;------------------- ; ; Isub2_Main Main Line of Terminal Initialization ; Clear_Screen Clear the Console Screen ; Get_Position Determine the drive's position ----------------------------------------------- ; Equates (10_Sept_84) ;--------------------- ; ;Bios/Bdos Equates Bios_Entry equ 0 ;Bios: Entry Vector Location Bdos_Entry equ 5 ;Bdos: Entry Vector Location Bdos_ConIn equ 1 ; Console Input Bdos_ConOut equ 2 ; Console Output Bdos_PString equ 9 ; Print a Sting on the Console ;Offsets RamDatY_Offset equ 42h ;RamDatY Pointer from Start of Jump Table Mtab_Offset equ 44h ;Mtab Pointer from Start of Jump Table @Double_Sided equ 5 ;Bit Position for Double Sided in DskDef0 ;Non Printing Ascii Equates Tab equ 09h ;Tab Lf equ 0Ah ;Line Feed Cr equ 0Dh ;Carriage Return Esc equ 1Bh ;Escape Bright equ '(' ;Start High Lighting Dim equ ')' ;Start Low Lighting page ;====================================================================== ; Main Line of Sub Installation Proceedure 2 (10_Sept_84) ;======================================================== ; Isub2_Main: call Clear_Screen ;Clear the Console Screen call Get_Position ;If (This is a Single Drive System) or a jr nz,IsSk1 ld de,Single_Message ; DE:= Single Drive Message ld c,Bdos_PString ; C:= Print String Function call Bdos_Entry ; Print the Single Drive Message jr IsLp1 IsSk1: ld de,Msg1 ;Else DE:= Pointer 1st part of Message ld c,Bdos_PString ; C:= Print String Function call Bdos_Entry ; Print the Message call Get_Position ld de,A_Tbl call Print_Position ld de,Msg2 ; DE:= Pointer 2nd part of Message ld c,Bdos_PString ; C:= Print String Function call Bdos_Entry ; Print the Message call Get_Position ld de,B_Tbl call Print_Position ld de,Msg3 ; DE:= Pointer 1st part of Message ld c,Bdos_PString ; C:= Print String Function call Bdos_Entry ; Print the Message sole Input Funciton call Bdos_Entry ; Get the User's Response cp Cr jr nz,IsLp1 ;Until (Carriage Return Entered) jp Bios_Entry ;Goto Bios Entry (Warm Boot) ;====================================================================== ; Clear the Console Screen (20_Jul_84) ;===================================== ; 1) This Routine Simply outputs a Carriage Return followed by 50 Line ; Feeds to the Console. ; 2) NONE of the Register Pairs are altered. ; Clear_Screen: push bc push de push hl ld c,Bdos_ConOut ;C:= Bdos Console Output Function Number ld e,Cr ;E:= Carriage Return call Bdos_Entry ;Print a Carriage Return ld b,50 ;B:= Character Counter ld c,Bdos_ConOut ;C:= Bdos Console Output Function Number CsSk1: push bc ;Repeat ld e,Lf ; E:= Line Feed call Bdos_Entry ; Print the Line Feed pop bc djnz CsSk1 ;Until (Character Counter - 1 eq 0) pop hl pop de pop bc ret ;Return page ;====================================================================== ; Get the Drive Position Code (10_Sept_84) ;========================================= ; 1) This Routine returns ; 0 for a Single Drive System ; 1 for a Single Sided Double Drive System ; 2 for a Double Sided Double Drive System ; Get_Position: ld de,RamDatY_Offset call Get_Bios_Pntr ;DE:= Pointer to Start of RamDatY dec de dec de ;DE:= Pointer to Vnum ld a,(de) ;Update Vnum or a ;If (there's only one drive) ret z ; Return (A:= 0) ld de,Mtab_Offset call Get_Bios_Pntr ;DE:= Pointer to DskDef0 ld a,(de) bit @Double_Sided,a ;If (it a Single Sided System) ld a,1 ; ret z ; Return (A:= 1) inc a ;Else ret ; Return (A:= 2) ;---------------------------------------------------------------------- ; Get Return the DE register pair holds the vector. ; 4) Register Usage: ; DE -> Enter:= Offset to Vector; Exit:= Vector ; HL -> Pointer to base of Bios (Cold Start Entry) ; Get_Bios_Pntr: ld hl,(Bios_Entry+1) ;HL:= Pointer to Warm Boot Entry ld l,0 ;HL:= Pointer to Base of Bios add hl,de ;HL:= Pointer to RamDatY Pointer ld e,(hl) inc hl ld d,(hl) ;DE:= Contents of Addr Pointed to by HL ret ;Return page ;====================================================================== ; Print the Position Message (10_Sept_84) ;======================================== ; 1) This routine uses the position code (passed in the accm) and the ; table base (passed in the DE) to print the positionally dependent ; parts of the message. ; 2) Register Usage: ; A -> Position Code (0-Single, 1-Double, 2-Double,Double-Sided) ; C -> holds the bdos function code ; DE -> Table Base (A_Tbl or B_Tbl) ; HL -> Used to get the pointer to the message ; Print_Position: or a ;If (Single Drive System) ret z ; Return sla a ld l,a ld h,0 ;HL:= Drive Code * 2 add hl,de ;HL:= Pointer to message ld e,(hl) inc hl ld d,(hl) ;DE:= Message String ld c,Bdos_PString ;C:= Bdos Print String Function call Bdos_Entry ;Print the String ret ;Return page ;---------------------------------------------------------------------- ; Drive Position Tables (10_Sept_84) ;----------------------------------- ; A_Tbl: dw 0 ;Null for Single Drive System dw Mlf ;Pointer to the Left Hand Drive Mesg dw Mdn ;Pointer to the Lower Drive Mesg Mlf: db 'left hand$' Mdn: db 'lower$' B_Tbl: dw 0 ;Null for Single Drive System dw Mrt ;Pointer to the Right Hand Drive Mesg dw Mup ;Pointer to the Upper Drive Mesg Mrt: db 'right h lease store your ' db Esc,Bright db 'DISTRIBUTION ' db Esc,Dim db 'diskette in a safe place. $' page ;---------------------------------------------------------------------- ; Double Drive Message Text (10_Sept_84) ;--------------------------------------- ; Msg1: db Esc,Dim,Cr,Lf,Lf,Lf,Tab db 'Please remove your ' db Esc,Bright db 'DISTRIBUTION ' db Esc,Dim db 'diskette from your $' ; Get this part of the message from the A_Tbl Msg2: db ' disk ' db Cr,Lf,Tab db 'drive and store it in a safe place.' db Cr,Lf,Lf,Tab db 'Now take your ' db Esc,Bright db 'WORKING ' db Esc,Dim db 'diskette from your $' ; Get this part of the message from the B_Tbl Msg3: db ' disk drive' db Cr,Lf,Tab db 'and put it in your $' ; Get this part of the message from the A_Tbl Msg4: db ' disk drive so we can finish' db Cr,Lf,Tab db 'the installation proceedure.' db Cr,Lf,Lf,Lf,Tab db 'Press ' db Esc,Bright db 'RETURN ' db Esc,Dim db 'when you are ready to proceed $' end ;---------------------------------------------------------------------- ; Original Message Text ;---------------------- ; Single Drive Message Please store your DISTRIBUTION diskette in a safe place. Double Drive Message Please remove your DISTRIBUTION diskette from your right hand disk drive and store it in a safe place. Now take your WORKING diskette from you right hand disk drive and put it in you left hand disk drive so we can finish the installation proceedure. Press RETURN when you are ready to proceed .