Ok so I don't really expect anyone to know the language in question here, since it's made for the book we use. Anyway, the program is just supposed to perform this equation: D=A-(B-C) and output the values of all variables. Anyway, wrote this program out on paper first and it looked good, did the same logic in a quick little C++ program and it worked, but I'm getting 2 errors and the damn program doesn't even hint as to where or what they are, and I'm lost now. Anyway, here is my little code snippet I'm trying to get to work.
Org 100
Input
Store B
Input
Store C
Load B
Subt C
Store tmp
Input
Store A
Load A
Subt tmp
Store D
Load A
Output
Load B
Output
Load C
Output
Load D
Output
Halt
A, Hex C8
B, Hex D2
C, Hex DC
D, Hex E6
Tmp, Hex F0
Most of the commands should be self-explanatory, but org just tells the assembler what memory location to start at. Labels are declared at the bottom. Everything goes through the AC, so in order to work with a variable you have to load it, and then store it again when done. Do you see any logical errors or any errors at all that could be giving me issues?
Well just looking at what you've written and making assumptions, it seems fine to me. What I might do here is just cut out parts of code and see if you can isolate the portion that is failing.
Oh wow! It was a typo /facepalm. And @guest, I agree. I'm not sure why we're using this fake assembly language as opposed to just something like x86. Just what the professor told us to do