Discussion:
[Proj3] Yet another assembler
(too old to reply)
Jeremy Cowles
2008-08-03 20:09:36 UTC
Permalink
Raw Message
I couldn't resist jumping on the assembler band-wagon, so I made one in
Python:

~cs61c-aw/pub/asm.py <source file> <output file>

Usage example:

~cs61c-aw/pub/asm.py mult.s mult.hex

Features:
- labels are calculated for jumps & branches
- hex constants allowed
- white space is ignored
- read the source if you like
(but it was *really* quick and dirty, so it's a little messy)

Issues:
- comments are not allowed
- not all instructions have been tested (i just finished it)
(but the 2 assigned apps compiled for me no problem)


Jeremy
Jeremy Cowles
2008-08-03 21:11:58 UTC
Permalink
Raw Message
The script also now ignores comments.

Jeremy

Loading...