Annotation of /tags/mkinitrd-6_1_5/isolinux/writestr.inc
Parent Directory | Revision Log
Revision 899 -
(hide annotations)
(download)
Wed Aug 5 17:52:52 2009 UTC (15 years, 1 month ago) by niro
File size: 1180 byte(s)
Wed Aug 5 17:52:52 2009 UTC (15 years, 1 month ago) by niro
File size: 1180 byte(s)
tagged 'mkinitrd-6_1_5'
1 | niro | 532 | ;; $Id: writestr.inc,v 1.1 2007-09-01 22:44:06 niro Exp $ |
2 | ;; ----------------------------------------------------------------------- | ||
3 | ;; | ||
4 | ;; Copyright 1994-2002 H. Peter Anvin - All Rights Reserved | ||
5 | ;; | ||
6 | ;; This program is free software; you can redistribute it and/or modify | ||
7 | ;; it under the terms of the GNU General Public License as published by | ||
8 | ;; the Free Software Foundation, Inc., 53 Temple Place Ste 330, | ||
9 | ;; Boston MA 02111-1307, USA; either version 2 of the License, or | ||
10 | ;; (at your option) any later version; incorporated herein by reference. | ||
11 | ;; | ||
12 | ;; ----------------------------------------------------------------------- | ||
13 | |||
14 | ;; | ||
15 | ;; writestr.inc | ||
16 | ;; | ||
17 | ;; Code to write a simple string. | ||
18 | ;; | ||
19 | |||
20 | section .text | ||
21 | ; | ||
22 | ; crlf: Print a newline | ||
23 | ; | ||
24 | crlf: push ax | ||
25 | mov al,CR | ||
26 | call writechr | ||
27 | mov al,LF | ||
28 | call writechr | ||
29 | pop ax | ||
30 | ret | ||
31 | |||
32 | ; | ||
33 | ; cwritestr: write a null-terminated string to the console, saving | ||
34 | ; registers on entry. | ||
35 | ; | ||
36 | ; Note: writestr and cwritestr are distinct in SYSLINUX (only) | ||
37 | ; | ||
38 | cwritestr: | ||
39 | 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 |