writting an assembler...

Programming, for all ages and all languages.
User avatar
suthers
Member
Member
Posts: 672
Joined: Tue Feb 20, 2007 3:00 pm
Location: London UK
Contact:

writting an assembler...

Post 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
User avatar
JamesM
Member
Member
Posts: 2935
Joined: Tue Jul 10, 2007 5:27 am
Location: York, United Kingdom
Contact:

Post 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.
User avatar
suthers
Member
Member
Posts: 672
Joined: Tue Feb 20, 2007 3:00 pm
Location: London UK
Contact:

Post by suthers »

Thanks, I should have looked at them first...
Their much easier to understand than what I found...
Thanks,

Jules
User avatar
Dex
Member
Member
Posts: 1444
Joined: Fri Jan 27, 2006 12:00 am
Contact:

Post by Dex »

Also take a look at this opcodes book:
http://www.wasm.ru/tools/22/opcodes.zip
User avatar
suthers
Member
Member
Posts: 672
Joined: Tue Feb 20, 2007 3:00 pm
Location: London UK
Contact:

Post 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
User avatar
Stevo14
Member
Member
Posts: 179
Joined: Fri Mar 07, 2008 3:40 am
Location: Arad, Romania

Post 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.
User avatar
suthers
Member
Member
Posts: 672
Joined: Tue Feb 20, 2007 3:00 pm
Location: London UK
Contact:

Post 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
User avatar
Dex
Member
Member
Posts: 1444
Joined: Fri Jan 27, 2006 12:00 am
Contact:

Post by Dex »

I would design it to be very easy to port to OS Dev's OS's, like fasm is.
User avatar
Stevo14
Member
Member
Posts: 179
Joined: Fri Mar 07, 2008 3:40 am
Location: Arad, Romania

Post 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. :)
User avatar
suthers
Member
Member
Posts: 672
Joined: Tue Feb 20, 2007 3:00 pm
Location: London UK
Contact:

Post 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
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Post 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.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
suthers
Member
Member
Posts: 672
Joined: Tue Feb 20, 2007 3:00 pm
Location: London UK
Contact:

Post 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?
User avatar
Ryu
Posts: 13
Joined: Sun Dec 03, 2006 8:58 am

Post by Ryu »

MASM does everything for me, let me know when you start the linker heh heh.
"Our ambition should be to rule ourselves,
the true kingdom for each one of us;
and true progress is to know more,
and be more, and to do more."
~Oscar Wilde
User avatar
suthers
Member
Member
Posts: 672
Joined: Tue Feb 20, 2007 3:00 pm
Location: London UK
Contact:

Post by suthers »

hehehe, once I've finished the assembler... (long time).
Jules
Korona
Member
Member
Posts: 1000
Joined: Thu May 17, 2007 1:27 pm
Contact:

Post 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?
Post Reply