Re: A83: NOW I REALLY DON'T KNOW WHAT'S GOING ON


[Prev][Next][Index][Thread]

Re: A83: NOW I REALLY DON'T KNOW WHAT'S GOING ON




On 18-Aug-98, Alan C Johnson wrote:

>dec   a
>cp    PROTPROGOBJ
>jp    z,NextStep
>ld    a,PROGOBJ


If the old type was 5:

* dec a would set it to 4
* it would be compared to 6 (PROTPROGOBJ)
* no jump would thus take place
* and the new type would be 5 (same as before)

If the old type was 6:

* dec a would set it to 5
* it would be compared to 6 (PROTPROGOBJ)
* no jump would thus take place
* and the new type would be 5 again.

Fix: Change dec to inc!

Linus


References: