Giter Club home page Giter Club logo

assembler's People

Contributors

ashutoshvrm8 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

assembler's Issues

JEQ - STCH - LDCH are the same opcode

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.