Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JEQ - STCH - LDCH are the same opcode #1

Open
YousefSaber opened this issue Nov 10, 2019 · 0 comments
Open

JEQ - STCH - LDCH are the same opcode #1

YousefSaber opened this issue Nov 10, 2019 · 0 comments

Comments

@YousefSaber
Copy link

YousefSaber commented Nov 10, 2019

I want to design a SIC Assembler that matches the specs , syntax and description of that in reference (Introduction to Systems Programming
Book by Leland L. Beck) page 47 ,49
( here's the link
https://drive.google.com/file/d/1lU-PKTmICybL2KxK1ExUHHMdwOTMKJtF/view?usp=sharing)

when I forked your code I made some changes so the syntax and opcode can exactly match the reference

the changes in Assembly.c

    char op_mnemonic[26][10]={"LDA","STA","JSUB","MUL","STL","DIV","ADD","STCH","TD","JEQ","LDCH","WD","RSUB","TIXR","TIX","JLT","COMP","CLEAR","LDB","J" ,"RD","COMPR","STX","LDT","LDL","LDX"};

    char op_opcode[26][10]={  "00", "0C", "48",  "20", "14", "24", "18", "54",  "E0", "30","50",  "DC", "4C", "B8",  "2C", "38", "28",  "B4",   "68", "3C","D8","D8",   "10", "74", "08", "04"};

but for somehow the output in the intermediate file


38	2067	--	JEQ	WLOOP		302064
39	206A	--	LDCH	BUFFER,X	309039



instead of


38	2067	--	JEQ	WLOOP		302064
39	206A	--	LDCH	BUFFER,X	509039

what changes I should do to fix this?

the full edited files , input and outputs are in this repository

https://github.com/YousefSaber/SIC-Assembler

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant