summaryrefslogtreecommitdiff
path: root/sample/comecho.asm
diff options
context:
space:
mode:
authorhpa <hpa>2003-11-24 02:44:42 +0000
committerhpa <hpa>2003-11-24 02:44:42 +0000
commit43cf4dda600db1ccd05d9788c7b1da0cde7c0413 (patch)
tree0c69eaa8d2e0f49bc4ea8770762a97d4552771ad /sample/comecho.asm
parent4a10396ab1f114fc37fa8f276e047fe3c283671c (diff)
downloadsyslinux-2.08-pre1.tar.gz
Fix COMBOOT/COM32 command-line generation.syslinux-2.08-pre1
Add test programs.
Diffstat (limited to 'sample/comecho.asm')
-rw-r--r--sample/comecho.asm35
1 files changed, 35 insertions, 0 deletions
diff --git a/sample/comecho.asm b/sample/comecho.asm
new file mode 100644
index 00000000..3cdf601a
--- /dev/null
+++ b/sample/comecho.asm
@@ -0,0 +1,35 @@
+;
+; Simple COMBOOT program that just prints out its own command line.
+; This also works in DOS.
+;
+
+ org 100h
+
+_start:
+ xor cx,cx
+ mov cl,[80h] ; Command line len
+ mov si,81h ; Command line
+
+ mov dl,"<"
+ mov ah,02h
+ int 21h
+
+.writechar:
+ lodsb
+ mov dl,al
+ mov ah,02h
+ int 21h
+ loop .writechar
+
+ mov dx,end_str
+ mov ah,09h
+ int 21h
+
+ ; Exit with near return, INT 20h, or INT 21h AX=4C00h
+ ret
+
+
+end_str db ">", 0Dh, 0Ah, "$"
+
+
+ \ No newline at end of file