Bugy Code
Posted: Wed Oct 29, 2003 12:38 pm
Could you please tell me what's wrong with this code? I just can't find it out. It loads OK(trust me, I testet it with a nother function), but it won't display a string.
code
[BITS 16]
[ORG 0x2C00]
cli
mov ax,0xFFFF
mov sp,ax
mov ax,0x2C00
mov ss,ax
xor ax,ax
mov ds,ax
sti
jmp startrealk
printstringk:
mov ah,13
mov al,0x01
mov bh,0x00
mov bl,0x07
int 0x10
ret
startrealk:
mov es,[message1]
mov bp,message1
mov cx,0x3
call printstringk
message1 db 'Hi',0
code end
code
[BITS 16]
[ORG 0x2C00]
cli
mov ax,0xFFFF
mov sp,ax
mov ax,0x2C00
mov ss,ax
xor ax,ax
mov ds,ax
sti
jmp startrealk
printstringk:
mov ah,13
mov al,0x01
mov bh,0x00
mov bl,0x07
int 0x10
ret
startrealk:
mov es,[message1]
mov bp,message1
mov cx,0x3
call printstringk
message1 db 'Hi',0
code end