Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
18
Task/Loops-Do-while/6502-Assembly/loops-do-while.6502
Normal file
18
Task/Loops-Do-while/6502-Assembly/loops-do-while.6502
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
DoWhileSub: PHA
|
||||
TYA
|
||||
PHA ;push accumulator and Y register onto stack
|
||||
|
||||
LDY #0
|
||||
DoWhileLoop: INY
|
||||
JSR DisplayValue ;routine not implemented
|
||||
TYA
|
||||
SEC
|
||||
Modulus: SBC #6
|
||||
BCS Modulus
|
||||
ADC #6
|
||||
BNE DoWhileLoop
|
||||
|
||||
PLA
|
||||
TAY
|
||||
PLA ;restore Y register and accumulator from stack
|
||||
RTS ;return from subroutine
|
||||
Loading…
Add table
Add a link
Reference in a new issue