From 467e19b262d435f1820539bc0c85ed4fa31b9687 Mon Sep 17 00:00:00 2001 From: Michal Idziorek Date: Thu, 4 Sep 2014 23:38:33 +0200 Subject: Finally we have a 2 stage bootloader ! This one can load the ramdis up to 0xfffff :) --- boot/print_string_16.asm | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) (limited to 'boot/print_string_16.asm') diff --git a/boot/print_string_16.asm b/boot/print_string_16.asm index 5d8ad5c..92b4ea0 100644 --- a/boot/print_string_16.asm +++ b/boot/print_string_16.asm @@ -26,3 +26,50 @@ print_string: popa ;pop all registers ret ;return to caller + +print_nextline: + + pusha + + mov ah,0x3 + mov bh,0 + int 0x10 + + mov ah,0x2 + mov bh,0 + inc dh + mov dl,0 + int 0x10 + popa + ret + + +;print byte from al to screen + print_hex_byte: + + pusha + + mov [.temp],al + shr al,4 + cmp al,10 + sbb al,69h + das + + mov ah,0Eh + int 10h + + mov al,[.temp] + ror al,4 + shr al,4 + cmp al,10 + sbb al,69h + das + + mov ah,0Eh + int 10h + +popa + + ret + + .temp db 0 -- cgit v1.2.3