Difference between revisions of "EZBOOTS.ASM"
(Correct ; from : for comment line) |
(Add Category:Imsai) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
; JHA 7/29/2018 | ; JHA 7/29/2018 | ||
; ocr'ED an IMAGE of this, then cleaned it up a bunch | ; 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 | ;EZEOOTS.ASM VERSION 1.0 10/27/75 JRB | ||
− | ; | + | ;AUTOMATIC BOOTSTRAP SIMULATOR FOR STARTING CP/M |
− | ; IN SYSTEMS IN | + | ; IN SYSTEMS IN WHICH AUTOMATIC BOOTSTRAP DISK |
; INTERFACE FIRMNARE HAS NOT YET BEEN INSTALLED. | ; INTERFACE FIRMNARE HAS NOT YET BEEN INSTALLED. | ||
− | ;NOT NEEDED ONCE | + | ;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, | + | ;A SEPERATE VERSION, WITH ERROR RETRIES, IS |
− | ; RECOMMENDED IF YOU HAVE A | + | ; RECOMMENDED IF YOU HAVE A WAY OP KEEPING IT RESIDENT. |
BSBASE EQU 4000H ;YOU MAY CHANGE THIS TO ANY VALUE | BSBASE EQU 4000H ;YOU MAY CHANGE THIS TO ANY VALUE | ||
− | ;GREATER | + | ;GREATER THAT 7FH.IF BELOW 4000H |
;PROGRAM MUST BE RELOADED EACM | ;PROGRAM MUST BE RELOADED EACM | ||
;TIME YOU WANT TO BOOT CP/M. | ;TIME YOU WANT TO BOOT CP/M. | ||
Line 28: | Line 29: | ||
MVI A.BCMD AND 0FFH ;LO 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,BCMD SHR 8 AND 0FFM ;HI ORDER | + | MVI A,BCMD SHR 8 AND 0FFM ;HI ORDER HALF OF SAME |
OUT DISK | OUT DISK | ||
;READ SECTOR. ONE TRY ONLY. | ;READ SECTOR. ONE TRY ONLY. | ||
LXI H,BSTAT ;POINT AT STATUS BYTE OF STRING | LXI H,BSTAT ;POINT AT STATUS BYTE OF STRING | ||
XRA A ; SET ZERO IN A | XRA A ; SET ZERO IN A | ||
− | MOV M,A ;ZERO STATUS | + | MOV M,A ;ZERO STATUS BYTE |
; N. B. A=0 IS ALSO Disk COMMAND TO DO STRING 0 | ; N. B. A=0 IS ALSO Disk COMMAND TO DO STRING 0 | ||
OUT DISK ;DO IT! | OUT DISK ;DO IT! | ||
Line 42: | Line 43: | ||
JNZ HANG ;..DISK READ FAILED. | JNZ HANG ;..DISK READ FAILED. | ||
JMP EXIT ;READ WAS ok, GO TO ROUTINE READ IN. | JMP EXIT ;READ WAS ok, GO TO ROUTINE READ IN. | ||
− | ;PRE-INITIALIZED COMMAND STRING | + | ;PRE-INITIALIZED COMMAND STRING FOR DISK (MUST BE IN RAM) |
BCMD: DB 21H ;CONMAND BYTE: READ, UNIT 1 | BCMD: DB 21H ;CONMAND BYTE: READ, UNIT 1 | ||
− | BSTAT: DB 0 ;STATUS BYTE, SET BY DISK | + | BSTAT: DB 0 ;STATUS BYTE, SET BY DISK WHEN DONE |
DW 0 :TRACK 0 (2 BYTES) | DW 0 :TRACK 0 (2 BYTES) | ||
DB 1 ;SECTOR 1 | DB 1 ;SECTOR 1 | ||
Line 51: | Line 52: | ||
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