aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2006-08-21 17:10:00 -0700
committerH. Peter Anvin <hpa@zytor.com>2006-08-21 17:10:00 -0700
commitf8c092bd1435421518dd8a7922b5d89e5ed8576e (patch)
treeb4907fef551c7c6401b347e870ddca36b028fa42
parent417fd5c59cf7907a95cc45b65c69a748a980fea7 (diff)
downloadsyslinux-f8c092bd1435421518dd8a7922b5d89e5ed8576e.tar.gz
syslinux-f8c092bd1435421518dd8a7922b5d89e5ed8576e.tar.xz
syslinux-f8c092bd1435421518dd8a7922b5d89e5ed8576e.zip
Modularize the pause bird function; don't print dots for bootsects and com32
-rw-r--r--bootsect.inc4
-rw-r--r--com32.inc4
-rw-r--r--loadhigh.inc30
-rw-r--r--runkernel.inc4
4 files changed, 26 insertions, 16 deletions
diff --git a/bootsect.inc b/bootsect.inc
index c22af3e7..b1360a57 100644
--- a/bootsect.inc
+++ b/bootsect.inc
@@ -1,6 +1,6 @@
;; -----------------------------------------------------------------------
;;
-;; Copyright 1994-2005 H. Peter Anvin - All Rights Reserved
+;; Copyright 1994-2006 H. Peter Anvin - All Rights Reserved
;;
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
@@ -41,8 +41,8 @@ load_bootsec:
mov [trackbuf+4],edi ; Copy from this address
push edi ; Save load address
xor dx,dx ; No padding
+ mov bx,abort_check ; Don't print dots, but allow abort
call load_high
- call crlf
sub edi,100000h
mov [trackbuf+8],edi ; Save length
diff --git a/com32.inc b/com32.inc
index 2d2073f2..6b65dd93 100644
--- a/com32.inc
+++ b/com32.inc
@@ -1,6 +1,6 @@
;; -----------------------------------------------------------------------
;;
-;; Copyright 1994-2003 H. Peter Anvin - All Rights Reserved
+;; Copyright 1994-2006 H. Peter Anvin - All Rights Reserved
;;
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
@@ -64,8 +64,8 @@ is_com32_image:
pop eax ; File length
pop si ; File handle
xor dx,dx ; No padding
+ mov bx,abort_check ; Don't print dots, but allow abort
call load_high
- call crlf
com32_start:
mov ebx,com32_call_start ; Where to go in PM
diff --git a/loadhigh.inc b/loadhigh.inc
index c1b845a2..7d9f57a4 100644
--- a/loadhigh.inc
+++ b/loadhigh.inc
@@ -1,6 +1,6 @@
;; -----------------------------------------------------------------------
;;
-;; Copyright 1994-2002 H. Peter Anvin - All Rights Reserved
+;; Copyright 1994-2006 H. Peter Anvin - All Rights Reserved
;;
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
@@ -31,25 +31,24 @@
; Inputs: SI = file handle/cluster pointer
; EDI = target address in high memory
; EAX = size of remaining file in bytes
-; DX = zero-padding mask (e.g. 0003h for pad to dword)
+; DX = zero-padding mask (e.g. 0003h for pad to dword)
+; BX = subroutine to call at the top of each loop
+; (to print status and check for abort)
;
; Outputs: SI = file handle/cluster pointer
; EDI = first untouched address (not including padding)
;
load_high:
- push es
+ push es ; <AAA> ES
- mov bx,xfer_buf_seg
- mov es,bx
+ mov cx,xfer_buf_seg
+ mov es,cx
.read_loop:
and si,si ; If SI == 0 then we have end of file
jz .eof
- push si
- mov si,dot_msg
- call cwritestr
- pop si
- call abort_check
+ call bx
+ push bx ; <AA> Pausebird function
push eax ; <A> Total bytes to transfer
cmp eax,(1 << 16) ; Max 64K in one transfer
@@ -87,8 +86,17 @@ load_high:
pop eax ; <A> Total bytes to transfer
add edi,ecx
sub eax,ecx
+ pop bx ; <AA> Pausebird function
jnz .read_loop ; More to read...
+
.eof:
- pop es
+ pop es ; <AAA> ES
ret
+
+dot_pause:
+ push ax
+ mov al,'.'
+ call writechr
+ pop ax
+ jmp abort_check ; Handles the return
diff --git a/runkernel.inc b/runkernel.inc
index 04450b41..0c105163 100644
--- a/runkernel.inc
+++ b/runkernel.inc
@@ -1,6 +1,6 @@
;; -----------------------------------------------------------------------
;;
-;; Copyright 1994-2005 H. Peter Anvin - All Rights Reserved
+;; Copyright 1994-2006 H. Peter Anvin - All Rights Reserved
;;
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
@@ -278,6 +278,7 @@ read_kernel:
jbe high_load_done ; Zero left (tiny kernel)
xor dx,dx ; No padding needed
+ mov bx,dot_pause ; Print dots...
call load_high ; Copy the file
high_load_done:
@@ -599,6 +600,7 @@ loadinitrd:
pop eax ; Bytes to load
mov dx,0FFFh ; Pad to page
+ mov bx,dot_pause ; Print dots...
call load_high ; Load the file
pop es