我在程序集中创建了一个引导加载程序,它输出“Hello World”。我想在这个引导加载程序中插入一个背景图像。那么如何修改这段代码呢?非常感谢。
bits 16 ;
org 0x7c00 ;
jmp main ;
Message db "Welcome Home, booting from low-level 16-bit...", 0x0
MessageB db "Chaturaka's own bootloader program written in x86 assembly language.", 0x0
AnyKey db "Press any key to reboot...", 0x0
;
Println:
lodsb ;
or al, al
jz complete
mov ah, 0x0e
int 0x10 ;
jmp Println ;
complete:
call PrintNwL
;
PrintNwL:
mov al, 0 ;
stosb ;
mov ah, 0x0E
mov al, 0x0D
int 0x10
mov al, 0x0A
int 0x10
ret
;
Reboot:
mov si, AnyKey
call Println
call GetPressedKey
;
db 0x0ea
dw 0x0000
dw 0xffff
;
GetPressedKey:
mov ah, 0
int 0x16 ;
ret
;
main:
cli ;
mov ax,cs
mov ds,ax
mov es,ax
mov ss,ax
sti ;
mov si, Message
call Println
mov si, MessageB
call Println
call PrintNwL
call PrintNwL
call Reboot
times 510 - ($-$$) db 0 ;
dw 0xAA55 ;
希望你能回答这个问题。