Loops/Downward for: Difference between revisions
Content deleted Content added
Puppydrum64 (talk | contribs) No edit summary |
|||
Line 98: | Line 98: | ||
JSR Send ;routine not implemented here |
JSR Send ;routine not implemented here |
||
RTS </lang> |
RTS </lang> |
||
=={{header|68000 Assembly}}== |
|||
Code is called as a subroutine, i.e. "JSR ForLoop." OS/Hardware specific printing subroutines are unimplemented here. |
|||
<lang 68000devpac>ForLoop: |
|||
MOVE.B #10,D0 |
|||
MOVE.W #9,D1 ;DBcc operates at word length so we need to clear the upper byte of the word. |
|||
loop: |
|||
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 |
|||
DBRA D1,loop ;repeat until D1.W = $FFFF |
|||
rts</lang> |
|||
=={{header|AArch64 Assembly}}== |
=={{header|AArch64 Assembly}}== |
||
{{works with|as|Raspberry Pi 3B version Buster 64 bits}} |
{{works with|as|Raspberry Pi 3B version Buster 64 bits}} |