Does the in-code argument passing conventions used on PDP-11's have a name?Why did the PDP-11 include a JMP instruction?Was the PDP-11 coroutine instruction actually used?Timing and microcode in the PDP-11/40What is the starting address pointed by Stack Pointer in PDP 11?The baud rate of which serial card does the “stty” command returns in UNIX V7?What was the clock speed and ips for the original PDP-11?What is the history of the PDP-11 MARK instruction?PDP-11 JMP and JSR - how was the target specified?
Help rendering a complicated sum/product formula
Does the attack bonus from a Masterwork weapon stack with the attack bonus from Masterwork ammunition?
Are dual Irish/British citizens bound by the 90/180 day rule when travelling in the EU after Brexit?
How do hiring committees for research positions view getting "scooped"?
Knife as defense against stray dogs
Does .bashrc contain syntax errors?
What is the English word for a graduation award?
Variable completely messes up echoed string
Maths symbols and unicode-math input inside siunitx commands
Optimising a list searching algorithm
What does "^L" mean in C?
How to generate binary array whose elements with values 1 are randomly drawn
Existence of a celestial body big enough for early civilization to be thought of as a second moon
Probably overheated black color SMD pads
Comment Box for Substitution Method of Integrals
Brake pads destroying wheels
gerund and noun applications
Why are there no stars visible in cislunar space?
Synchronized implementation of a bank account in Java
What is the relationship between relativity and the Doppler effect?
Light propagating through a sound wave
In Aliens, how many people were on LV-426 before the Marines arrived?
두음법칙 - When did North and South diverge in pronunciation of initial ㄹ?
Why is there so much iron?
Does the in-code argument passing conventions used on PDP-11's have a name?
Why did the PDP-11 include a JMP instruction?Was the PDP-11 coroutine instruction actually used?Timing and microcode in the PDP-11/40What is the starting address pointed by Stack Pointer in PDP 11?The baud rate of which serial card does the “stty” command returns in UNIX V7?What was the clock speed and ips for the original PDP-11?What is the history of the PDP-11 MARK instruction?PDP-11 JMP and JSR - how was the target specified?
Some subroutine calls on PDP-11 machines would be coded with the arguments appearing immediately after JSR
or EMT
instruction, something like this (apologies for not knowing the exact MACRO syntax):
jsr r5,WRITE_STRING
.byte 'This is some string'.'0'
continue:
; do stuff
rts pc
WRITE_STRING:
movb (r5)+,r0
beq done
.PRINT r0
br WRITE_STRING
done:
inc r5
bic #1,r5
jmp (r5)
The jsr
instruction sets r5
to point to the beginning of an ASCIZ string that is located in-line in the code, right after the jsr
. The WRITE_STRING
subroutine then reads the bytes pointed to by r5
and prints them out until the terminating zero is found. r5
is then aligned property, and control is returned to the caller with jmp (r5)
.
There were variants of this calling conventions; for instance the arguments could be indirect, in which case pointers to the actual arguments would be inlined in code, rather than the arguments themselves.
Was there a name for this in-line argument technique?
pdp-11
add a comment |
Some subroutine calls on PDP-11 machines would be coded with the arguments appearing immediately after JSR
or EMT
instruction, something like this (apologies for not knowing the exact MACRO syntax):
jsr r5,WRITE_STRING
.byte 'This is some string'.'0'
continue:
; do stuff
rts pc
WRITE_STRING:
movb (r5)+,r0
beq done
.PRINT r0
br WRITE_STRING
done:
inc r5
bic #1,r5
jmp (r5)
The jsr
instruction sets r5
to point to the beginning of an ASCIZ string that is located in-line in the code, right after the jsr
. The WRITE_STRING
subroutine then reads the bytes pointed to by r5
and prints them out until the terminating zero is found. r5
is then aligned property, and control is returned to the caller with jmp (r5)
.
There were variants of this calling conventions; for instance the arguments could be indirect, in which case pointers to the actual arguments would be inlined in code, rather than the arguments themselves.
Was there a name for this in-line argument technique?
pdp-11
For common cases where code size would be more important than execution speed, including most uses variadic arguments, it would seem like code size could often have been reduced by having a generic "call function" function that would process encoded information stored immediately after the call itself which would describe the function and its arguments, reducing the size of code needed to supply them to the caller.
– supercat
Mar 7 at 17:22
Note that on systems using split I/D address spaces, this calling convention may not work as expected, because the argument fetches will come from the Data space rather than from the Instruction space.
– Ken Gober
Mar 7 at 23:25
It was certainly not a technique that showed up in RSX-11M kernel code, which generally favoured arguments in registers, with a strong emphasis on the argument being naturally in the right register anyway (e.g., everyone expected a UCB address in R5).
– another-dave
Mar 10 at 12:53
add a comment |
Some subroutine calls on PDP-11 machines would be coded with the arguments appearing immediately after JSR
or EMT
instruction, something like this (apologies for not knowing the exact MACRO syntax):
jsr r5,WRITE_STRING
.byte 'This is some string'.'0'
continue:
; do stuff
rts pc
WRITE_STRING:
movb (r5)+,r0
beq done
.PRINT r0
br WRITE_STRING
done:
inc r5
bic #1,r5
jmp (r5)
The jsr
instruction sets r5
to point to the beginning of an ASCIZ string that is located in-line in the code, right after the jsr
. The WRITE_STRING
subroutine then reads the bytes pointed to by r5
and prints them out until the terminating zero is found. r5
is then aligned property, and control is returned to the caller with jmp (r5)
.
There were variants of this calling conventions; for instance the arguments could be indirect, in which case pointers to the actual arguments would be inlined in code, rather than the arguments themselves.
Was there a name for this in-line argument technique?
pdp-11
Some subroutine calls on PDP-11 machines would be coded with the arguments appearing immediately after JSR
or EMT
instruction, something like this (apologies for not knowing the exact MACRO syntax):
jsr r5,WRITE_STRING
.byte 'This is some string'.'0'
continue:
; do stuff
rts pc
WRITE_STRING:
movb (r5)+,r0
beq done
.PRINT r0
br WRITE_STRING
done:
inc r5
bic #1,r5
jmp (r5)
The jsr
instruction sets r5
to point to the beginning of an ASCIZ string that is located in-line in the code, right after the jsr
. The WRITE_STRING
subroutine then reads the bytes pointed to by r5
and prints them out until the terminating zero is found. r5
is then aligned property, and control is returned to the caller with jmp (r5)
.
There were variants of this calling conventions; for instance the arguments could be indirect, in which case pointers to the actual arguments would be inlined in code, rather than the arguments themselves.
Was there a name for this in-line argument technique?
pdp-11
pdp-11
asked Mar 7 at 15:22
John KällénJohn Källén
1313
1313
For common cases where code size would be more important than execution speed, including most uses variadic arguments, it would seem like code size could often have been reduced by having a generic "call function" function that would process encoded information stored immediately after the call itself which would describe the function and its arguments, reducing the size of code needed to supply them to the caller.
– supercat
Mar 7 at 17:22
Note that on systems using split I/D address spaces, this calling convention may not work as expected, because the argument fetches will come from the Data space rather than from the Instruction space.
– Ken Gober
Mar 7 at 23:25
It was certainly not a technique that showed up in RSX-11M kernel code, which generally favoured arguments in registers, with a strong emphasis on the argument being naturally in the right register anyway (e.g., everyone expected a UCB address in R5).
– another-dave
Mar 10 at 12:53
add a comment |
For common cases where code size would be more important than execution speed, including most uses variadic arguments, it would seem like code size could often have been reduced by having a generic "call function" function that would process encoded information stored immediately after the call itself which would describe the function and its arguments, reducing the size of code needed to supply them to the caller.
– supercat
Mar 7 at 17:22
Note that on systems using split I/D address spaces, this calling convention may not work as expected, because the argument fetches will come from the Data space rather than from the Instruction space.
– Ken Gober
Mar 7 at 23:25
It was certainly not a technique that showed up in RSX-11M kernel code, which generally favoured arguments in registers, with a strong emphasis on the argument being naturally in the right register anyway (e.g., everyone expected a UCB address in R5).
– another-dave
Mar 10 at 12:53
For common cases where code size would be more important than execution speed, including most uses variadic arguments, it would seem like code size could often have been reduced by having a generic "call function" function that would process encoded information stored immediately after the call itself which would describe the function and its arguments, reducing the size of code needed to supply them to the caller.
– supercat
Mar 7 at 17:22
For common cases where code size would be more important than execution speed, including most uses variadic arguments, it would seem like code size could often have been reduced by having a generic "call function" function that would process encoded information stored immediately after the call itself which would describe the function and its arguments, reducing the size of code needed to supply them to the caller.
– supercat
Mar 7 at 17:22
Note that on systems using split I/D address spaces, this calling convention may not work as expected, because the argument fetches will come from the Data space rather than from the Instruction space.
– Ken Gober
Mar 7 at 23:25
Note that on systems using split I/D address spaces, this calling convention may not work as expected, because the argument fetches will come from the Data space rather than from the Instruction space.
– Ken Gober
Mar 7 at 23:25
It was certainly not a technique that showed up in RSX-11M kernel code, which generally favoured arguments in registers, with a strong emphasis on the argument being naturally in the right register anyway (e.g., everyone expected a UCB address in R5).
– another-dave
Mar 10 at 12:53
It was certainly not a technique that showed up in RSX-11M kernel code, which generally favoured arguments in registers, with a strong emphasis on the argument being naturally in the right register anyway (e.g., everyone expected a UCB address in R5).
– another-dave
Mar 10 at 12:53
add a comment |
2 Answers
2
active
oldest
votes
The older PDP-8 did similar. It had only one register to speak of (the accumulator), so a subroutine that took several parameters would typically provide a set of values and/or pointers to values immediately after the call instruction (JMS
). The called routine would increment the return address to access parameters, and finally to return to the caller just after the parameter block.
This text describes the parameter passing as "in-line":
https://people.cs.clemson.edu/~mark/subroutines/pdp8.html.
The PDP-8 handbook "Introduction to Programming", January 1969, page 3-19, item #6 describes it simply with the following:
The second number to be multiplied is brought into the subroutine by the
TAD I MULT
instruction since it is stored in the location specified by the address that theJMS
instruction automatically stores in the first location of the subroutine [i.e. the return address]. This is a common technique for transferring information to a subroutine.
The first instruction of a subroutine was where the return address is stored by the JMS instruction. Thus, this word was used to pick up parameters as well as to return to the function's caller. The PDP-8 had fixed size instructions and data words of 12-bits (word addressing only); it also supported a memory indirect addressing mode, and a memory increment operation, so this approach worked fairly well.
For languages where parameters are passed by reference, and variables are statically assigned (=have fixed virtual addresses), that approach may be considered "natural". Code the "call" instruction followed by the addresses of the actual-parameters; easy. This probably suits early Fortran on the -11, but as noted, split I/D breaks that. To answer the question though: I knew of no name except "inline arguments".
– another-dave
Mar 8 at 0:32
add a comment |
I do not know any specific name here. It was usually called a 'Parameter List'.
It may be due to the fact that this way was more or less the standard handling on many early systems supporting subroutine calls. The need of special names usually only arises when additional methods come into use.
Its inherent benefit is that no additional parameter register is needed, as the return address is stored in the link register, which can then double as a parameter list pointer, only to be advanced while processing, and at the end holding the return address (after the parameter list) (*1). For mainframe systems it was the standard calling convention.
Using the stack for return address handling is a rather new development - compared with parameter passing - but even then it was used quite a lot. Just think the way OS calls (*2) are made in Apple ProDOS.
*1 - In fact, it wouldn't at all be weird to think of it as a stack pointer to access (and pop) the parameters - and when all parameters are removed it holds the return address.
*2 - MLI or Machine Language Interface in ProDOS lingo. Here the JSR to $BF00, the ProDOS entry point, is followed by a byte defining the function call and a word holding the address of a parameter block for this function.
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "648"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fretrocomputing.stackexchange.com%2fquestions%2f9328%2fdoes-the-in-code-argument-passing-conventions-used-on-pdp-11s-have-a-name%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
The older PDP-8 did similar. It had only one register to speak of (the accumulator), so a subroutine that took several parameters would typically provide a set of values and/or pointers to values immediately after the call instruction (JMS
). The called routine would increment the return address to access parameters, and finally to return to the caller just after the parameter block.
This text describes the parameter passing as "in-line":
https://people.cs.clemson.edu/~mark/subroutines/pdp8.html.
The PDP-8 handbook "Introduction to Programming", January 1969, page 3-19, item #6 describes it simply with the following:
The second number to be multiplied is brought into the subroutine by the
TAD I MULT
instruction since it is stored in the location specified by the address that theJMS
instruction automatically stores in the first location of the subroutine [i.e. the return address]. This is a common technique for transferring information to a subroutine.
The first instruction of a subroutine was where the return address is stored by the JMS instruction. Thus, this word was used to pick up parameters as well as to return to the function's caller. The PDP-8 had fixed size instructions and data words of 12-bits (word addressing only); it also supported a memory indirect addressing mode, and a memory increment operation, so this approach worked fairly well.
For languages where parameters are passed by reference, and variables are statically assigned (=have fixed virtual addresses), that approach may be considered "natural". Code the "call" instruction followed by the addresses of the actual-parameters; easy. This probably suits early Fortran on the -11, but as noted, split I/D breaks that. To answer the question though: I knew of no name except "inline arguments".
– another-dave
Mar 8 at 0:32
add a comment |
The older PDP-8 did similar. It had only one register to speak of (the accumulator), so a subroutine that took several parameters would typically provide a set of values and/or pointers to values immediately after the call instruction (JMS
). The called routine would increment the return address to access parameters, and finally to return to the caller just after the parameter block.
This text describes the parameter passing as "in-line":
https://people.cs.clemson.edu/~mark/subroutines/pdp8.html.
The PDP-8 handbook "Introduction to Programming", January 1969, page 3-19, item #6 describes it simply with the following:
The second number to be multiplied is brought into the subroutine by the
TAD I MULT
instruction since it is stored in the location specified by the address that theJMS
instruction automatically stores in the first location of the subroutine [i.e. the return address]. This is a common technique for transferring information to a subroutine.
The first instruction of a subroutine was where the return address is stored by the JMS instruction. Thus, this word was used to pick up parameters as well as to return to the function's caller. The PDP-8 had fixed size instructions and data words of 12-bits (word addressing only); it also supported a memory indirect addressing mode, and a memory increment operation, so this approach worked fairly well.
For languages where parameters are passed by reference, and variables are statically assigned (=have fixed virtual addresses), that approach may be considered "natural". Code the "call" instruction followed by the addresses of the actual-parameters; easy. This probably suits early Fortran on the -11, but as noted, split I/D breaks that. To answer the question though: I knew of no name except "inline arguments".
– another-dave
Mar 8 at 0:32
add a comment |
The older PDP-8 did similar. It had only one register to speak of (the accumulator), so a subroutine that took several parameters would typically provide a set of values and/or pointers to values immediately after the call instruction (JMS
). The called routine would increment the return address to access parameters, and finally to return to the caller just after the parameter block.
This text describes the parameter passing as "in-line":
https://people.cs.clemson.edu/~mark/subroutines/pdp8.html.
The PDP-8 handbook "Introduction to Programming", January 1969, page 3-19, item #6 describes it simply with the following:
The second number to be multiplied is brought into the subroutine by the
TAD I MULT
instruction since it is stored in the location specified by the address that theJMS
instruction automatically stores in the first location of the subroutine [i.e. the return address]. This is a common technique for transferring information to a subroutine.
The first instruction of a subroutine was where the return address is stored by the JMS instruction. Thus, this word was used to pick up parameters as well as to return to the function's caller. The PDP-8 had fixed size instructions and data words of 12-bits (word addressing only); it also supported a memory indirect addressing mode, and a memory increment operation, so this approach worked fairly well.
The older PDP-8 did similar. It had only one register to speak of (the accumulator), so a subroutine that took several parameters would typically provide a set of values and/or pointers to values immediately after the call instruction (JMS
). The called routine would increment the return address to access parameters, and finally to return to the caller just after the parameter block.
This text describes the parameter passing as "in-line":
https://people.cs.clemson.edu/~mark/subroutines/pdp8.html.
The PDP-8 handbook "Introduction to Programming", January 1969, page 3-19, item #6 describes it simply with the following:
The second number to be multiplied is brought into the subroutine by the
TAD I MULT
instruction since it is stored in the location specified by the address that theJMS
instruction automatically stores in the first location of the subroutine [i.e. the return address]. This is a common technique for transferring information to a subroutine.
The first instruction of a subroutine was where the return address is stored by the JMS instruction. Thus, this word was used to pick up parameters as well as to return to the function's caller. The PDP-8 had fixed size instructions and data words of 12-bits (word addressing only); it also supported a memory indirect addressing mode, and a memory increment operation, so this approach worked fairly well.
answered Mar 7 at 16:10
Erik EidtErik Eidt
1,097412
1,097412
For languages where parameters are passed by reference, and variables are statically assigned (=have fixed virtual addresses), that approach may be considered "natural". Code the "call" instruction followed by the addresses of the actual-parameters; easy. This probably suits early Fortran on the -11, but as noted, split I/D breaks that. To answer the question though: I knew of no name except "inline arguments".
– another-dave
Mar 8 at 0:32
add a comment |
For languages where parameters are passed by reference, and variables are statically assigned (=have fixed virtual addresses), that approach may be considered "natural". Code the "call" instruction followed by the addresses of the actual-parameters; easy. This probably suits early Fortran on the -11, but as noted, split I/D breaks that. To answer the question though: I knew of no name except "inline arguments".
– another-dave
Mar 8 at 0:32
For languages where parameters are passed by reference, and variables are statically assigned (=have fixed virtual addresses), that approach may be considered "natural". Code the "call" instruction followed by the addresses of the actual-parameters; easy. This probably suits early Fortran on the -11, but as noted, split I/D breaks that. To answer the question though: I knew of no name except "inline arguments".
– another-dave
Mar 8 at 0:32
For languages where parameters are passed by reference, and variables are statically assigned (=have fixed virtual addresses), that approach may be considered "natural". Code the "call" instruction followed by the addresses of the actual-parameters; easy. This probably suits early Fortran on the -11, but as noted, split I/D breaks that. To answer the question though: I knew of no name except "inline arguments".
– another-dave
Mar 8 at 0:32
add a comment |
I do not know any specific name here. It was usually called a 'Parameter List'.
It may be due to the fact that this way was more or less the standard handling on many early systems supporting subroutine calls. The need of special names usually only arises when additional methods come into use.
Its inherent benefit is that no additional parameter register is needed, as the return address is stored in the link register, which can then double as a parameter list pointer, only to be advanced while processing, and at the end holding the return address (after the parameter list) (*1). For mainframe systems it was the standard calling convention.
Using the stack for return address handling is a rather new development - compared with parameter passing - but even then it was used quite a lot. Just think the way OS calls (*2) are made in Apple ProDOS.
*1 - In fact, it wouldn't at all be weird to think of it as a stack pointer to access (and pop) the parameters - and when all parameters are removed it holds the return address.
*2 - MLI or Machine Language Interface in ProDOS lingo. Here the JSR to $BF00, the ProDOS entry point, is followed by a byte defining the function call and a word holding the address of a parameter block for this function.
add a comment |
I do not know any specific name here. It was usually called a 'Parameter List'.
It may be due to the fact that this way was more or less the standard handling on many early systems supporting subroutine calls. The need of special names usually only arises when additional methods come into use.
Its inherent benefit is that no additional parameter register is needed, as the return address is stored in the link register, which can then double as a parameter list pointer, only to be advanced while processing, and at the end holding the return address (after the parameter list) (*1). For mainframe systems it was the standard calling convention.
Using the stack for return address handling is a rather new development - compared with parameter passing - but even then it was used quite a lot. Just think the way OS calls (*2) are made in Apple ProDOS.
*1 - In fact, it wouldn't at all be weird to think of it as a stack pointer to access (and pop) the parameters - and when all parameters are removed it holds the return address.
*2 - MLI or Machine Language Interface in ProDOS lingo. Here the JSR to $BF00, the ProDOS entry point, is followed by a byte defining the function call and a word holding the address of a parameter block for this function.
add a comment |
I do not know any specific name here. It was usually called a 'Parameter List'.
It may be due to the fact that this way was more or less the standard handling on many early systems supporting subroutine calls. The need of special names usually only arises when additional methods come into use.
Its inherent benefit is that no additional parameter register is needed, as the return address is stored in the link register, which can then double as a parameter list pointer, only to be advanced while processing, and at the end holding the return address (after the parameter list) (*1). For mainframe systems it was the standard calling convention.
Using the stack for return address handling is a rather new development - compared with parameter passing - but even then it was used quite a lot. Just think the way OS calls (*2) are made in Apple ProDOS.
*1 - In fact, it wouldn't at all be weird to think of it as a stack pointer to access (and pop) the parameters - and when all parameters are removed it holds the return address.
*2 - MLI or Machine Language Interface in ProDOS lingo. Here the JSR to $BF00, the ProDOS entry point, is followed by a byte defining the function call and a word holding the address of a parameter block for this function.
I do not know any specific name here. It was usually called a 'Parameter List'.
It may be due to the fact that this way was more or less the standard handling on many early systems supporting subroutine calls. The need of special names usually only arises when additional methods come into use.
Its inherent benefit is that no additional parameter register is needed, as the return address is stored in the link register, which can then double as a parameter list pointer, only to be advanced while processing, and at the end holding the return address (after the parameter list) (*1). For mainframe systems it was the standard calling convention.
Using the stack for return address handling is a rather new development - compared with parameter passing - but even then it was used quite a lot. Just think the way OS calls (*2) are made in Apple ProDOS.
*1 - In fact, it wouldn't at all be weird to think of it as a stack pointer to access (and pop) the parameters - and when all parameters are removed it holds the return address.
*2 - MLI or Machine Language Interface in ProDOS lingo. Here the JSR to $BF00, the ProDOS entry point, is followed by a byte defining the function call and a word holding the address of a parameter block for this function.
edited Mar 8 at 11:00
Community♦
1
1
answered Mar 7 at 15:43
RaffzahnRaffzahn
52.9k6126213
52.9k6126213
add a comment |
add a comment |
Thanks for contributing an answer to Retrocomputing Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fretrocomputing.stackexchange.com%2fquestions%2f9328%2fdoes-the-in-code-argument-passing-conventions-used-on-pdp-11s-have-a-name%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
For common cases where code size would be more important than execution speed, including most uses variadic arguments, it would seem like code size could often have been reduced by having a generic "call function" function that would process encoded information stored immediately after the call itself which would describe the function and its arguments, reducing the size of code needed to supply them to the caller.
– supercat
Mar 7 at 17:22
Note that on systems using split I/D address spaces, this calling convention may not work as expected, because the argument fetches will come from the Data space rather than from the Instruction space.
– Ken Gober
Mar 7 at 23:25
It was certainly not a technique that showed up in RSX-11M kernel code, which generally favoured arguments in registers, with a strong emphasis on the argument being naturally in the right register anyway (e.g., everyone expected a UCB address in R5).
– another-dave
Mar 10 at 12:53