Hi, Debjit, I couldnot comment on the patch you made because I donot know how to recompile the simulater. If you could let me have the re-compiled version, I will test it.
Regards, Felix Fung 2010/6/4 Debjit Biswas <[email protected]> > Hi, > > I have created a patch for the DAA instruction. I observed that there > were 3 basic errors in the DAA code which are as follows: > > 1. The most significant 4 bits (which is stored in the "high" variable) was > being updated before the operation on the lower bits. It should be updated > after the operation. > 2. The overflow condition was being checked by comparing whether the > operation on the 4 bits is producing a value greater than 9. This should > compared with 15 (2^4 = 16). > 3. The manual states that the Carry flag will be set if there is a overflow > after the operation on the higher 4 bits, but it should not be unchanged if > there is no overflow. The older code was resetting the flag if there was no > overflow. > > I am attaching this patch. Can anyone please point to some sample code > to test it with? I have tested a few examples I found in the manual, and > the of course the code provided in the description of this bug :) > > -- Debjit > > ** Patch added: "daa.patch" > http://launchpadlibrarian.net/49670414/daa.patch > > -- > 78+88 in BCD addition missed carry > https://bugs.launchpad.net/bugs/584093 > You received this bug notification because you are a direct subscriber > of the bug. > > Status in gnusim8085: Confirmed > > Bug description: > With the following program, the carry flag is missed: > > mvi a,078h > adi 088h > daa > hlt > > please check > > regards, Felix Fung > > To unsubscribe from this bug, go to: > https://bugs.launchpad.net/gnusim8085/+bug/584093/+subscribe > -- 78+88 in BCD addition missed carry https://bugs.launchpad.net/bugs/584093 You received this bug notification because you are a member of GNUSim8085 developers, which is subscribed to gnusim8085. Status in gnusim8085: Confirmed Bug description: With the following program, the carry flag is missed: mvi a,078h adi 088h daa hlt please check regards, Felix Fung _______________________________________________ Mailing list: https://launchpad.net/~gnusim8085-devel Post to : [email protected] Unsubscribe : https://launchpad.net/~gnusim8085-devel More help : https://help.launchpad.net/ListHelp

