;Small-c Compiler rev 1.1 re:NASM c0.1.5 Aug 2008
	[MAP ALL HELLO.MAP]
	SECTION .text vstart=0100h

;/** small-c HELLO.C demo, inline asm, Call5 interface. **/ 
; 
;hello() 
hello:
;{ 
;	ot("Hello!$"); /** [1] **/ 
	MOV  AX,cc1+0
	PUSH AX
	CALL ot
	ADD  SP,2
;	keyp();       /** await keypress **/ 
	CALL keyp
;} 
	RET
; 
;ot() 
ot:
;{  /** Call 5 Fn print string. DS:DX`str, cl`9    **/ 
;   /**  [1] Strings terminated with '$' !!        **/ 
;   /** DI reg is unknown to small-c, so it should **/ 
;   /** be safe to use as a scratch register.      **/ 
;#asm 
  pop  di     ;; stack -> 0[ret]2[ptr2str] 
  pop  dx 
  push dx     ;; caller cleans the stack. 
  push di 
  mov  cl, 9 
  call 5      ;; cmd.exe or pcdos 
;} 
	RET
; 
;keyp() 
keyp:
;{ 
;#asm 
  mov  ah, 0 
  int  16h    ;; pause for keypress for user to see output. 
;} 
	RET
; 
;/** eof **/                                                                    
;                              
	;-; SECTION .dseg align=16 ;; commented out for .com version
cc1:	DB 72,101,108,108,111,33,36,0
	;-; SECTION .dseg align=16 ;; commented out for .com version

;0 errors in compilation.
;	-= END =-