Hi everyone, and thanks to Hutch and Mike
Here it is
http://www.busybeesolutions.com/cgi-bin/intro/htm.exe
and here's the source, it was made in MASM32
http://www.busybeesolutions.com/sourcefiles/htm.asm
Andy
Here it is
http://www.busybeesolutions.com/cgi-bin/intro/htm.exe
and here's the source, it was made in MASM32
http://www.busybeesolutions.com/sourcefiles/htm.asm
Andy
Can you feel the power :)
The only thing my first Asm32 app did was print hello world.
The only thing my first Asm32 app did was print hello world.
Leet man, thanks for sharing :) :alright:
Latigo
Latigo
GREAT :)
How about adding a command line argument parser?
How about adding a command line argument parser?
Awessem <--> Assem
Now with a couple MASM macros the code flow would be more intuitive.
Now with a couple MASM macros the code flow would be more intuitive.
Beaster:
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.
bitRAKE:
If the world consisted of only macros, you would be king
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.
bitRAKE:
If the world consisted of only macros, you would be king
Andy,
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.
Regards,
hutch@movsd.com:alright:
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.
Regards,
hutch@movsd.com:alright:
andy981,
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.
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.
That is really cool
Thanks
Thanks
I made this a few month a ago in C
and will generate
HTML "My String"
W
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 == '"')
fprintf(writo,"\"");
if(c == '\n')
{fprintf(writo,"\"");
c= ' ';
fprintf(writo,"\nHTML = HTML & \"");
c = getc(htmr);
while(c == '\n')
{c= ' ';}}
if (c != EOF)
fprintf(writo,"%c", c);
}
fprintf(writo,"\"");
fclose(htmr);
fclose(writo);
printf("Your HTML file has been properly converted to work in an ASP NewsLetter.\n");
}
and will generate
HTML "My String"
W
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 == '"')
fprintf(writo,"\"");
if(c == '\n')
{fprintf(writo,"\"");
c= ' ';
fprintf(writo,"\nHTML = HTML & \"");
c = getc(htmr);
while(c == '\n')
{c= ' ';}}
if (c != EOF)
fprintf(writo,"%c", c);
}
fprintf(writo,"\"");
fclose(htmr);
fclose(writo);
printf("Your HTML file has been properly converted to work in an ASP NewsLetter.\n");
}