Skip to content

ankushbhardwxj/PyARM-Assembler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyARM-Assembler

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.

How to run ?

python assembler.py -f fileName.s 

For debugging, set the debug variable in source equal to 1.

Some material :

Future Work

  • Make a 8051 version of this, preferably using Chapel Language.