mirror of
https://github.com/cc65/cc65.git
synced 2024-12-25 17:29:50 +00:00
95c6063f90
using P/M graphics).
36 lines
671 B
ArmAsm
36 lines
671 B
ArmAsm
;
|
|
; Christian Groessler, June 2000
|
|
;
|
|
; mul40
|
|
; multiplies A by 40 and returns result in AX
|
|
; uses tmp4
|
|
|
|
.importzp tmp4
|
|
.export mul40,loc_tmp
|
|
|
|
.proc mul40
|
|
|
|
ldx #0
|
|
stx tmp4
|
|
sta loc_tmp
|
|
asl a
|
|
rol tmp4
|
|
asl a
|
|
rol tmp4 ; val * 4
|
|
adc loc_tmp
|
|
bcc L1
|
|
inc tmp4 ; val * 5
|
|
L1: asl a
|
|
rol tmp4 ; val * 10
|
|
asl a
|
|
rol tmp4
|
|
asl a
|
|
rol tmp4 ; val * 40
|
|
ldx tmp4
|
|
rts
|
|
|
|
.endproc
|
|
|
|
.bss
|
|
loc_tmp:.res 1
|