www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/09/24/06:30:35

From: "M. Schulter" <mschulter AT value DOT net>
Newsgroups: comp.os.msdos.djgpp
Subject: another hello.s -- and thanks!
Date: 24 Sep 1997 06:31:59 GMT
Organization: Value Net Internetwork Services Inc.
Lines: 79
Message-ID: <60ac4v$cf4$1@vnetnews.value.net>
NNTP-Posting-Host: value.net
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Thanks to everyone who's helped with the hello.s question, and here's
another variation on Vic's program -- sort of "PostScript style" <grin>.

Someone pointed out that the -Wall and -g switches may have no effect, but
maybe it's a familiar pattern <grin>, so I tend to compile this

gcc -Wall -g -o hello32.exe hello32.s

Please feel free to point out bugs or flaws.

Most appreciatively,

Margo Schulter
mschulter AT value DOT net

(To reply, please remove any extra . in my default address --
the address immediately above is correct)


-------------------------- hello32.s -----------------------------

/* 
   This is a newbie standalone GAS program based upon an original
   version by Vic (tudor AT cam DOT org). For a PostScript programmer,
   this revision might be quite user-friendly <grin>: for example,
   the escape sequences to designate characters in a string.

   Thanks to all the GNU and DJGPP people for making such a great
   assembler available along with the code necessary to write
   Linux-style assembler programs like this in MS-DOS, and also to
   the Net-wide Assembler Project (NASM) for rendering a great service
   to the Internet community while proving that matters of taste are
   not to be disputed.

	                                     Margo Schulter
	                                     mschulter AT value DOT net
	                                     23 September 1996

*/ 

.file "hello32.s"	
.data
string0:
	.ascii "\n\n\52\52\52\52\52\52\52\52\52\52\52\52\52\52\52\0"
string1:	
	.ascii "\52\52\52\52\n\n\r\42\110\145\154\154\157\0"
string2:
	.ascii "\054\040\104\112\107\120\120\041\42\n\n\r\111\040\0"
string3:
	.ascii "\154\157\166\145\040\101\124\046\124\040\163\171\0"
string4:
	.ascii "\156\164\141\170\056\n\n\r\52\52\52\52\52\52\0"
string5:
	.ascii "\52\52\52\52\52\52\52\52\52\52\52\52\52\n\n\r\0"
.text
	.align 2
.globl _main
_main:
pushl $string0
call _printf
addl $4, %esp
pushl $string1
call _printf
addl $4, %esp
pushl $string2
call _printf
addl $4, %esp
pushl $string3
call _printf
addl $4, %esp
pushl $string4	
call _printf
addl $4, %esp
pushl $string5
call _printf
addl $4, %esp
ret


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019