why the string can't display
Posted: Fri Nov 15, 2002 12:25 pm
=========================
why the string can't display
=========================
ORG 0x7c00
BOOTSEG equ 0x07c0
INITSEG equ 0x600
start:
;move all the code to 0x6000
jmp start1
nop
nop
nop
nop
start1:
mov ax,BOOTSEG
mov ds,ax
mov ax,INITSEG
mov es,ax
mov cx,256
cld
sub si,si
sub di,di
rep movsw
jmp INITSEG:go
go:
mov ax,cs
mov ds,ax
mov es,ax
mov ss,ax
mov sp,0x400 ; arbitrary value >>512
;read the cursor position
mov ah,0x03 ; read cursor pos
xor bh,bh
int 0x10
;display the string
mov cx,24
mov bx,0x0007 ; page 0, attribute 7 (normal)
mov bp,msg1
mov ax,0x1301 ; write string, move cursor
int 0x10
jmp $
msg1:
db 13,10
db "Loading system ..."
db 13,10,13,10
times 510-($-$$) db 0
dw 0xAA55
why the string can't display
=========================
ORG 0x7c00
BOOTSEG equ 0x07c0
INITSEG equ 0x600
start:
;move all the code to 0x6000
jmp start1
nop
nop
nop
nop
start1:
mov ax,BOOTSEG
mov ds,ax
mov ax,INITSEG
mov es,ax
mov cx,256
cld
sub si,si
sub di,di
rep movsw
jmp INITSEG:go
go:
mov ax,cs
mov ds,ax
mov es,ax
mov ss,ax
mov sp,0x400 ; arbitrary value >>512
;read the cursor position
mov ah,0x03 ; read cursor pos
xor bh,bh
int 0x10
;display the string
mov cx,24
mov bx,0x0007 ; page 0, attribute 7 (normal)
mov bp,msg1
mov ax,0x1301 ; write string, move cursor
int 0x10
jmp $
msg1:
db 13,10
db "Loading system ..."
db 13,10,13,10
times 510-($-$$) db 0
dw 0xAA55