A-M baby
This commit is contained in:
parent
764da6cbbb
commit
db842d013d
19005 changed files with 197040 additions and 7 deletions
17
Task/Loops-Break/6502-Assembly/loops-break.6502
Normal file
17
Task/Loops-Break/6502-Assembly/loops-break.6502
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
LoopBreakSub: PHA ;push accumulator onto stack
|
||||
|
||||
|
||||
BreakLoop: JSR GenerateRandomNum ;routine not implemented
|
||||
;generates random number and puts in memory location RandomNumber
|
||||
|
||||
LDA RandomNumber
|
||||
JSR DisplayAccumulator ;routine not implemented
|
||||
CMP #10
|
||||
BEQ Break
|
||||
JSR GenerateRandomNum
|
||||
LDA RandomNumber
|
||||
JSR DisplayAccumulator
|
||||
JMP BreakLoop
|
||||
|
||||
Break: PLA ;restore accumulator from stack
|
||||
RTS ;return from subroutine
|
||||
Loading…
Add table
Add a link
Reference in a new issue