diff options
author | H. Peter Anvin <hpa@zytor.com> | 2006-08-21 17:10:00 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2006-08-21 17:10:00 -0700 |
commit | f8c092bd1435421518dd8a7922b5d89e5ed8576e (patch) | |
tree | b4907fef551c7c6401b347e870ddca36b028fa42 | |
parent | 417fd5c59cf7907a95cc45b65c69a748a980fea7 (diff) | |
download | syslinux-f8c092bd1435421518dd8a7922b5d89e5ed8576e.tar.gz |
Modularize the pause bird function; don't print dots for bootsects and com32
-rw-r--r-- | bootsect.inc | 4 | ||||
-rw-r--r-- | com32.inc | 4 | ||||
-rw-r--r-- | loadhigh.inc | 30 | ||||
-rw-r--r-- | runkernel.inc | 4 |
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 @@ -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 |