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




It's quite simple actually, lets say a=5. Then a-1=4. Since 4=0100 in
binary, you exclusive or the 0 bit and get 0101b. now add 1 and get 0110b
which is 6. Let's say a=6. Then a-1=5 which is 0101 in binary. xor the 0
bit, get 0100b. Add 1 and now we have 0101b which is 5.

-----Original Message-----
From: Alan C Johnson <benjamin99@juno.com>
To: assembly-83@lists.ticalc.org <assembly-83@lists.ticalc.org>
Date: Thursday, August 20, 1998 1:10 PM
Subject: Re: A83: NOW I REALLY DON'T KNOW WHAT'S GOING ON


>
>I don't see how that would work...
>
>>
>>wait a minute... even better yet!
>>
>> dec a
>> xor 1
>> inc a
>>
>>only 4 bytes instead of 6... sorry, I just couldn't help posting
>>this...
>>
>>-----Original Message-----
>>From: Joe Wingbermuehle <joewing@usmo.com>
>>To: assembly-83@lists.ticalc.org <assembly-83@lists.ticalc.org>
>>Date: Thursday, August 20, 1998 11:56 AM
>>Subject: Re: A83: NOW I REALLY DON'T KNOW WHAT'S GOING ON
>>
>>
>>>
>>>hehe
>>>how about this:
>>>
>>> sub 5
>>> xor 1
>>> add a,5
>>>
>>>a little simpler and better no?
>>>
>>>-----Original Message-----
>>>From: Linus Akesson <lairfight@softhome.net>
>>>To: Alan C Johnson <assembly-83@lists.ticalc.org>
>>>Date: Thursday, August 20, 1998 11:16 AM
>>>Subject: 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
>>>>
>>>
>>
>>
>
>_____________________________________________________________________
>You don't need to buy Internet access to use free Internet e-mail.
>Get completely free e-mail from Juno at http://www.juno.com
>Or call Juno at (800) 654-JUNO [654-5866]
>