Flow-control structures: Difference between revisions
Content added Content deleted
Puppydrum64 (talk | contribs) |
Puppydrum64 (talk | contribs) m (→{{header|Z80 Assembly}}: formatting) |
||
Line 3,004: | Line 3,004: | ||
PUSH rr RET ; fake a return address and "return" to that address |
PUSH rr RET ; fake a return address and "return" to that address |
||
CALL label ; call a subroutine named "label" |
CALL label ; call a subroutine named "label" |
||
CALL z,label ;call a subroutine named "label" conditionally |
CALL z,label ; call a subroutine named "label" conditionally |
||
RET ;return from subroutine |
RET ; return from subroutine |
||
RET z ;return from subroutine conditionally |
RET z ; return from subroutine conditionally |
||
DJNZ label ;decrement, jump if B nonzero to label |
DJNZ label ; decrement, jump if B nonzero to label |
||
LDIR ;load, increment, repeat until BC = 0 |
LDIR ; load, increment, repeat until BC = 0 |
||
LDDR ;load, decrement, repeat until BC = 0 |
LDDR ; load, decrement, repeat until BC = 0 |
||
CPIR ;compare, increment, repeat until BC = 0 |
CPIR ; compare, increment, repeat until BC = 0 |
||
CPDR ;compare, decrement, repeat until BC = 0 |
CPDR ; compare, decrement, repeat until BC = 0 |
||
OTIR ;out, increment, repeat until BC = 0 |
OTIR ; out, increment, repeat until BC = 0 |
||
OTDR ;out, decrement, repeat until BC = 0 |
OTDR ; out, decrement, repeat until BC = 0 |
||
INIR ;in, increment, repeat until BC = 0 |
INIR ; in, increment, repeat until BC = 0 |
||
INDR ;in, decrement, repeat until BC = 0</lang> |
INDR ; in, decrement, repeat until BC = 0</lang> |
||
=={{header|zkl}}== |
=={{header|zkl}}== |