Skip to content

Commit dd16e5b

Browse files
committed
-dDEBUG option for bios-novideo
1 parent 1213998 commit dd16e5b

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/boot/bios-novideo.asm

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,11 @@ bootcode:
7272
mov ax, 0x00E3 ; Init port, 9600bps 8N1
7373
int 0x14
7474

75+
%ifdef DEBUG
7576
; Output message to serial
7677
mov si, msg_Load
7778
call output_serial
79+
%endif
7880

7981
; Get the BIOS E820 Memory Map
8082
; https://wiki.osdev.org/Detecting_Memory_(x86)#BIOS_Function:_INT_0x15,_EAX_=_0xE820
@@ -167,9 +169,11 @@ check_A20:
167169
; cmp eax, 0x00017EE9 ; Match against the Pure64 binary
168170
; jne halt
169171

172+
%ifdef DEBUG
170173
; Output message to serial
171174
mov si, msg_Ok
172175
call output_serial
176+
%endif
173177

174178
mov bl, 'B' ; 'B' as we booted via BIOS
175179

@@ -190,6 +194,7 @@ halt:
190194
;------------------------------------------------------------------------------
191195

192196

197+
%ifdef DEBUG
193198
;------------------------------------------------------------------------------
194199
; Output a string via serial
195200
; IN: SI - Address of start of string
@@ -207,10 +212,10 @@ output_serial_done:
207212
popa
208213
ret
209214
;------------------------------------------------------------------------------
210-
211215
msg_Load db "MBR ", 0
212216
msg_Ok db "OK", 0
213217
msg_Error db "Error!", 0
218+
%endif
214219

215220
align 16
216221
GDTR32: ; Global Descriptors Table Register

0 commit comments

Comments
 (0)