aboutsummaryrefslogtreecommitdiffstats
path: root/core/isolinux.asm
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2009-05-13 18:35:35 -0700
committerH. Peter Anvin <hpa@zytor.com>2009-05-13 18:35:35 -0700
commit577e49042d7266a9676244b4a89caf3bda184e7d (patch)
treeb7a18bf9fcf486728ddae3809e89803021b7bd9a /core/isolinux.asm
parent8d08421d2bd72fe1ca4532405e4282461eb68f30 (diff)
downloadsyslinux-577e49042d7266a9676244b4a89caf3bda184e7d.tar.gz
core: move initial code to a new .init segment; unify .bss+.bss1
Move code used before loading is complete to a new .init segment; .text is now only the stuff that is used at any time. Move the .bss1 segment down to where .bss and .bss2 already are; it seems to fit better there now. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'core/isolinux.asm')
-rw-r--r--core/isolinux.asm14
1 files changed, 9 insertions, 5 deletions
diff --git a/core/isolinux.asm b/core/isolinux.asm
index 8481b4b8..4cb4cb86 100644
--- a/core/isolinux.asm
+++ b/core/isolinux.asm
@@ -200,7 +200,7 @@ _spec_len equ _spec_end - _spec_start
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
@@ -693,9 +693,7 @@ writemsg: push ax
;
writechr:
- jmp near writechr_simple ; 3-byte jump
-
-writechr_simple:
+.simple:
pushfd
pushad
mov ah,0Eh
@@ -1079,6 +1077,7 @@ rl_checkpt equ $ ; Must be <= 800h
; ----------------------------------------------------------------------------
; End of code and data that have to be in the first sector
; ----------------------------------------------------------------------------
+ section .text
all_read:
@@ -1093,7 +1092,12 @@ 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