debjitbis08 / sim8085

Online 8085 simulator
https://www.sim8085.com
BSD 3-Clause "New" or "Revised" License
105 stars 38 forks source link

daa not working properly #11

Open zackdgod opened 5 years ago

zackdgod commented 5 years ago

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

debjitbis08 commented 5 years 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.

sonikamakam commented 4 years ago

isteadofdaawatweneedtouse