An open API service indexing awesome lists of open source software.

https://github.com/lonelycpp/two-pass-assembler

A multi pass assembler implementation in c++
https://github.com/lonelycpp/two-pass-assembler

algorithm pass-assembler

Last synced: 22 days ago
JSON representation

A multi pass assembler implementation in c++

Awesome Lists containing this project

README

          

# Two-pass-assembler
A multi pass assembler implementation in c++

A direct implementation of the two pass algorithm for compiler design course provided by [VTU]( http://vtu.ac.in/), for CSE in semester 5.

An overview of the algorithm can be found here [Link](http://web.thu.edu.tw/ctyang/www/files/sp_chap2.pdf).

Sample Input :

Label | Opcode | Operand
--- | --- | ---
TRANS | START | 1000
FIRST | LDX | ZERO
TLOOP | TD | INDEV
nop | JEQ | TLOOP
nop | RD | INDEV
nop | STCH | RECORD,X
nop | TIX | TEN
nop | JLT | TLOOP
ZERO | WORD | 0
TEN | WORD | 10
INDEV | BYTE | X'F1'
RECORD | RESB | 10
nop | END | FIRST

Output object code :




`H^0TRANS^001000^000026`


`T^001000^1c^041015^e0101b^301003^d8101b^54901c^2c1018^381003^000000^000010^F1`


`E^001000`