home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS 1992 September
/
Simtel20_Sept92.cdr
/
msdos
/
pcmag
/
vol6n09.arc
/
BLOAD.SCR
next >
Wrap
Text File
|
1987-04-03
|
968b
|
31 lines
N BLOAD.COM
A
XOR BH,BH
MOV BL,[80] ;Get argument length.
MOV Byte Ptr [BX+81],0 ;Convert argument to ASCIIZ.
MOV DX,82
MOV AX,3D00 ;Open file for reading.
INT 21
JB 13E ;Exit if not found.
MOV BX,AX ;Else, filehandle in BX.
MOV AX,40
MOV DS,AX ;BIOS data segment.
MOV AX,B000 ;Monochrome buffer address.
MOV CX,1000 ;4K buffer.
CMP Word Ptr [63],3B4 ;Is it monochrome?
JZ 131 ;If yes, skip around.
ADD AX,800 ;Else, CGA buffer address.
ADD CX,3000 ;16K buffer.
MOV DS,AX ;Point to segment.
MOV DX,0 ;Point to Offset.
MOV AH,3F ;Read in file image.
INT 21
MOV AH,3E ;Close file.
INT 21
INT 20 ;Terminate.
RCX
40
W
Q