Re: [stella] signed math

Subject: Re: [stella] signed math
From: "Thomas Jentzsch" <tjentzsch@xxxxxx>
Date: Thu, 29 Jan 2004 09:40:19 +0100
Glenn wrote
> If the number is negative, why do you do an adc instruction instead of a 
> sbc instruction?

Because adding a negative value is the same as subtracting a positive one.


> Is this example complete or is there something missing?

I am having problems to follow myself. Maybe this one is more clear:

  ldy  #0
  lda  fracvel
  bpl  .posvel 
  dey                
.posvel:
  clc
  adc  fracpos
  sta  fracpos
  tya
  adc  intpos
  sta  intpos

Have?fun!
Thomas
_______________________________________________________
Thomas?Jentzsch?????????|?***?Every?bit?is?sacred?!?***
tjentzsch?at?web?dot?de?|



























______________________________________________________________________________
Nachrichten, Musik und Spiele schnell und einfach per Quickstart im 
WEB.DE Screensaver - Gratis downloaden: http://screensaver.web.de/?mc=021110

----------------------------------------------------------------------------------------------
Archives (includes files) at http://www.biglist.com/lists/stella/archives/
Unsub & more at http://www.biglist.com/lists/stella/


Current Thread