Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- PLA
- LDA $04 ;\ multiply the cosine...
- STA $4202 ; |
- LDA !1594,x ; |
- LDY $05 ; |\ if $05 is 1, no need to do the multiplication
- BNE .NoMultCos ; |/
- STA $4203 ; | ...with radius of circle (!1594,x)
- NOP #4 ;/ waste some cycles while the result is calculated
- ASL $4216 ; Product/Remainder Result (Low Byte)
- LDA $4217 ; Product/Remainder Result (High Byte)
- ADC #$00
- .NoMultCos
- LSR $01 ;\ if the high byte of the angle was set...
- BCC .NotInvertCos ; |
- EOR #$FF ; | ...then invert the cosine
- INC ;/
- .NotInvertCos
- STA $04
- LDA $06 ;\ multiply the sine...
- STA $4202 ; |
- LDA !1594,x ; |
- LDY $07 ; |\ if $07 is 1, no need to do the multiplication
- BNE .NoMultSin ; |/
- STA $4203 ; | ...with raidus of circle (!1594,x)
- NOP #4 ;/ waste some cycles while the result is calculated
- ASL $4216 ; Product/Remainder Result (Low Byte)
- LDA $4217 ; Product/Remainder Result (High Byte)
- ADC #$00
- .NoMultSin
- LSR $03 ;\ if the high byte of the angle was set...
- BCC .NotInvertSin ; |
- EOR #$FF ; | ...then invert the sine
- INC ;/
- .NotInvertSin
- STA $06
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement