Assembler for ARM assembly language.
An assembler is just a simple program that is supposed to convert assembly code to
machine code(binary).
A linker may be further implemented for execution.
Given an ARM7 assembly code to our assembler, we want it to spit binary.
eg:
MOV R3, R9 # assembly
1110 0001 1010 0000 0011 0000 0000 1001 # binary
An assembler has two passes, coz it skips certain lines in first pass.
Read input line, parse the opcode, check for operands, addressing modes etc,
get all 8 bits and write them to a object text file.
This assembler, however, is an one pass assembler.
python assembler.py -f fileName.s
For debugging, set the debug
variable in source equal to 1.
- ARM Assembly: ARM assembly doc.
- Assembler Steps
- see page 32
- Working
- A C based assembly parser
- Standard Assembly book
- ARM7 Instruction Set
- A good resource
- Make a 8051 version of this, preferably using Chapel Language.