home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Transactor
/
Transactor_26_1988_Transactor_Publishing.d64
/
seam.pal
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2023-02-26
|
854b
|
47 lines
100 sys 700 ;pal 64
110 .opt oo
120 ; "seam"
130 ; puts a sprite anywhere
140 ; on the screen
150 ; put x/2 in xpos,
160 ; y in ylo,
170 ; and sprite # in xpsnum.
180 ;
190 seam =* ;uses xpos, ylo, xpsnum
200 lda #0
210 sta xhi
220 lda xpos
230 asl
240 rol xhi ;holds high bit
250 seam2 =* ;uses xlo, xhi, ylo, xpsnum
260 sta xlo
270 lda xpsnum
280 asl: tax
290 lda ylo
300 sta 53249,x
310 lda xlo
320 sta 53248,x
330 lda xhi
340 bne xpn1
350 ;clear high bit
360 ldx xpsnum
370 lda #255
380 sec
390 sbc xpnum,x
400 and 53264
410 sta 53264
420 rts
430 xpn1 =* ;set high bit
440 ldx xpsnum
450 lda 53264
460 ora xpnum,x
470 sta 53264
480 rts
490 ;
500 xpos .byte 80 ;sprite x pos / 2
510 ylo .byte 120 ;y position
520 xlo .byte 100 ;sprite x pos low
530 xhi .byte 0 ;sprite x high bit
540 xpsnum .byte 0 ;sprite # (0-7)
550 xpnum .byte 1,2,4,8,16,32,64,128