EZBOOTS.ASM

From TheRetroWagon
Revision as of 22:53, 31 July 2018 by Jeffa (talk | contribs) (3rd entry)
Jump to: navigation, search
; JHA 7/29/2018
; ocr'ED an IMAGE of this, then cleaned it up a bunch

;EZEOOTS.ASM VERSION 1.0 10/27/75 JRB

;AUTONATIC SOOTSTRAP SIMULATOR FOR STARTING CP/M
; IN SYSTEMS IN NMICM AUTOMATIC BOOTSTRAP DISK
; INTERFACE FIRMNARE HAS NOT YET BEEN INSTALLED.

;NOT NEEDED ONCE NEN PROM'S ARE INSTALLED IN PIP.

;THIS IS THE SHORT VERSION, SUITABLE FOR TOGGLINC IN.
;A SEPERATE VERSION, NITM ERROR RETRIES, IS
; RECOMMENDED IF YOU HAVE A HAY OP KEEPING IT RESIDENT.

BSBASE  EQU 4000H    ;YOU MAY CHANGE THIS TO ANY VALUE
                    ;GREATER TNAT 7FH.‘IF BELOW “DOOM
                    ;PROGRAM MUST BE RELOADED EACM
                    ;TIME YOU WANT TO BOOT CP/M.
EXIT    EQU O       ;WHERE TMIS PROGRAM EXITS TO
DISK    EQU 0FDH    ;FLOPPY DISK COMMAND OUTPUT PORT

        ORG BBASE           ;THIS IS ALSO START ADDRESS
;SET DISK INTERFACE STRING POINTER
        MVI A,10H   ;"SET STRING POINTER 0" COMMAND
        OUT DISK    ;SEND COMMAND TD DISK INTERFACE
        MVI A.BCMD AND 0FFH     ;LO ORDER OF STRING LOC
        OUT DISK    ;SEND TO DISK
        MVI A,BCMD SHR 8 AND 0FFM   ;HI ORDER MALE OF SAME
        OUT DISK
;READ SECTOR. ONE TRY ONLY.
        LXI H,BSTAT ;POINT AT STATUS BYTE OF STRING
        XRA A       ; SET ZERO IN A
        MOV M,A     ;ZERO STATUS arr:
        ; N. B. A=0 IS ALSO Disk COMMAND TO DO STRING 0
        OUT DISK    ;DO IT!
WAIT:   ADD M       ;LOOK FOR NON-0 STATUS
        JZ  WAIT    ;KEEP LOOKING TILL IT COMES
;ALL THAT IS ABSOLUTELY ESSENTIAL AT THIS POINT IS TO JMP 0.
HANG:   CPI 1       ; THIS CODE CAUSES A HAND HERE IF
        JNZ HANG    ;..DISK READ FAILED.
        JMP EXIT    ;READ WAS ok, GO TO ROUTINE READ IN.
:PRE-INITIALIZED COMMAND STRING POR DISK (MUST BE IN RAM)
BCMD:   DB  21H     ;CONMAND BYTE: READ, UNIT 1
BSTAT:  DB  0       ;STATUS BYTE, SET BY DISK when DONE
        DW  0       :TRACK 0 (2 BYTES)
        DB  1       ;SECTOR 1
        DW  0       ;BBUFFER ADDRESS: READ TO LOCATION 0

END DBASE