Look:
Code: Select all
;bootsect.asm
[BITS 16]
[ORG 0x07C00]
jmp start
BOOTSEG EQU 0x07c0
INITSEG EQU 0x9000
start:
mov ax,BOOTSEG
mov ds,ax
mov ax,INITSEG
mov es,ax
mov cx,20
sub si,si
sub di,di
rep
movsw
nop
nop
jmp INITSEG:go ;I find the go offset address is error
go: mov ax,cs
mov ds,ax
mov es,ax
mov ss,ax
mov sp,0xFF00
nop
nop
call DispStr
jmp $
DispStr:
mov ax,BootMessage ;this BootMessage offset address is error,too
mov bp,ax
mov cx,16
mov ax,01301h
mov bx,000ch
mov dl,0
int 10h
ret
BootMessage:db"Hello, OS world!"
times 510-($-$$) db 0
dw 0xaa55
and start using bochs.when I debug it,I find the label go and
BootMessage offset address is error,How to solve it?
Thanks.