Hi everyone, and thanks to Hutch and Mike

Here it is


and here's the source, it was made in MASM32


Posted on 2001-11-13 15:40:38 by andy981
Can you feel the power :)

The only thing my first Asm32 app did was print hello world.
Posted on 2001-11-13 15:49:01 by eet_1024
Leet man, thanks for sharing :) :alright:

Posted on 2001-11-14 07:55:50 by latigo

How about adding a command line argument parser?
Posted on 2001-11-14 08:11:38 by beaster
Awessem <--> Assem

Now with a couple MASM macros the code flow would be more intuitive.
Posted on 2001-11-14 08:30:29 by bitRAKE
In the CGI world we use the QUERY_STRING environment variable to pass arguments, etc. from the client side. The client has no real way of pasing command line arguments. Through trip you can pass args on the server side.

When a client submits a page data can be retrieved from StdIn.

If the world consisted of only macros, you would be king
Posted on 2001-11-14 17:04:59 by eet_1024

I like your example. I have been looking for clean and simple examples for the next version of MASM32 and this one would be well suited for what I have been after.

If you are interested, please send me you preferred text for the top of the file and you email address so it can be added to the example code.

Alternatively just tweak it so it has your name and email address on it and send it to me at hutch@movsd.com

One suggestion, rename it as CGI.ASM or CGIDEMO.ASM for the example code.


Posted on 2001-11-14 18:57:11 by hutch--

Very nice code! But I think that it's not very comfortable to declare each string of html text in .data section. Look at my macro HTML in attachment.
Posted on 2001-11-14 22:58:29 by vkim
That is really cool

Posted on 2001-11-14 23:20:28 by andy981
I made this a few month a ago in C
and will generate

HTML "My String"
WEll It does this
HTML = HTML & "<title>County Number</title>"
HTML = HTML & "</head>"
HTML = HTML & " <body>"
HTML = HTML & " <div align=""center"">"
It was for getting ASP email code together

but it could be changed to do this
HTML "My String"

#include "stdio.h"
main( )
FILE *htmr,*writo;

char c;

htmr = fopen("MayNews.txt", "r");

writo = fopen("htmlw.txt","w");
fprintf(writo,"HTML = \"<!DOCTYPE HTML PUBLIC \"\"-//IETF//DTD HTML//EN\"\">\" & NL \n");
fprintf(writo,"HTML = HTML & \"");
while(c!= EOF)

c = getc(htmr);

if(c == '"')
if(c == '\n')
c= ' ';
fprintf(writo,"\nHTML = HTML & \"");
c = getc(htmr);
while(c == '\n')
{c= ' ';}}

if (c != EOF)
fprintf(writo,"%c", c);

printf("Your HTML file has been properly converted to work in an ASP NewsLetter.\n");
Posted on 2001-11-14 23:33:47 by andy981