flat assembler
Message board for the users of flat assembler.

Index > Main > Im new to assembly, and have a few questions...

Author
Thread Post new topic Reply to topic
MushroomWobbit



Joined: 09 Nov 2009
Posts: 5
MushroomWobbit 09 Nov 2009, 23:23
Ive been learning programming languages for a while now, I'm not an expert with any of them, but i like them Razz
well Ive wanted to learn assembly for a long time and i found FASM, but i have a few questions about assembly in general...

could i accidentally screw up my computer beyond all repair? if so is there a way i can set up protection so i cant?

and i dont know the first thing about assembly at all, where can i fond tutorials on syntax and the like?

i hope i didnt bother any one, i tried searching but i didnt find anything...
Post 09 Nov 2009, 23:23
View user's profile Send private message Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4624
Location: Argentina
LocoDelAssembly 09 Nov 2009, 23:45
Quote:

could i accidentally screw up my computer beyond all repair? if so is there a way i can set up protection so i cant?
Generally no*, however you don't have to worry about this when programming for Windows and Linux (unless you're programming a driver), because the OSes restrict you from accessing hardware directly.

Quote:

and i dont know the first thing about assembly at all, where can i fond tutorials on syntax and the like?
Well, can't help you much here, you can look at the examples inside the Windows package or search for Iczelion which has many good tutorials (but all in MASM unfortunately).

*Besides being able to alter CPU and RAM voltage and/or frequency I can't think other ways of irreversible damage on modern computers (but it is incredibly hard to do this by accident and as noted above, your OS wont allow you to do that unless you are executing a driver).
Post 09 Nov 2009, 23:45
View user's profile Send private message Reply with quote
MushroomWobbit



Joined: 09 Nov 2009
Posts: 5
MushroomWobbit 09 Nov 2009, 23:52
Quote:

Well, can't help you much here, you can look at the examples inside the Windows package or search for Iczelion which has many good tutorials (but all in MASM unfortunately).

well is that very diferent from fasm?
are there different languaged for assembly?
Post 09 Nov 2009, 23:52
View user's profile Send private message Reply with quote
roboman



Joined: 03 Dec 2006
Posts: 122
Location: USA
roboman 10 Nov 2009, 06:01
http://emu8086.com/
& the source code at:
http://www.emu8086.com/dr/asm2html/assembler_source_code/
are a great start of the basics.
There is a lot of commented source code around the boards here. I've got a little at:
http://home.comcast.net/~dexos/
nothing great or grand, but commented reasonably well
Post 10 Nov 2009, 06:01
View user's profile Send private message Visit poster's website Reply with quote
bitshifter



Joined: 04 Dec 2007
Posts: 796
Location: Massachusetts, USA
bitshifter 10 Nov 2009, 07:41
Yes, FASM syntax is quite different than any other assembler.
It closely resembles the TASM assemblers ideal mode syntax.
I have used the popular assemblers... MASM,NASM,TASM
but FASM is clearly the best assembler ever written.
Besides being written in its own syntax and self compilable
it does not perform any optimizations to your code like others do.
This makes programs very easy to debug since source == code.
I will never even look at any other assembler for the rest of my days.
Post 10 Nov 2009, 07:41
View user's profile Send private message Reply with quote
MushroomWobbit



Joined: 09 Nov 2009
Posts: 5
MushroomWobbit 10 Nov 2009, 08:16
well then I'm sold then!
thank you for the site roboman, i hope i can get enough money to one day buy a license for it!
EDIT:
well the emulator is great, but i cant understand any of the tutorials on that site at all Sad
Post 10 Nov 2009, 08:16
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 10 Nov 2009, 11:43
Quote:
Besides being written in its own syntax and self compilable

How is that an advantage?

Quote:
it does not perform any optimizations to your code like others do.

What optimizations do other assemblers perform that FASM doesn't?

Quote:
I will never even look at any other assembler for the rest of my days.

Or until the day when 32-bit compatibility will be thrown away (like 16-bit eventually was)
Post 10 Nov 2009, 11:43
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
MushroomWobbit



