Parameter Passing: Difference between revisions
Content added Content deleted
Puppydrum64 (talk | contribs) No edit summary |
Puppydrum64 (talk | contribs) |
||
Line 18: | Line 18: | ||
The language's choices of parameter passing modes may vary greatly, as the following examples show. |
The language's choices of parameter passing modes may vary greatly, as the following examples show. |
||
===Example [[6502 Assembly]]=== |
===Example [[6502 Assembly]]=== |
||
As is typical of assembly languages, [[6502 Assembly]] doesn't restrict how parameters are passed in any way. Read-only data is of course immutable, but this is just the nature of read-only memory and not a limitation imposed by the language. |
As is typical of assembly languages, [[6502 Assembly]] doesn't restrict how parameters are passed to functions in any way. Read-only data is of course immutable, but this is just the nature of read-only memory and not a limitation imposed by the language. |
||
====Opcodes==== |
====Opcodes==== |
||
Line 79: | Line 79: | ||
sta ($20),y ; overwrite the old value stored in $0003 with the new one. |
sta ($20),y ; overwrite the old value stored in $0003 with the new one. |
||
rts</lang> |
rts</lang> |
||
===Example [[Ada]]=== |
===Example [[Ada]]=== |