Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
14
Task/Loops-For/68000-Assembly/loops-for.68000
Normal file
14
Task/Loops-For/68000-Assembly/loops-for.68000
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
main:
|
||||
MOVEQ #1,D1 ;counter for how many times to print *, this is also the loop counter
|
||||
.outerloop:
|
||||
MOVE.W D1,D2
|
||||
SUBQ.W #1,D2
|
||||
.innerloop:
|
||||
MOVE.B #'*',D0
|
||||
JSR PrintChar ;hardware-dependent printing routine
|
||||
DBRA D2,.innerloop ;DBRA loops until wraparound to $FFFF, which is why we subtracted 1 from D2 earlier.
|
||||
JSR NewLine ;hardware-dependent newline routine
|
||||
ADDQ.W #1,D1
|
||||
CMP.W #6,D1 ;are we done yet?
|
||||
BCS .outerloop ;if not, go back to the top
|
||||
RTS
|
||||
Loading…
Add table
Add a link
Reference in a new issue