flat assembler
Message board for the users of flat assembler.
 Home   FAQ   Search   Register 
 Profile   Log in to check your private messages   Log in 
flat assembler > Main > Simple fast cgi web application in Assembly

Author
Thread Post new topic Reply to topic
jorido



Joined: 23 Jan 2017
Posts: 40
Simple fast cgi web application in Assembly
I want an example of a simple fast cgi web app in Assembly. I'm aware about the forum written in assembly but it's quite complex, uses macroses, many pages and templates, etc. Whereas I want a simple, single html page one: nginx + assembly + fastcgi + html page/template in a file.

How can I do that?

I've seen some examples in C and C++ but I haven't been able to adopt them for Assembly. Will I have to call fast cgi library functions written in C/C++ from Assembly?
Post 26 Aug 2017, 01:45
View user's profile Send private message Reply with quote
vivik



Joined: 29 Oct 2016
Posts: 160
Are you fine with incompetent responses, or you rather wait for somebody who knows this?

You probably shouldn't do that in assembly. It's just a text generation, it shouldn't be that cpu heavy.

Look at golang, webpages and parallelization are it's specializations. I don't guarantee that learning it worths it.

Study C programs, and study their assembler output. Then try to replace C with assembly function by function. You will have to call the same dll in assembly as you call in C, or some of them.

Post examples in C you found.
Post 27 Aug 2017, 09:24
View user's profile Send private message Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3436
Location: Bulgaria
Re: Simple fast cgi web application in Assembly

jorido wrote:
I want an example of a simple fast cgi web app in Assembly. I'm aware about the forum written in assembly but it's quite complex, uses macroses, many pages and templates, etc.



The FastCGI protocol is not easy at all. AFAIK, the C programs uses some library that make the script look like simple CGI script.

You are considering AsmBB complex, but the implementation of FastCGI protocol is only one single file: "fcgi.asm": https://asm32.info/fossil/repo/asmbb/artifact/68f9999f29632086

You can use it alone with your own "business logic". Also, it can be cleaned from some code, you don't need - for example, the logging procedure LogEvent that is dependent on SQLite but is not necessary for the protocol itself.

_________________
Tox ID: A48DEF727DF44C3B5C2E576B65021F1A45D8FA52E2F8E257F1CAE148BBADB162FDF7820BD1F9
Post 28 Aug 2017, 19:22
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
jorido



Joined: 23 Jan 2017
Posts: 40
thx
Post 31 Aug 2017, 13:31
View user's profile Send private message Reply with quote
jorido



Joined: 23 Jan 2017
Posts: 40
JohnFound, did you create "fcgi.asm" yourself? if yes, is there the standard, official one?
Post 31 Aug 2017, 13:38
View user's profile Send private message Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3436
Location: Bulgaria

jorido wrote:
JohnFound, did you create "fcgi.asm" yourself? if yes, is there the standard, official one?



Yes, I created "fcgi.asm" myself. It is an implementation of the server part of the FastCGI protocol.

RWASA web server implements the client side of the standard and there is no (AFAIK) other assembly language code available related to the FastCGI protocol.

_________________
Tox ID: A48DEF727DF44C3B5C2E576B65021F1A45D8FA52E2F8E257F1CAE148BBADB162FDF7820BD1F9
Post 31 Aug 2017, 19:48
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >

Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2005 phpBB Group.

Main index   Download   Documentation   Examples   Message board
Copyright © 2004-2016, Tomasz Grysztar.