Loops/Downward for: Difference between revisions
Content added Content deleted
Puppydrum64 (talk | contribs) No edit summary |
Puppydrum64 (talk | contribs) |
||
Line 102: | Line 102: | ||
Code is called as a subroutine, i.e. "JSR ForLoop." OS/Hardware specific printing subroutines are unimplemented here. |
Code is called as a subroutine, i.e. "JSR ForLoop." OS/Hardware specific printing subroutines are unimplemented here. |
||
<lang 68000devpac>ForLoop: |
<lang 68000devpac>ForLoop: |
||
MOVE. |
MOVE.W #10,D0 |
||
MOVE.W #9,D1 ;DBcc operates at word length so we need to clear the upper byte of the word. |
|||
loop: |
loop: |
||
JSR Print_D0_As_Ascii ;some routine that converts the digits of D0 into ascii characters and prints them to screen. |
JSR Print_D0_As_Ascii ;some routine that converts the digits of D0 into ascii characters and prints them to screen. |
||
⚫ | |||
SUBQ.B #1,D0 |
|||
⚫ | |||
rts</lang> |
rts</lang> |
||