Difference between revisions of "EZBOOTS.ASM"

From TheRetroWagon
Jump to: navigation, search
(2nd entry)
(3rd entry)
Line 1: Line 1:
<syntaxhighlight lang="asm">;EZEOOTS.ASM VERSION 1.0 10/27/75 JR!
+
<syntaxhighlight lang="asm">
 +
; JHA 7/29/2018
 +
; ocr'ED an IMAGE of this, then cleaned it up a bunch
  
)AUTONATIC SOOTSTRAP SIMULATOR FOR STARTING CP/M
+
;EZEOOTS.ASM VERSION 1.0 10/27/75 JRB
5 IN SYSTEMS IN NMICM AUTOMATIC BOOTSTRAP DISK
+
 
 +
;AUTONATIC SOOTSTRAP SIMULATOR FOR STARTING CP/M
 +
; IN SYSTEMS IN NMICM AUTOMATIC BOOTSTRAP DISK
 
; INTERFACE FIRMNARE HAS NOT YET BEEN INSTALLED.
 
; INTERFACE FIRMNARE HAS NOT YET BEEN INSTALLED.
  
Line 11: Line 15:
 
; RECOMMENDED IF YOU HAVE A HAY OP KEEPING IT RESIDENT.
 
; RECOMMENDED IF YOU HAVE A HAY OP KEEPING IT RESIDENT.
  
SBASE EQU “DOOM gYOU MAY CHANGE THIS TO ANY VALUE
+
BSBASE  EQU 4000H    ;YOU MAY CHANGE THIS TO ANY VALUE
iGREATER TNAT 7FH.‘IF BELOW “DOOM
+
                    ;GREATER TNAT 7FH.‘IF BELOW “DOOM
5PROGRAM MUST BE RELOADED EACM
+
                    ;PROGRAM MUST BE RELOADED EACM
5TIME YOU WANT TO BOOT CPIM.
+
                    ;TIME YOU WANT TO BOOT CP/M.
 
+
EXIT   EQU O       ;WHERE TMIS PROGRAM EXITS TO
EXIT EOO O. ;HHERE TMIS PROGRAM EXITS TO
+
DISK   EQU 0FDH    ;FLOPPY DISK COMMAND OUTPUT PORT
 
 
DISK EOU OPDM )FLOPPY DISK COMMAND OUTPUT PORT
 
ORG DEASE pTHIS IS ALSO START ADDRESS
 
  
 +
        ORG BBASE          ;THIS IS ALSO START ADDRESS
 
;SET DISK INTERFACE STRING POINTER
 
;SET DISK INTERFACE STRING POINTER
MVI A,IOM ;"SET STRING POINTER 0" COMMAND
+
        MVI A,10H  ;"SET STRING POINTER 0" COMMAND
OUT DISK ;SEND COMMAND TD DISK INTERFACE
+
        OUT DISK   ;SEND COMMAND TD DISK INTERFACE
MVI A.DCND AND OPFM 5L0 ORDER OF STRING LOC
+
        MVI A.BCMD AND 0FFH    ;LO ORDER OF STRING LOC
OUT DISK ;SEND TO DISK
+
        OUT DISK   ;SEND TO DISK
MVI A,ECMD SNR 8 AND OFFM 5MI ORDER MALE OF SAME
+
        MVI A,BCMD SHR 8 AND 0FFM  ;HI ORDER MALE OF SAME
OUT DISK -
+
        OUT DISK
 
+
;READ SECTOR. ONE TRY ONLY.
1READ SECTOR. ONE TRY ONLY.
+
        LXI H,BSTAT ;POINT AT STATUS BYTE OF STRING
LXI H,DSTAT fiPOINT AT STATUS BYTE OF STRING
+
        XRA A       ; SET ZERO IN A
 
+
        MOV M,A     ;ZERO STATUS arr:
an A ;¢ET ZERO IN A
+
        ; N. B. A=0 IS ALSO Disk COMMAND TO DO STRING 0
 
+
        OUT DISK    ;DO IT!
an M,A ;ZERO STATUS arr:
+
WAIT:   ADD M      ;LOOK FOR NON-0 STATUS
 
+
        JZ  WAIT    ;KEEP LOOKING TILL IT COMES
;u. 3. Ana IS ALSO Dts: COMMAND TO Do sraxuc 0
+
;ALL THAT IS ABSOLUTELY ESSENTIAL AT THIS POINT IS TO JMP 0.
 
+
HANG:   CPI 1       ; THIS CODE CAUSES A HAND HERE IF
our 01:: ;oo :1:
+
        JNZ HANG   ;..DISK READ FAILED.
war: ADD n 5LO0K no: now-o STATUS
+
        JMP EXIT    ;READ WAS ok, GO TO ROUTINE READ IN.
 
+
:PRE-INITIALIZED COMMAND STRING POR DISK (MUST BE IN RAM)
J2 uAIr ;KEEP LOOKING TILL IT cones ‘
+
BCMD:   DB  21H    ;CONMAND BYTE: READ, UNIT 1
,ALL THAT IS ABSOLUTELY ESSENTIAL AT THIS POINT ts to 4MP 0.
+
BSTAT: DB  0      ;STATUS BYTE, SET BY DISK when DONE
HAND: ca! 1 ,rnxs cooE CAUSES A HAND HERE IF
+
        DW  0      :TRACK 0 (2 BYTES)
 
+
        DB  1       ;SECTOR 1
JNZ HANG ;..DISK READ FAILED.
+
        DW  0      ;BBUFFER ADDRESS: READ TO LOCATION 0
 
 
JMP ext? ;IEAD w»: on, Do To aourxn: READ IN.
 
:PRE-INITIALIZED COMMAND STRING POR DISK (nusr DE IN RAM)
 
acno: 03 21M ;CONMAND aer: READ, UNIT 1
 
BSTAT: on o ;STATUS BYTE, 5:? av DISK when DONE
 
 
 
on o :TRACK o (2 arrss)
 
 
 
Do 1 ;secroa 1
 
 
 
on o ;eDuEFEA ADDuEss: READ TO LOCATION 0
 
  
 
END DBASE
 
END DBASE
 
</syntaxhighlight>
 
</syntaxhighlight>

Revision as of 22:53, 31 July 2018

; 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