diff options
| author | Michal Idziorek <m.i@gmx.at> | 2014-09-04 23:38:33 +0200 |
|---|---|---|
| committer | Michal Idziorek <m.i@gmx.at> | 2014-09-04 23:38:33 +0200 |
| commit | 467e19b262d435f1820539bc0c85ed4fa31b9687 (patch) | |
| tree | c3ee7690b089713614309857ecfc046d6a13d160 /boot/print_string_16.asm | |
| parent | 487ecc1615ccc0368f1520c1146b2b43cdab6577 (diff) | |
Finally we have a 2 stage bootloader !
This one can load the ramdis up to 0xfffff :)
Diffstat (limited to 'boot/print_string_16.asm')
| -rw-r--r-- | boot/print_string_16.asm | 47 |
1 files changed, 47 insertions, 0 deletions
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 |
