realloc(): better implementation allowing in-place growth
[syslinux.git] / sample / comecho.asm
blob7125686a4e809d9d5880b2321f871ac453275eaa
2 ; Simple COMBOOT program that just prints out its own command line.
3 ; This also works in DOS.
6 org 100h
8 _start:
9 xor cx,cx
10 mov cl,[80h] ; Command line len
11 mov si,81h ; Command line
13 mov dl,"<"
14 mov ah,02h
15 int 21h
17 .writechar:
18 lodsb
19 mov dl,al
20 mov ah,02h
21 int 21h
22 loop .writechar
24 mov dx,end_str
25 mov ah,09h
26 int 21h
28 ; Exit with near return, INT 20h, or INT 21h AX=4C00h
29 ret
32 end_str db ">", 0Dh, 0Ah, "$"