RosettaCodeData/Task/Repeat/6502-Assembly/repeat-3.6502
2023-07-01 13:44:08 -04:00

12 lines
280 B
Text

RepeatProc:
;input: low byte of desired function address in A
; high byte of desired function address in X
; repeat count in Y
STA smc_repeatproc+1
STX smc_repeatproc+2
smc_repeatproc:
jsr $0000 ;this is modified by the STA and STX above.
dey
bne smc_repeatproc
rts