Page 1 of 2

writting an assembler...

Posted: Sun Jun 01, 2008 7:45 am
by suthers
I would like to write an assembler (and eventually a linker), but I'm not quite sure were to get a list of the opcodes and how they work...
Anybody know where I could find a good list of them (and easy to understand if possible..., I've found some but they were really bloated...)
Thanks in advance,

Jules

Posted: Sun Jun 01, 2008 7:47 am
by JamesM
Well, the manuals contain a list of instructions, opcodes and an explanation of all prefixes.

The processor manual is the place to look.

Posted: Sun Jun 01, 2008 8:35 am
by suthers
Thanks, I should have looked at them first...
Their much easier to understand than what I found...
Thanks,

Jules

Posted: Sun Jun 01, 2008 9:15 am
by Dex
Also take a look at this opcodes book:
http://www.wasm.ru/tools/22/opcodes.zip

Posted: Sun Jun 01, 2008 10:36 am
by suthers
Thanks Dex, thats even better than the manuals...
Does anybody have any good ideas for what I could add to this assembler that would be useful?
Thanks in advance,

Jules

Posted: Sun Jun 01, 2008 11:04 am
by Stevo14
suthers wrote:Does anybody have any good ideas for what I could add to this assembler that would be useful?
For a challenge, you could make it assemble a 2 dimensional assembly language similar to Befunge.

Posted: Sun Jun 01, 2008 11:40 am
by suthers
Had never heard of Befunge before, but that is way to complex as well as useless, how many people here have ever written anything part of their OS in Befunge, I want it to be useful, so I was asking are there any features that you guys would want because I want it to be useful for the community to...
(You know anything that comes up, like when you're writing anything that you sometimes wish your assembler had that feature....)
Thanks,

Jules

Posted: Sun Jun 01, 2008 12:07 pm
by Dex
I would design it to be very easy to port to OS Dev's OS's, like fasm is.

Posted: Sun Jun 01, 2008 12:09 pm
by Stevo14
suthers wrote:Had never heard of Befunge before, but that is way to complex as well as useless,
Sorry, I missed the part where you said "useful". (I read it too quickly) :oops:
suthers wrote: how many people here have ever written anything part of their OS in Befunge,
Probably none. For exactly the reason that you mentioned. :)

Posted: Sun Jun 01, 2008 12:15 pm
by suthers
I'll try and make it as portable as possible.
But if people could post any useful ideas, I'll try to implement.
Thanks,

Jules

Posted: Sun Jun 01, 2008 12:59 pm
by Combuster
IMHO there are enough assemblers and variants available for use already, many of them cross-platform too and with sources available.

Good luck finding a combination of features neither FASM, NASM, YASM, MASM, nor GAS has, that is significant enough to have more than one person (you) use it. Unless you consider it an personal excercise, IMO it's not worth it.

Posted: Sun Jun 01, 2008 1:17 pm
by suthers
I consider it a personal exercise, but there are also features that I want to add to it that I want personally, but since I'm doing it, I thought, I might as well make something that will be useful to other people to.
Thanks,

Jules

P.S. any suggestions for features?

Posted: Sun Jun 01, 2008 4:35 pm
by Ryu
MASM does everything for me, let me know when you start the linker heh heh.

Posted: Sun Jun 01, 2008 5:33 pm
by suthers
hehehe, once I've finished the assembler... (long time).
Jules

Posted: Mon Jun 02, 2008 5:05 am
by Korona
Ryu wrote:MASM does everything for me, let me know when you start the linker heh heh.
What linker features do you miss?