Joined: 09 Nov 2009
Posts: 5
MushroomWobbit 10 Nov 2009, 19:03
so, any one know anymore tutorials or places to learn, i could use as many as possible!
Post 10 Nov 2009, 19:03
View user's profile Send private message Reply with quote
kohlrak



Joined: 21 Jul 2006
Posts: 1421
Location: Uncle Sam's Pad
kohlrak 11 Nov 2009, 02:42
Google "the art of assembly." You'll find lots of information from this randall hyde guy. I'd ignore the sites that promote HLA (at least for now). I will say, that as of right now, making ASM your first language is difficult.
Post 11 Nov 2009, 02:42
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger Reply with quote
bitshifter



Joined: 04 Dec 2007
Posts: 796
Location: Massachusetts, USA
bitshifter 11 Nov 2009, 02:55
It really depends on what you want to do with the code...
To stay interested you will need to have a set of goals.
What are you interested in creating?

Also, dont be afraid to learn the C language.
It is the next best thing to pure assembly.
They go well together and are my favorites.
Post 11 Nov 2009, 02:55
View user's profile Send private message Reply with quote
Rahsennor



Joined: 07 Jul 2007
Posts: 61
Rahsennor 11 Nov 2009, 09:58
http://en.wikibooks.org/wiki/X86_Assembly has a good overview of the language - unfortunately it uses backwards GAS syntax for a large chunk.
http://linuxassembly.org has some tutorials on assembler in unix/linux operating systems.
... I thought I had more, but now I can't find them... sorry... Embarassed
I first learned assembler from the TASM 2.0 guides. You know, paper books. Razz
Books on assembler have almost vanished now, but if you have a few spare dollars/pounds/yen/whatever and know a secondhand bookstore or two, I think it worth a look.

bitshifter wrote:
Also, dont be afraid to learn the C language.
It is the next best thing to pure assembly.
Others may beg to differ. Smile
Post 11 Nov 2009, 09:58
View user's profile Send private message Reply with quote
wht36



Joined: 18 Sep 2005
Posts: 106
wht36 11 Nov 2009, 11:42
While you can't do permanent damage, it may be a good idea to enable DEP (Data Execution Prevention).

For me, the easiest way to learn is to start writing your own programs. FASM has some good examples. Try modifying them to get a hang of the language.

Have a set of documents ready.
Essential ones:
- The FASM documentation. Read it carefully, especially on macro's.
- Win32 help API (if you intend windows programming) - either download the help file (outdated) or search on msdn

Other:
- The NASM documentation is an easy read for CPU opcodes (or if you like detail - go for the intel documentations)
- HelpPC. DOS only but it was really my favourite in the old days. Has almost everything about DOS. I would highly recommend it for DOS programming.
Post 11 Nov 2009, 11:42
View user's profile Send private message Reply with quote
MushroomWobbit



Joined: 09 Nov 2009
Posts: 5
MushroomWobbit 11 Nov 2009, 23:16
Quote:

It really depends on what you want to do with the code...
To stay interested you will need to have a set of goals.
What are you interested in creating?

Also, dont be afraid to learn the C language.
It is the next best thing to pure assembly.
They go well together and are my favorites.

i dont know what i want to do really, im hoping that assembly will give me a better perspective on programing, and id love to learn how to make c and asm work together! that sounds fun!
Post 11 Nov 2009, 23:16
View user's profile Send private message Reply with quote
Azu



Joined: 16 Dec 2008
Posts: 1159
Azu 11 Nov 2009, 23:25
vid wrote:
Quote:
Besides being written in its own syntax and self compilable

How is that an advantage?
Because knowing it means you also know how to change it and recompile it?

vid wrote:
Quote:
it does not perform any optimizations to your code like others do.

What optimizations do other assemblers perform that FASM doesn't?
Maybe things like changing add X,1 to inc X without asking you?

vid wrote:
Quote:
I will never even look at any other assembler for the rest of my days.

Or until the day when 32-bit compatibility will be thrown away (like 16-bit eventually was)
That's weird, considering I've written 64-bit code in FASM before. Why would you throw away FASM just because 32-bit is gone?

_________________
Post 11 Nov 2009, 23:25
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger MSN Messenger 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


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.