RosettaCodeData/Task/Repeat/6502-Assembly/repeat-3.6502

13 lines
280 B
Plaintext

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