Annotation of /tags/mkinitrd-6_5_0/isolinux/writestr.inc
Parent Directory | Revision Log
Revision 1345 -
(hide annotations)
(download)
Fri Jun 3 21:22:00 2011 UTC (13 years, 3 months ago) by niro
File size: 1161 byte(s)
Fri Jun 3 21:22:00 2011 UTC (13 years, 3 months ago) by niro
File size: 1161 byte(s)
tagged 'mkinitrd-6_5_0'
1 | niro | 532 | ;; ----------------------------------------------------------------------- |
2 | ;; | ||
3 | niro | 1133 | ;; Copyright 1994-2008 H. Peter Anvin - All Rights Reserved |
4 | ;; | ||
5 | niro | 532 | ;; 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 | section .text | ||
20 | ; | ||
21 | ; crlf: Print a newline | ||
22 | ; | ||
23 | crlf: push ax | ||
24 | mov al,CR | ||
25 | call writechr | ||
26 | mov al,LF | ||
27 | call writechr | ||
28 | pop ax | ||
29 | ret | ||
30 | |||
31 | ; | ||
32 | niro | 1133 | ; writestr: write a null-terminated string to the console, saving |
33 | niro | 532 | ; registers on entry. |
34 | ; | ||
35 | niro | 1133 | ; Note: writestr_early and writestr are distinct in |
36 | ; SYSLINUX and EXTLINUX, but not PXELINUX and ISOLINUX | ||
37 | niro | 532 | ; |
38 | niro | 1133 | writestr: |
39 | niro | 532 | pushfd |
40 | pushad | ||
41 | .top: lodsb | ||
42 | and al,al | ||
43 | jz .end | ||
44 | call writechr | ||
45 | jmp short .top | ||
46 | .end: popad | ||
47 | popfd | ||
48 | ret |