;--------------------------------------------------------------------------␊ |
; Boot code is loaded at 0:7C00h.␊ |
;␊ |
start␊ |
start:␊ |
;␊ |
; Set up the stack to grow down from kBoot0Segment:kBoot0Stack.␊ |
; Interrupts should be off while the stack is being manipulated.␊ |
|
␊ |
jmp .continue␊ |
␊ |
.found␊ |
.found:␊ |
DebugChar('*')␊ |
␊ |
;␊ |
|
jnc .exit␊ |
loop .chs_loop␊ |
␊ |
.exit␊ |
.exit:␊ |
DebugChar('R')␊ |
pop cx␊ |
ret␊ |
|
; Clobber list:␊ |
; AX, BX, SI␊ |
;␊ |
print_string␊ |
print_string:␊ |
mov bx, 1 ; BH=0, BL=1 (blue)␊ |
cld ; increment SI after each lodsb call␊ |
.loop␊ |
.loop:␊ |
lodsb ; load a byte from DS:SI into AL␊ |
cmp al, 0 ; Is it a NULL?␊ |
je .exit ; yes, all done␊ |
mov ah, 0xE ; INT10 Func 0xE␊ |
int 0x10 ; display byte in tty mode␊ |
jmp short .loop␊ |
.exit␊ |
.exit:␊ |
ret␊ |
␊ |
␊ |
|
ebios_lba dd 0 ; starting LBA of the intial extended partition.␊ |
ebios_present db 0 ; 1 if EBIOS is supported, 0 otherwise.␊ |
␊ |
pad_boot␊ |
pad_boot:␊ |
times 446-($-$$) db 0␊ |
␊ |
pad_table_and_sig␊ |
pad_table_and_sig:␊ |
times 510-($-$$) db 0␊ |
dw kBootSignature␊ |
␊ |
END␊ |
;END␊ |