2002-03-16 20:27:50 +00:00
|
|
|
;
|
2003-10-28 08:47:47 +00:00
|
|
|
; Piotr Fusik, 24.10.2003
|
|
|
|
; originally by Ullrich von Bassewitz
|
2002-03-16 20:27:50 +00:00
|
|
|
;
|
2003-10-28 08:47:47 +00:00
|
|
|
; CC65 runtime: Multiply the primary register by 6
|
2002-03-16 20:27:50 +00:00
|
|
|
;
|
|
|
|
|
2003-10-28 08:47:47 +00:00
|
|
|
.export mulax6
|
|
|
|
.importzp ptr1
|
2002-03-16 20:27:50 +00:00
|
|
|
|
|
|
|
.proc mulax6
|
|
|
|
|
2003-10-28 08:47:47 +00:00
|
|
|
sta ptr1
|
2002-03-16 20:27:50 +00:00
|
|
|
stx ptr1+1
|
|
|
|
asl a
|
|
|
|
rol ptr1+1
|
|
|
|
clc
|
|
|
|
adc ptr1
|
2003-10-28 08:47:47 +00:00
|
|
|
sta ptr1
|
2002-03-16 20:27:50 +00:00
|
|
|
txa
|
|
|
|
adc ptr1+1
|
2003-10-28 08:47:47 +00:00
|
|
|
asl ptr1
|
|
|
|
rol a
|
|
|
|
tax
|
|
|
|
lda ptr1
|
2002-03-16 20:27:50 +00:00
|
|
|
rts
|
|
|
|
|
|
|
|
.endproc
|
|
|
|
|
|
|
|
|