summaryrefslogtreecommitdiff
path: root/loadhigh.inc
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 /loadhigh.inc
parent417fd5c59cf7907a95cc45b65c69a748a980fea7 (diff)
downloadsyslinux-f8c092bd1435421518dd8a7922b5d89e5ed8576e.tar.gz
Modularize the pause bird function; don't print dots for bootsects and com32
Diffstat (limited to 'loadhigh.inc')
-rw-r--r--loadhigh.inc30
1 files changed, 19 insertions, 11 deletions
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