flat assembler
Message board for the users of flat assembler.

flat assembler > Main > Is FASM universal?

Author
Thread Post new topic Reply to topic
special-U



Joined: 26 Jul 2018
Posts: 12
Hi.

FASM supports all CPUs or just a few? I haven't found a list of them.
Post 26 Jul 2018, 13:27
View user's profile Send private message Reply with quote
Furs



Joined: 04 Mar 2016
Posts: 1318
If you mean x86 CPUs, then yes, it should support them all.
Post 26 Jul 2018, 14:23
View user's profile Send private message Reply with quote
special-U



Joined: 26 Jul 2018
Posts: 12
[quote="Furs"]If you mean x86 CPUs, then yes, it should support them all.[/quote]

Yeah, and x64?


Last edited by special-U on 27 Jul 2018, 02:15; edited 1 time in total
Post 26 Jul 2018, 14:43
View user's profile Send private message Reply with quote
DimonSoft



Joined: 03 Mar 2010
Posts: 454
Location: Belarus
Actually a good assembler might support any CPU including those that are yet to be invented. db directive is the key.
Post 26 Jul 2018, 14:45
View user's profile Send private message Visit poster's website Reply with quote
special-U



Joined: 26 Jul 2018
Posts: 12
DimonSoft

But whenever I read an assembly manual I only find it for a specific CPU, you are telling me that FASM supports everything thanks to the db?

...what is the db directive?

so if I study FASM my software will work with any PC?
Post 27 Jul 2018, 02:25
View user's profile Send private message Reply with quote
DimonSoft



Joined: 03 Mar 2010
Posts: 454
Location: Belarus
special-U wrote:
DimonSoft

But whenever I read an assembly manual I only find it for a specific CPU, you are telling me that FASM supports everything thanks to the db?

...what is the db directive?

so if I study FASM my software will work with any PC?

FASM is able to generate any sequence of bytes (and any other decent assembler as well). If this sequence of bytes happens to be a valid executable for particular platform, it will run on that platform. If two or more platforms share the same ISA, ABI, API and executable format, such an executable will run on all of them.

“Assembler supports this and that platforms” usually means that this particular assembler has some stuff out-of-the-box that makes writing software for particular platform easier, i.e. supports generation of machine code for certain instructions wihout the need to specify it byte-by-byte. You might want to take a look at FASMg project: while not yet convenient enough for developing large projects it shows the idea clearly.
Post 27 Jul 2018, 09:42
View user's profile Send private message Visit poster's website Reply with quote
special-U



Joined: 26 Jul 2018
Posts: 12
DimonSoft

Ok... what tools and books do you recommend to get me started? is there a visual course?
Post 27 Jul 2018, 15:53
View user's profile Send private message Reply with quote
ProMiNick



Joined: 24 Mar 2012
Posts: 212
Location: Russian Federation, Sochi
special-U
I have a contrquestion; What platform you target for? Do you program for that platform previously? (In HLL or in other assembler) Do you know format of executable for target OS on that platform? Do you readed programer manual about that architecture?
Post 27 Jul 2018, 18:18
View user's profile Send private message Send e-mail Reply with quote
special-U



Joined: 26 Jul 2018
Posts: 12
ProMiNick

What platform you target for?
If by platform you mean the OS, my intention is to make it work on Linux and Windows.
If you're referring to the CPU, then Intel and AMD

Do you program for that platform previously? (In HLL or in other assembler)
No, in assembler no, only in high level language such as Python

Do you know format of executable for target OS on that platform?
Windows = .exe
Linux = .deb (only to this system)

Do you readed programer manual about that architecture?
That's another one of my doubts I don't know how to get.
Post 28 Jul 2018, 03:59
View user's profile Send private message Reply with quote
Ali.A



Joined: 08 Jan 2018
Posts: 137
intel software developer manual, amd architecture programmer manual. (just search for these two)

fasm can make .exe (format pe console 4.0) or 3.1 or higher, fasm can make any PLAIN BINARY FILE. (.deb is debian package, an archive that can be built from your normal console i.e.command line)

_________________
Asm For Wise Humans
Post 28 Jul 2018, 05:40
View user's profile Send private message Reply with quote
special-U



Joined: 26 Jul 2018
Posts: 12
Ali.A

intel software developer manual, amd architecture programmer manual

All right, could you give me an advance on what I'll learn with those manuals?
Post 28 Jul 2018, 11:01
View user's profile Send private message Reply with quote
Ali.A



Joined: 08 Jan 2018
Posts: 137
special-U wrote:
But whenever I read an assembly manual I only find it for a specific CPU

maybe you meant specific OS (or even syntax), because both intel and amd have same instruction sets and registers. (including syntax)

special-U wrote:
ProMiNick wrote:
Do you readed programer manual about that architecture?
That's another one of my doubts I don't know how to get.

if you really want manufacturer specific manual then read intel and amd manuals.

_________________
Asm For Wise Humans
Post 28 Jul 2018, 13:19
View user's profile Send private message Reply with quote
special-U



Joined: 26 Jul 2018
Posts: 12
Ali.A

Very good links, but without knowing anything about Assembler I should start studying with those manuals?

maybe you meant specific OS (or even syntax), because both intel and amd have same instruction sets and registers. (including syntax)

I was curious, the graphic cards, routers, etc.... have Assembler? can be learned separately?
Post 28 Jul 2018, 15:06
View user's profile Send private message Reply with quote
Ali.A



Joined: 08 Jan 2018
Posts: 137
special-U wrote:
Very good links, but without knowing anything about Assembler I should start studying with those manuals?

both intel and amd have full instruction set, but for fasm read fasm documents also read x86 calling conventions as well as winapi


graphic card: you cant directly manipulate GPUs, you need a device driver.
it worth noting that not all graphic cards are documented by their vendors, otherwise see nvidia cuda or opengl, directx, physix, or other gpu api's.

routers: if you mean internet routers, then might not find anything related to their hardware specs. (and it requires network programming as well)

_________________
Asm For Wise Humans
Post 28 Jul 2018, 18:07
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 16147
Location: Hyperborea
special-U wrote:
... routers, etc.... have Assembler?
Most routers use ARM CPUs. There is fasmarm that you can use for them if you are brave. There are open source OSes for routers available so you can download some code and see what it is all about.
Post 29 Jul 2018, 00:13
View user's profile Send private message Visit poster's website Reply with quote
special-U



Joined: 26 Jul 2018
Posts: 12
Thank you all very much, at least I was able to settle down in the assembler area.
Post 29 Jul 2018, 08:39
View user's profile Send private message Reply with quote
rugxulo



Joined: 09 Aug 2005
Posts: 2311
Location: Usono (aka, USA)
The Download page on FASM's website says this:

Quote:

[fasm] supports x86 and x86-64 instructions sets with MMX, 3DNow!, SSE up to SSE4, AVX, AVX2, XOP and AVX-512 extensions ...
Post 11 Aug 2018, 22:33
View user's profile Send private message Visit poster's website 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-2018, Tomasz Grysztar.

Powered by rwasa.