alignb 8
SuperInfo resq 16 ; The first 16 bytes expanded 8 times
- section .text
+ section .init
;
; Some of the things that have to be saved very early are saved
; "close" to the initial stack pointer offset, in order to
; End of code and data that have to be in the first sector
; ----------------------------------------------------------------------------
+ section .text
all_read:
;
; Let the user (and programmer!) know we got this far. This used to be
;
; Fall through to the mainline code...
;
- section .text
; verbosity and using the full screen system
;
; E9 = JMP NEAR
- mov dword [kaboom.patch],0e9h+((kaboom2-(kaboom.patch+3)) << 8)
+ mov di,kaboom.patch
+ mov al,0e9h
+ stosb
+ mov ax,kaboom2-3
+ sub ax,bx
+ stosw
;
; Now we're all set to start with our *real* business. First load the
alignb open_file_t_size
Files resb MAX_OPEN*open_file_t_size
- section .text
+ section .init
;;
;; Primary entry point. Because BIOSes are buggy, we only load the first
;; CD-ROM sector (2K) of the file, so the number one priority is actually
;
writechr:
- jmp near writechr_simple ; 3-byte jump
-
-writechr_simple:
+.simple:
pushfd
pushad
mov ah,0Eh
; ----------------------------------------------------------------------------
; End of code and data that have to be in the first sector
; ----------------------------------------------------------------------------
+ section .text
all_read:
%include "cpuinit.inc"
; Patch the writechr routine to point to the full code
- mov word [writechr+1], writechr_full-(writechr+3)
+ mov di,writechr
+ mov al,0e9h
+ stosb
+ mov ax,writechr_full-3
+ sub ax,bx
+ stosw
; Tell the user we got this far...
%ifndef DEBUG_MESSAGES ; Gets messy with debugging on
section .bss2 write nobits align=16
- section .text exec write progbits align=16
+ section .init exec write progbits align=1
+ section .text exec write progbits align=1
section .bcopyxx exec write progbits align=16
section .data write progbits align=16
; verbosity and using the full screen system
;
; E9 = JMP NEAR
- mov dword [kaboom.patch],0e9h+((kaboom2-(kaboom.patch+3)) << 8)
+ mov di,kaboom.patch
+ mov al,0e9h
+ stosb
+ mov ax,kaboom2-3
+ sub ax,bx
+ stosw
;
; Now we're all set to start with our *real* business. First load the
.bss : {
__bss_start = .;
*(.bss)
+ *(.bss1)
*(.bss2)
__bss_end = .;
}
/* Initialized sections */
. = 0x7c00;
+ .init : {
+ FILL(0x90909090)
+ __init_start = .;
+ *(.init)
+ __init_end = .;
+ }
+ __init_len = __init_end - __init_start;
+ __init_dwords = (__init_len + 3) >> 2;
+
.text : {
FILL(0x90909090)
__text_start = .;
__uibss_len = __uibss_end - __uibss_start;
__uibss_dwords = (__uibss_len + 3) >> 2;
- .bss1 : {
- __bss1_start = .;
- *(.bss1)
- __bss1_end = .;
- }
- __bss1_len = __bss1_end - __bss1_start;
- __bss1_dwords = (__bss1_len + 3) >> 2;
-
- . = ASSERT(__bss1_end <= 0x10000, "64K overflow");
+ . = ASSERT(__uibss_end <= 0x10000, "64K overflow");
. = 0x100000;
.com32 : {