I sent an email to privalov about fasm tutorials.....

My email was sort of multiple questions....

Mainly, there seems to be a distinct lack of tutorials specificaly for fasm.
I have an 8 meg web page, which now sits blank.
I would be happy to store and link any tutorials documentation on my site.
If ANYONE WITH GOOD UNDERSTANDING OF FASM IS WILLING TO WRITE TUTORIALS FOR FASM, AND OTHER DOCUMENTATION THIS WOULD BE GREAT.....
Let me know, and I'll see about working out details.....

Thanks again.....

Actually, I could probably free up 16 meg for web page.....

Should be lot's of space for tutorials, and docs.....

tnx

Also Privalov mentioned that I could also glean some of the tidbits of information from this site and make a list of them which could be used. I'm not sure how to go about finding all the tidbits of code though.... ANY Suggestions?
Posted on 2003-03-09 22:07:02 by va3gdr
This is the main problem I have with Fasm. A tool that expects the user to know so much should have more documentation. I guess as it matures more tutorials will come.
Posted on 2003-03-09 22:23:23 by Odyssey
What are you looking for?

How to program in assembly? Implementing CGI under Linux? Generating Master Boot Records?

How to use preprocessor directives to create a code library?
Posted on 2003-03-10 01:29:32 by eet_1024
Yes,

Any information you can give.....

rate it beginner intermediate or advanced, linux, win32, or dos.

I will try to arrange the site in sections..

linux beginner
linux inter
linux advance

dos "
dos "
dos "

win32 etc....

also api use for linux or windows,
creation of .inc files,
how to convert from nasm, masm32, etc etc...

Any Tutorials or documentation specific to Fasm would be great....

Thanks again.
Posted on 2003-03-10 01:42:40 by va3gdr
Here's a thread regarding the fasm ports of Icz's Tutorials http://www.asmcommunity.net/board/index.php?topic=7358

Here's my work on CGI under Win32 http://www.asmcommunity.net/board/index.php?topic=6745&highlight=cgi

Here is a very recent publication 2002 - Dec 12
http://www.drpaulcarter.com/pcasm/
Posted on 2003-03-10 02:00:25 by eet_1024
Converting from one assembly to another, or even to a different languange is not difficult if you are familiar with the dialects/languages.

Do you mean API useage as in appropriate use, or how to use specific API's. For Win32 there is an API help file (search this board). The Man Pages have API information for linux.

There is nothing special about *.inc files to fasm. You can include any file that you want, it will be assembled at that location.

What do YOU want to get out of learning assembly language?

There are many resources available that teach programming.
Posted on 2003-03-10 02:08:23 by eet_1024
Api help file for assembly doesn't do much good. Even for c++ it seems a pain... Everyone seems to assume that it's easily understood. The same way japanese people laugh at an english persons pronunciation of there language.

Assume for a minute that you don't know any programming language.
You look at basic, c, c++, pascal, fortran, cobal, etc, etc, etc, why learn italian, when you want to go to germany?
Assembler, is clean cut, powerful, fast, and once understood better, I think than any of these languages. Why, because they all seem to convert their code to assembler, and then that code to machine code. Via back end assembler.... Library this, include that, restriction on context, restriction on memory acces....
Sorry for the tangent.....
Back to assuming you know, no assembly.... What would you ask someone..... Help me understand, from a point of view from the base of the mountain. Where is the path to the summit....

What should I learn first..... 10 mnemonic...???
what should I do first, with these ten mnemonics....?????
How do I access, read, write, append files.....????
How do I control hardware,,.....??????
Sound, video, printer......???????
How do I mesh assembler code with the Windows API, or linux..???????
seems basic......??????
That's what holds so many people away from assembler....
Great people Like Privalov write these easy to get and "EASY TO USE ASSEMBLERS" but without a teacher, people wouldn't even be able to speak.....
Think of all the newbies, as children.... Teach them what they need to know first....
I don't even know for sure where to start.....

Here are the mnemonics I truly understand......

push, moves information onto the stack.......
pop, moves information off of the stack........
cmp, compares to things for difference....depending on difference I can use
je, jne jmp to go to another part of my program and do something else....

what can I do with these?
which ones should I learn next......
add
shr
sub
???????

These are the tutorials I'm looking for......
show me the bare minimum, and give me a starting point.... me and millions of others, who seem to be on the same search that I am.....

You know something,,,, Teach me

I can give a man a fish, and feed him for a day,,,,,
I can teach him to fish, and feed hime for his life.......

get me (us) started, we can only contribute to the assembler community...

Thanks for you time....

I hope you'll help...

You seem to be one of the ones who knows this stuff pretty much inside out...
Posted on 2003-03-10 02:33:40 by va3gdr
I can give a man a fish, and feed him for a day,,,,,
I can teach him to fish, and feed hime for his life.......


Teach a man how to teach himself, and he can do anything he desires.


First, you need to realize that you're not just learning assembly language. You are also learning about a specific architecture (such as registers and commands on the CPU and what they are generally used for), and an API (BIOS and DOS (int xx), Win32 (dll calls), Linux (int 0x80)). Finally, you may have to learn how to explicitly describe your desires; the art of programming.

