root/core/writestr.inc

Revision 95a461a83adf65aa5689b65f85330ce970121f56, 1.1 KB (checked in by H. Peter Anvin <hpa@…>, 3 years ago)

core: zero bss and uibss; fix some section confusions

Set .bss and .uibss as soon as we are fully loaded. This gives us the
more familiar behavior of most normal execution environments. The
.earlybss section is not zeroed; therefore, all variables that are set
before we have the opportunity to zero need to go in this section.

This checkin also fixes some incorrect section directives.

Signed-off-by: H. Peter Anvin <hpa@…>

  • Property mode set to 100644
Line 
1;; -----------------------------------------------------------------------
2;;
3;;   Copyright 1994-2008 H. Peter Anvin - All Rights Reserved
4;;
5;;   This program is free software; you can redistribute it and/or modify
6;;   it under the terms of the GNU General Public License as published by
7;;   the Free Software Foundation, Inc., 53 Temple Place Ste 330,
8;;   Boston MA 02111-1307, USA; either version 2 of the License, or
9;;   (at your option) any later version; incorporated herein by reference.
10;;
11;; -----------------------------------------------------------------------
12
13;;
14;; writestr.inc
15;;
16;; Code to write a simple string.
17;;
18
19;
20; crlf: Print a newline
21;
22crlf:           push ax
23                mov al,CR
24                call writechr
25                mov al,LF
26                call writechr
27                pop ax
28                ret
29
30;
31; writestr: write a null-terminated string to the console, saving
32;            registers on entry.
33;
34; Note: writestr_early and writestr are distinct in
35; SYSLINUX and EXTLINUX, but not PXELINUX and ISOLINUX
36;
37writestr:
38                pushfd
39                pushad
40.top:           lodsb
41                and al,al
42                jz .end
43                call writechr
44                jmp short .top
45.end:           popad
46                popfd
47                ret
Note: See TracBrowser for help on using the browser.