File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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-
211215msg_Load db "MBR " , 0
212216msg_Ok db "OK" , 0
213217msg_Error db "Error!" , 0
218+ %endif
214219
215220align 16
216221GDTR32: ; Global Descriptors Table Register
You can’t perform that action at this time.
0 commit comments