N
N
Nikita2013-03-01 18:09:53
Programming
Nikita, 2013-03-01 18:09:53

Client-server applications in Assembler

It is required to develop an ordinary console network application in assembly language (does not matter MASM, TASM, NASM, etc.) with the ability to send messages between the client and server parts using TCP, UDP and ICMP protocols, while it is desirable to implement receive timeout (wait a specific time after what to give an error), send timeout (a specific time is allotted for sending a message), the ability to set the TTL manually, the ability to bind several clients to one port.

Someone can tell in which direction to dig?
What literature to see?
What ready-made libraries exist for this?
Are there similar projects?

PS, in turn, I promise an interesting article to Habr for help, if everything works out.

Answer the question

In order to leave comments, you need to log in

5 answer(s)
J
jetman, 2013-03-01
@jetman

If you want to use assembler because of the size of the output code, are you sure that in the end the assembler application will take much less code than gcc in -Os mode?
If all this is just for fun, then my question disappears by itself.

S
Scioner, 2013-03-01
@Scioner

Here are ready-made examples for sockets: forum.sources.ru/index.php?showtopic=186464&st=0&
In general, you just need to know the syntax and dig MSDN on winsock and threading (in particular, createthread, most likely you will only need it)

I
Ilya Evseev, 2013-03-01
@IlyaEvseev

I would first write a prototype in C (examples and documentation on the network wagon),
generate an assembler text and then write my own version based on it.
For gcc, asm code generation is done with the "-S" key:

gcc -S -o myprog. myprog.c

A
afiskon, 2013-03-01
@afiskon

Use system calls (sockets), it will be no more difficult than writing in C. There are a lot of literature and articles on the socket, you'll figure it out. If writing under Windows, try MASM or FASM. Under *nix, NASM is better.

A
Alexey Akulovich, 2013-03-01
@AterCattus

win, *nix? But in any case - wasm.ru (when they move there, well, or a forum).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question