I'm trying to write an assembler function to read a string from program memory 
using LPM and
return a shortstring result.  Consider the following prototype function:

function readProgmemStr(constref s: shortstring): shortstring;

It appears from the generated code as if the function result location is 
assigned before the
function is called, with the reference to the function result passed as first 
parameter (in
R24:R25) and the reference to s passed as the second parameter (in R22:R23). Is 
this indeed the
current parameter handling for shortstring function result type?

If so it probably warrants a mention on the AVR wiki page.  Are there any other 
data types that
deviates from the GCC AVR calling convention in this way?
_______________________________________________
fpc-devel maillist  -  [email protected]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to