2001-10-04 21:34:14 +00:00
|
|
|
;
|
|
|
|
; Ullrich von Bassewitz, 04.10.2001
|
|
|
|
;
|
2018-03-07 20:01:29 +00:00
|
|
|
; CC65 runtime: Multiply the primary register by 3
|
2001-10-04 21:34:14 +00:00
|
|
|
;
|
2018-05-24 01:55:40 +00:00
|
|
|
; Don't touch the Y-register here, the optimizer relies on it!
|
2001-10-04 21:34:14 +00:00
|
|
|
|
2013-05-09 11:56:54 +00:00
|
|
|
.export mulax3
|
|
|
|
.importzp ptr1
|
2022-04-17 14:06:22 +00:00
|
|
|
|
2013-05-09 11:56:54 +00:00
|
|
|
.proc mulax3
|
2001-10-04 21:34:14 +00:00
|
|
|
|
2013-05-09 11:56:54 +00:00
|
|
|
sta ptr1
|
|
|
|
stx ptr1+1
|
|
|
|
asl a
|
|
|
|
rol ptr1+1
|
|
|
|
clc
|
|
|
|
adc ptr1
|
|
|
|
pha
|
|
|
|
txa
|
|
|
|
adc ptr1+1
|
|
|
|
tax
|
|
|
|
pla
|
|
|
|
rts
|
2001-10-04 21:34:14 +00:00
|
|
|
|
|
|
|
.endproc
|
|
|
|
|
|
|
|
|