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 5
|
2001-10-04 21:34:14 +00:00
|
|
|
;
|
2018-05-22 17:10:07 +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 mulax5
|
|
|
|
.importzp ptr1
|
2001-10-04 21:34:14 +00:00
|
|
|
|
2013-05-09 11:56:54 +00:00
|
|
|
.proc mulax5
|
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
|
|
|
|
asl a
|
|
|
|
rol ptr1+1
|
|
|
|
clc
|
|
|
|
adc ptr1
|
2018-05-22 17:10:07 +00:00
|
|
|
pha
|
2013-05-09 11:56:54 +00:00
|
|
|
txa
|
|
|
|
adc ptr1+1
|
|
|
|
tax
|
2018-05-22 17:10:07 +00:00
|
|
|
pla
|
2013-05-09 11:56:54 +00:00
|
|
|
rts
|
2001-10-04 21:34:14 +00:00
|
|
|
|
|
|
|
.endproc
|
|
|
|
|
|
|
|
|