-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathincSPONCommand.asm
36 lines (32 loc) · 1.13 KB
/
incSPONCommand.asm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
;*******************************************************************************
;* SPRON Command *
;* This BASIC function to turn on a Sprite *
;* *****************************************************************************
;* Syntax : SPON or sp Shifted O *
;* Inputs : Sprite # *
;*******************************************************************************
; spron : #
COM_SPRON
jsr GETSpriteNo
stx COMM_AXLO
jsr WorkOutSpriteBit
lda VICII_SPENA
ora BYTEMASK,x
sta VICII_SPENA
rts
;==============================================================================
; Get Sprite Number From Basic
; Output : x Reg = Sprite Number
; Error : Illegal Quantity
;==============================================================================
GETSpriteNo
jsr bas_GETBYTC$; Get Sprite Number
cpx #8
bcc @ValidSpriteNo
@IllegalError
pla
pla
; Illegal Qty Error
jmp bas_IQERR$
@ValidSpriteNo
rts