1
I’m creating a bootloader but had a problem writing on screen
I am using two files the bootloader.asm and Keyboard.asm
bootloader.asm:
%include "src/assembly/setings.asm"
[org BOOTADD]
_mode:
_grapichmode:
mov ax, 0x4F02
mov bx, 0x0105
int 10h
_loopgrapich:
mov ah, 00h
int 16h
cmp al, "L"
je _linemode
jmp _loopgrapich
_linemode:
mov ah, 0
mov al, 3
int 10h
push word msg
call _print
msg db "Ola Mundo", 0
_loopline:
mov ah, 00h
int 16h
cmp al, "L"
je _grapichmode
jmp _loopline
_hang:
jmp _hang
%include "src/assembly/keyboard.asm"
Keyboard.asm
_print:
%define strptr [bp + 4]
push bp
mov bp, sp
mov si, strptr
.charloop:
lodsb
cmp si, 0
je _end
mov ah, 0Eh
mov bh, 0
mov bl, 0Fh
int 10h
;jmp .charloop
_end:
pop bp
ret 2
simplifying the code I have two modes a chart and a line and alternate between them using shift + L. In line mode I define to print the message Hello World, but al returns an empty string, and quado habilito o jmp . charloop he gets in an eternal loop.
What is the contents of the file
setings.asm
? Are you setting segment registers in this file? How are you compiling the files, generating the image and running boot?– Gomiero
friend, I do not know what I did but I managed to solve the problem, I thank for the help
– nasg4