I tried to write a program that reads the boot sector from floppy drive A and store it at a variable called Sector. I am having problem with my code but I do not know where to debug, please help. Thank you. The following is my code for MASM:
.model small
.stack
.data
Sector db 512 dup(0)
.code
Start:
mov ax, @data
mov ds, ax
mov ax, 0201h
mov cx, 0001h
mov dx, 0000h
mov bx, 0000h
int 13h
mov cx, 512
mov si, 0000h
lea di, Sector
cld
rep movsb
mov cx, 512
mov ax, 0200h
mov bx, 0000h
Loop1:
inc bx
mov dl, [bx]
int 21h
loop loop1
mov ax, 4c00h
int 21h
end Start
.model small
.stack
.data
Sector db 512 dup(0)
.code
Start:
mov ax, @data
mov ds, ax
mov ax, 0201h
mov cx, 0001h
mov dx, 0000h
mov bx, 0000h
int 13h
mov cx, 512
mov si, 0000h
lea di, Sector
cld
rep movsb
mov cx, 512
mov ax, 0200h
mov bx, 0000h
Loop1:
inc bx
mov dl, [bx]
int 21h
loop loop1
mov ax, 4c00h
int 21h
end Start