Designing assembler???

This is a discussion on Designing assembler??? within the C Programming forums, part of the General Programming Boards category; I was wondering if i could design an 8086 assembler in C. Can i have any ideas on how to ...

  1. #1
    Registered User Silverdream's Avatar
    Join Date
    Feb 2002
    Posts
    53

    Question Designing assembler???

    I was wondering if i could design an 8086 assembler in C. Can i have any ideas on how to go about it? Any suggestion would be helpful.

  2. #2
    Guilty Spark 343
    Guest
    Of course you can. There's nothing magical about an assembler. All an assembler is is a "compiler" that takes human understandable mnemonics (opcodes) and translates them into raw binary.

    The main points about an assembler are:

    1) It can have a text interface, a GUI is nice but not at all necessary.
    2) It needs to be able to build a symbol table and a have a linker to resolve references.
    3) You need to know the specific format of how programs are built, and understand how to build those pieces (like jump tables, stubs, etc.)

    I would _strongly_ recommend you obtain a free assembler for any processor, and play with it, so that you can get a feel for what one does, and what programmers need assemblers to offer.

  3. #3
    Registered User Silverdream's Avatar
    Join Date
    Feb 2002
    Posts
    53
    Thanx for the help guys. Can i have more examples of free assemblers? Where can i find the information? Thank you once again.

  4. #4
    Unregistered
    Guest
    Here are some links of assemblers with source :

    in asm
    http://fasm.metro-nt.pl/fasm.zip
    http://www.geocities.com/SiliconVall...s/intasm52.zip
    http://www.geocities.com/rtcvb32/zips/intasm52.zip
    http://betov.free.fr/SpAsm

    in Qbasic
    http://www.geocities.com/rtcvb32/zips/intel27.zip

    in C
    http://gaztek.sourceforge.net/gasm/gasm-source-0.55.zip
    nasm

    I am coding one in c( just for fun)
    What I can say is that you have first to understand opcodes R/M bytes et SIB bytes. Get "pentium4-v2.pdf" at Intel site

  5. #5
    ....
    Join Date
    Aug 2001
    Location
    Groningen (NL)
    Posts
    2,386
    You could also take a look at:

    developer.intel.com

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problem building Quake source
    By Silvercord in forum Game Programming
    Replies: 16
    Last Post: 07-11-2010, 09:13 AM
  2. Which assembler is best?
    By MathFan in forum Tech Board
    Replies: 6
    Last Post: 06-16-2005, 09:25 AM
  3. Assembler error
    By beg_g in forum Linux Programming
    Replies: 4
    Last Post: 04-06-2002, 07:29 AM
  4. MAINFRAME Assembler.
    By sean in forum A Brief History of Cprogramming.com
    Replies: 3
    Last Post: 12-05-2001, 04:32 PM
  5. interfacing assembler with c++
    By Unregistered in forum C++ Programming
    Replies: 2
    Last Post: 10-24-2001, 12:13 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21