;; -----------------------------------------------------------------------
;;
-;; 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
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
;; -----------------------------------------------------------------------
;;
-;; 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
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
;; -----------------------------------------------------------------------
;;
-;; 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
; 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
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
;; -----------------------------------------------------------------------
;;
-;; 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
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:
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