[stella] Do the math

Subject: [stella] Do the math
From: Manuel Rotschkar <cybergoth@xxxxxxxx>
Date: Wed, 05 May 2004 22:10:00 +0200
Hi there!

Just a small snippet I have here. While highly specialized, I thought it might be a nice example of transfering a small math formula into 6502 ASM.

; xdelay = 211 - int((xpos+2)/3)

    LDY #$01
    LDA xpos
    CLC
    ADC #02
    SEC
DivideBy3
    DEY
    SBC #$03
    BCS DivideBy3
    TYA
    ADC #211
    STA xdelay

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


Current Thread