summaryrefslogtreecommitdiff
path: root/writestr.inc
diff options
context:
space:
mode:
authorhpa <hpa>2002-04-26 22:43:29 +0000
committerhpa <hpa>2002-04-26 22:43:29 +0000
commit32f428c681e06add996b1b850a31a27abaadd23b (patch)
tree911d3e37ec4bd0bbc8bca7dd600fdc13b88ec212 /writestr.inc
parent2cc53253d89a526df7fa989a4c057cb74dce5b1e (diff)
downloadsyslinux-32f428c681e06add996b1b850a31a27abaadd23b.tar.gz
Even more common code factoringsyslinux-1.73-pre2
Diffstat (limited to 'writestr.inc')
-rw-r--r--writestr.inc43
1 files changed, 43 insertions, 0 deletions
diff --git a/writestr.inc b/writestr.inc
new file mode 100644
index 00000000..8b614cdf
--- /dev/null
+++ b/writestr.inc
@@ -0,0 +1,43 @@
+;; $Id$
+;; -----------------------------------------------------------------------
+;;
+;; Copyright 1994-2002 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
+;; the Free Software Foundation, Inc., 53 Temple Place Ste 330,
+;; Bostom MA 02111-1307, USA; either version 2 of the License, or
+;; (at your option) any later version; incorporated herein by reference.
+;;
+;; -----------------------------------------------------------------------
+
+;;
+;; writestr.inc
+;;
+;; Code to write a simple string.
+;;
+
+;
+; crlf: Print a newline
+;
+crlf: mov si,crlf_msg
+ ; Fall through
+
+;
+; cwritestr: write a null-terminated string to the console, saving
+; registers on entry.
+;
+; Note: writestr and cwritestr are distinct in SYSLINUX (only)
+;
+cwritestr:
+ pushfd
+ pushad
+.top: lodsb
+ and al,al
+ jz .end
+ call writechr
+ jmp short .top
+.end: popad
+ popfd
+ ret
+