Loops/Downward for: Difference between revisions

no edit summary
No edit summary
Line 98:
JSR Send ;routine not implemented here
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}}==
{{works with|as|Raspberry Pi 3B version Buster 64 bits}}
1,489

edits