From: H. Peter Anvin Date: Tue, 22 Aug 2006 00:10:00 +0000 (-0700) Subject: Modularize the pause bird function; don't print dots for bootsects and com32 X-Git-Tag: syslinux-3.20-pre17~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f8c092bd1435421518dd8a7922b5d89e5ed8576e;p=profile%2Fivi%2Fsyslinux.git Modularize the pause bird function; don't print dots for bootsects and com32 --- diff --git a/bootsect.inc b/bootsect.inc index c22af3e..b1360a5 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 2d2073f..6b65dd9 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 c1b845a..7d9f57a 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 ; 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 ; Pausebird function push eax ; Total bytes to transfer cmp eax,(1 << 16) ; Max 64K in one transfer @@ -87,8 +86,17 @@ load_high: pop eax ; Total bytes to transfer add edi,ecx sub eax,ecx + pop bx ; Pausebird function jnz .read_loop ; More to read... + .eof: - pop es + pop es ; 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 04450b4..0c10516 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