diff options
author | H. Peter Anvin <hpa@linux.intel.com> | 2011-01-25 14:11:11 -0800 |
---|---|---|
committer | H. Peter Anvin <hpa@linux.intel.com> | 2011-01-25 14:11:11 -0800 |
commit | ac1a3f7dc145eafd199f2d14d26b34c77af7d586 (patch) | |
tree | c5709bb3ae8eb0e55ee5709fffe0ef454cc9b668 /core/diskboot.inc | |
parent | 808d43ea43c9df30a0a6922ef4cb4678634d41ab (diff) | |
download | syslinux-ac1a3f7dc145eafd199f2d14d26b34c77af7d586.tar.gz |
diskstart: move writestr_early out of boot sector
We can save 8 bytes in the boot sector by moving writestr_early out
and putting the real routine in sector 1.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'core/diskboot.inc')
-rw-r--r-- | core/diskboot.inc | 27 |
1 files changed, 8 insertions, 19 deletions
diff --git a/core/diskboot.inc b/core/diskboot.inc index 8f04f376..4a730b0b 100644 --- a/core/diskboot.inc +++ b/core/diskboot.inc @@ -390,8 +390,15 @@ kaboom: pop dword [fdctab] ; Restore FDC table .patch: ; When we have full code, intercept here mov si,bailmsg - call writestr_early +.loop: lodsb + and al,al + jz .done + mov ah,0Eh ; Write to screen as TTY + mov bx,0007h ; Attribute + int 10h + jmp short .loop +.done: xor ax,ax .again: int 16h ; Wait for keypress ; NB: replaced by int 18h if @@ -401,24 +408,6 @@ kaboom: jmp short .norge ; -; -; writestr_early: write a null-terminated string to the console -; This assumes we're on page 0. This is only used for early -; messages, so it should be OK. -; -writestr_early: - pushad -.loop: lodsb - and al,al - jz .return - mov ah,0Eh ; Write to screen as TTY - mov bx,0007h ; Attribute - int 10h - jmp short .loop -.return: popad - ret - -; ; INT 13h wrapper function ; xint13: |