Difference between revisions of "EZBOOTS.ASM"

From TheRetroWagon
Jump to: navigation, search
(Initial creation)
 
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
<syntaxhighlight lang="asm">
 
<syntaxhighlight lang="asm">
;EZEOOTS.ASM VERSION 1.0 10/27/75 JR!
+
; JHA 7/29/2018
 +
; ocr'ED an IMAGE of this, then cleaned it up a bunch
 +
; from file IMSAI_CPM_System_Users_Guide_Version_1.31_Rev_2_Mar77.pdf
  
)AUTONATIC SOOTSTRAP SIMULATOR FOR STARTING CP/M
+
;EZEOOTS.ASM VERSION 1.0 10/27/75 JRB
5 IN SYSTEMS IN NMICM AUTOMATIC BOOTSTRAP DISK
+
 
 +
;AUTOMATIC BOOTSTRAP SIMULATOR FOR STARTING CP/M
 +
; IN SYSTEMS IN WHICH AUTOMATIC BOOTSTRAP DISK
 
; INTERFACE FIRMNARE HAS NOT YET BEEN INSTALLED.
 
; INTERFACE FIRMNARE HAS NOT YET BEEN INSTALLED.
  
;NOT NEEDED ONCE NEN PROM'S ARE INSTALLED IN PIP.
+
;NOT NEEDED ONCE NEW PROM'S ARE INSTALLED IN FIF.
  
 
;THIS IS THE SHORT VERSION, SUITABLE FOR TOGGLINC IN.
 
;THIS IS THE SHORT VERSION, SUITABLE FOR TOGGLINC IN.
;A SEPERATE VERSION, NITM ERROR RETRIES, IS
+
;A SEPERATE VERSION, WITH ERROR RETRIES, IS
; RECOMMENDED IF YOU HAVE A HAY OP KEEPING IT RESIDENT.
+
; RECOMMENDED IF YOU HAVE A WAY OP KEEPING IT RESIDENT.
 
 
SBASE EQU “DOOM gYOU MAY CHANGE THIS TO ANY VALUE
 
iGREATER TNAT 7FH.‘IF BELOW “DOOM
 
5PROGRAM MUST BE RELOADED EACM
 
5TIME YOU WANT TO BOOT CPIM.
 
 
 
EXIT EOO O. ;HHERE TMIS PROGRAM EXITS TO
 
  
DISK EOU OPDM )FLOPPY DISK COMMAND OUTPUT PORT
+
BSBASE  EQU 4000H    ;YOU MAY CHANGE THIS TO ANY VALUE
ORG DEASE pTHIS IS ALSO START ADDRESS
+
                    ;GREATER THAT 7FH.IF BELOW 4000H
 +
                    ;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
 
;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 HALF 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 BYTE
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 FOR 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>
 +
[[Category:Code]]
 +
[[Category:Imsai]]

Latest revision as of 02:35, 3 August 2018

; JHA 7/29/2018
; ocr'ED an IMAGE of this, then cleaned it up a bunch
; from file IMSAI_CPM_System_Users_Guide_Version_1.31_Rev_2_Mar77.pdf

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

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

;NOT NEEDED ONCE NEW PROM'S ARE INSTALLED IN FIF.

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

BSBASE  EQU 4000H    ;YOU MAY CHANGE THIS TO ANY VALUE
                    ;GREATER THAT 7FH.IF BELOW 4000H
                    ;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 HALF 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 BYTE
        ; 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 FOR 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