API help is not ment to teach programming. It is usefull when you need to know what parameters to supply an API function. For instance, if you want to read a file, you must have a handle to the opened file (you would use openfile to get the handle), a buffer, and number of bytes to read.


Hello World for debug (aka a *.com DOS file)
Microsoft(R) Windows 98

(C)Copyright Microsoft Corp 1981-1999.

D:\WIN98\Desktop>debug
-a
106A:0100 mov ah, 40
106A:0102 mov bl, 0
106A:0104 mov cx, 10
106A:0107 mov dx, 10e
106A:010A int 21
106A:010C int 20
106A:010E db "Hello World!!!", D, A
106A:011E
-g
Hello World!!!

Program terminated normally


Hello World for Win32 w/ fasm <v1.40
FORMAT PE GUI 4.0

ENTRY START

INCLUDE "\fasm\examples\win32\include\kernel.inc"
INCLUDE "\fasm\examples\win32\include\user.inc"

INCLUDE "\fasm\examples\win32\include\macro\stdcall.inc"
INCLUDE "\fasm\examples\win32\include\macro\import.inc"

SECTION ".data" DATA READABLE WRITEABLE

MsgCaption DB "Iczelion's tutorial no.2",0
MsgBoxText DB "Win32 Assembly is Great!",0

SECTION ".code" CODE READABLE EXECUTABLE

START:

invoke MessageBox, NULL, MsgBoxText, MsgCaption, MB_OK
invoke ExitProcess, 0

SECTION ".idata" IMPORT DATA READABLE WRITEABLE

library kernel, "kernel32.dll", \
user, "user32.dll"

kernel:
import ExitProcess, "ExitProcess"

user:
import MessageBox, "MessageBoxA"


Hello World for Linux w/ fasm
; fasm demonstration of buliding ELF file using binary output mode


include 'elf.ash'

msg db 'Hello world!',0xA
msg_size = $-msg

start:

mov eax,4
mov ebx,1
mov ecx,msg
mov edx,msg_size
int 0x80

mov eax,1
xor ebx,ebx
int 0x80

end.
Posted on 2003-03-10 03:23:19 by eet_1024
Va3gdr,
I think this idea of yours is great...if you can get it organised. It would be great to have a place to go read about different stuff in practise. But i think that the tuts should be really general because it's easier to just get something out of a tut than to research it yourself also it sticks in ur head if u work it out urself :)
anyway this is the approach I'm trying at the moment...and it's not easy. easier to just ask some1 else :P

anyway hope you get this idea of urs going
Posted on 2003-03-10 04:21:49 by keyoke
To eet_1024

Thank you very much.... You wouldn't believe how much that clears things up. I can see from your examples. which parts of the program are doing what. Because I can see the difference now with dos, win32, linux. This is exactly what I'm looking for.

This show the beginner more of what is actual assembler, and what is api. Sometimes, I find it very hard to separate the two......

If you could possibly write some more detail, ie

mov ah, 40 this puts the value 40 in the high order nibble of ax register... ("why")

could I put 30 in this register and get the same result.... I will try on my own to find out.....

I hope the result doesn't lock up my machine...

Thanks again........

tried it....

program runs but nothing prints..... used 30 instead of 40

mov ah, 30

nothing prints........

hmmmmm,,, moving 40 to ah must tell it to print to screen...?????

am I right....

cool
Posted on 2003-03-10 15:30:13 by va3gdr
DOS provides many functions for int 21. The value in ah determines which function is executed (do a search on "int 21"). bx (not bl as I have it) is the filehandle to write to; a value of 0 indicates StdOut. bx=4 is for the printer.

Below is the API info for int 21,40 found at http://www.iro.umontreal.ca/~feeley/cours/ift2240/doc/assembly/int21.html

AH = 40h
BX = file handle
CX = number of bytes to write, a zero value truncates/extends
the file to the current file position
DS:DX = pointer to write buffer
on return:
AX = number of bytes written if CF not set
= error code if CF set (see DOS ERROR CODES)
- if AX is not equal to CX on return, a partial write occurred
- this function can be used to truncate a file to the current
file position by writing zero bytes
Posted on 2003-03-11 10:15:50 by eet_1024
Excellent,

Do you know of a centralized source for these int 21 functions, and more. Maybe I could just put up links to the information. Better than rewriting all of it.... If you don't know what your looking for though, it can be really hard to find.... I didn't know that those were called int21 functions....

Maybe I'll just collect links to all of this information and post them in one spot. Could take months or years though......

Thanks for the info. I'll check out that site...
Posted on 2003-03-11 15:32:10 by va3gdr
Wow,

They have every single one listed there. That's fantastic, should make it a lot easier to understand. Without knowing those, it would be hard to do anything.

Is linux close to the same, or major differences....????

It be interesting to see how drastic the change is....

thanks again...
Posted on 2003-03-11 15:43:09 by va3gdr
All such functions you can find in Ralph Brown's Interrupt List, you can find the link to it on FASM website.
Posted on 2003-03-11 15:45:20 by Tomasz Grysztar
for info on assembly programming for linux a good place to start is

http://linuxassembly.org

there are links to almost any thing you may need to get started
Posted on 2003-03-13 15:39:49 by rob.rice