Add logo by Abi Rasheed
[profile/ivi/syslinux.git] / core / writestr.inc
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 ;
22 crlf:           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 ;
37 writestr:
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