misyachniy (09.09.2018 21:19, просмотров: 191) ответил VLLV на один вопрос - при чем тут "передается"?
Передача параметров в функцию http://netstorage.iar.com/SuppDB/Public/UPDINFO/006738/arm/doc/EWARM_DevelopmentGuide.ENU.pdf
Register parameters
The registers available for passing parameters are R0–R3:
The assignment of registers to parameters is a straightforward process. Traversing the
parameters from left to right, the first parameter is assigned to the available register or
registers. Should there be no more available registers, the parameter is passed on the
stack in reverse order.
When functions that have parameters smaller than 32 bits are called, the values are sign
or zero extended to ensure that the unused bits have consistent values. Whether the
values will be sign or zero extended depends on their type—signed or unsigned.
Stack parameters and layout
Stack parameters are stored in memory, starting at the location pointed to by the stack
pointer. Below the stack pointer (towards low memory) there is free space that the called
function can use. The first stack parameter is stored at the location pointed to by the
stack pointer. The next one is stored at the next location on the stack that is divisible by
four, etc. It is the responsibility