home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 8 Other
/
08-Other.zip
/
DBOOTNEW.ZIP
/
BSTRAP.ASM
next >
Wrap
Assembly Source File
|
1984-08-31
|
1KB
|
43 lines
page 61,132
title Bstrap - update fixed disk bootstrap
subttl Code
page +
Code segment
assume cs:Code, ds:Code, es:Code, ss:Code
org 100h
Bstrap proc far
mov ax,201h ; read 1 sector
lea bx,Boot ; buffer address
mov cx,1 ; cyl 0, sector 1
mov dx,80h ; head 0, drive 0
int 13h ; read fixed disk boot
jc Exit ; exit if error
push bx ; save bx
push cx ; save cx
push dx ; save dx
mov dx,bx ; address buffer
mov cx,1beh ; maximum boot length
sub bx,bx ; read from stdin
mov ah,3fh ; read from stream
int 21h ; dos service
pop dx ; restore dx
pop cx ; restore cx
pop bx ; restore bx
jc Exit ; exit if error
mov ax,301h ; write 1 sector
int 13h ; update boot record
jc Exit ; exit if error
mov bx,2 ; write to stderr
mov cx,Msgl ; length of message
lea dx,Msg ; message address
mov ah,40h ; write to stream
int 21h ; send message
Exit:
int 20h ; exit program
Msg db 13,10,'Boot record updated.',13,10
Msgl equ $-Msg
Boot db 512 dup (?)
Bstrap endp
Code ends
end Bstrap