Return multiple values: Difference between revisions
Content added Content deleted
Puppydrum64 (talk | contribs) |
Puppydrum64 (talk | contribs) m (→{{header|Z80 Assembly}}: forgot to close lang) |
||
Line 2,838: | Line 2,838: | ||
=={{header|Z80 Assembly}}== |
=={{header|Z80 Assembly}}== |
||
A function can return multiple values by altering the contents of multiple registers. Code is ```CALL```ed as a subroutine. |
A function can return multiple values by altering the contents of multiple registers. Code is ```CALL```ed as a subroutine. |
||
<lang z80> |
<lang z80>foo: |
||
foo: |
|||
ld hl,&ABCD |
ld hl,&ABCD |
||
ld bc,&FFFF |
ld bc,&FFFF |
||
ret |
ret</lang> |
||