second stage boot loader now loads the main program
[bootcensus] / src / startup.s
index 42e4b21..bff3991 100644 (file)
 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
        .code32
-       .section .startup
+       .section .startup,"ax"
 
        .extern _bss_start
        .extern _bss_end
 
+       # zero the BSS section
        xor %eax, %eax
        mov _bss_start, %edi
        mov _bss_size, %ecx
+       jz skip_bss_zero
        shr $4, %ecx
        rep stosl
+skip_bss_zero:
 
 
 logohack:
@@ -131,8 +134,6 @@ xval: .long 0
 yval: .long 0
 frameno: .long 0
 
-numbuf: .space 16
-
 logo_pal:
        .incbin "logo.pal"