home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.barnyard.co.uk
/
2015.02.ftp.barnyard.co.uk.tar
/
ftp.barnyard.co.uk
/
cpm
/
walnut-creek-CDROM
/
SIMTEL
/
CPMUG
/
CPMUG015.ARK
/
MDGSBOOT.ASM
< prev
next >
Wrap
Assembly Source File
|
1984-04-29
|
1KB
|
97 lines
.TITLE @CP/M COLD START LOADER REVISED 1/2/77@
; CP/M COLD START LOADER
; THIS PROGRAM IS LOADED AT LOCATION
; 0 BY THE BOOTSTRAP PROGRAM, AND RUN.
; IT'S PURPOSE IS TO LOAD AND RUN THE MAIN
; CP/M DISK OPERATING SYSTEM AT THE TOP OF
; THE MEMORY IN USE.
;
.PABS
.PHEX
.XLINK
MSIZE =\ /MEMORY SIZE IN K/
DCOM == 0F8H
DSTAT == 0F8H
TRACK == 0F9H
SECT == 0FAH
DDATA == 0FBH
WAIT == 0FCH
CBASE == (MSIZE-17)*1024
CPMB == CBASE+2900H
BOOTE == CBASE+3E00H
NSECTS == 50 ;NUMBER OF SECTORS.
.LOC 0
BOOT: LXI SP,100H
BOOT1: LXI B,2
MVI D,NSECTS
LXI H,CPMB
RBLK: MOV A,B
OUT DDATA
IN DSTAT
RRC
MVI A,1
JC ERROR
MVI A,13H
OUT DCOM
IN WAIT
ORA A
MVI A,1
JM ERROR
IN DSTAT
ANI 91H
JNZ ERROR
MOV A,C
CALL READ
RBLK1: JNZ ERROR
DCR D
JZ BOOTE
INR C
MOV A,C
CPI 27
JC RBLK2
MVI C,1
INR B
JMP RBLK
;
RBLK2: MOV A,C
CALL READ1
JMP RBLK1
;
;
READ1: OUT SECT
IN DSTAT
RRC
MVI A,1
JC RERR
MVI A,88H
JMP READE
;
READ: OUT SECT
IN DSTAT
RRC
MVI A,1
JC RERR
MVI A,8CH
READE: OUT DCOM
RLOOP: IN WAIT
ORA A
JP RDONE
IN DDATA
MOV M,A
INX H
JMP RLOOP
;
RDONE: IN DSTAT
RERR: ANI 9DH
RET
;
;
ERROR: CMA
OUT 0FFH
HLT
;
;
.LOC 7DH
JMP 0
.END