Closed zackdgod closed 1 month ago
@zackdgod, DAA
is behaving like that because of the AC flag. If you reset the flags before running the code, the accumulator will show the correct value. This is a UX issue and I will try to think what is the best way to solve it. Meanwhile, make sure you are resetting everything before loading the program.
About the second issue, the loading address is currently hardcoded in the simulator. Once it is made dynamic, this will be solved.
isteadofdaawatweneedtouse
Solved in V2.
1.)The daa statement is not working as per intended functionality.
MVI A, 38H
MVI B, 41H
ADD B
daa
hlt
is supposed to provide 79h in accumulator, but it does not, it adds 6 to it, even though digits are less than 10.2.) The assembled code (conversion to opcodes), always shows wrong address, instead of showing 08xx (where program stored) it shows 00xx. But it works anyway