so I am in the process of creating a lc-3 compiler that is written in C and I am stuck on how to convert the BR command into C language, the assignment asks that i get a file and then spit it out in zeros and ones , but with the BR command there are different types of it an example BRn, BRz etc.. and I am not sure on how to write this portion of the assignment, any help would be grateful. Thanks in advance
goyofoyo
0
Newbie Poster
Recommended Answers
Jump to PostCompiler.. In C... Spew out 1s and 0s? You mean disassembler in C?
Jump to PostSo actually it is an assembler. How about for of addressing. Labels? Give example code and what you do now with it and were you having difficulties? So you do not need to actually do simulator?
Jump to Post> when I have a file that I am trying to convert line by line
You need two passes. At pass 1, when a forward jump is encountered, create a relocation record of branch location and a target symbol. Also during the first pass build a symbol table (a …
All 9 Replies
TrustyTony
888
pyMod
Team Colleague
Featured Poster
goyofoyo
0
Newbie Poster
TrustyTony
888
pyMod
Team Colleague
Featured Poster
goyofoyo
0
Newbie Poster
nezachem
616
Practically a Posting Shark
goyofoyo
0
Newbie Poster
TrustyTony
888
pyMod
Team Colleague
Featured Poster
goyofoyo
0
Newbie Poster
TrustyTony
888
pyMod
Team Colleague
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.