This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes General Computing and the fly likes Some insights to write an assembler Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Engineering » General Computing
Bookmark "Some insights to write an assembler" Watch "Some insights to write an assembler" New topic
Author

Some insights to write an assembler

Arka Sharma
Ranch Hand

Joined: Jun 15, 2011
Posts: 103

Hi,

I apologize for asking this question here but I really need some insight how to write an assembler.I have defined my instruction set, registers and all.Now I want to wtrite an assembler that will take the assembly code written in my defined instructions and generate executables on any windows machine whatever be the underlying processor.Any guide is expected.

Thanks,
Arka
Tim Moores
Rancher

Joined: Sep 21, 2011
Posts: 2408
You want to write this in Java?

If this was my project I'd try to use the infrastructure of the GNU Assembler. Then the task would be down to translating your assembler syntax to the GAS syntax.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38441
    
  23
Is that possible? Won’t your registers differ from chip to chip, so your assembler will be coupled to the type of chip?
 
jQuery in Action, 2nd edition
 
subject: Some insights to write an assembler