28.06.2013 Views

ISO Pascal reference manual

ISO Pascal reference manual

ISO Pascal reference manual

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 6<br />

; fetch the result via the pointer returned<br />

MOVD 0(R0), RO<br />

; clear parameter vector space from stack<br />

ADJSPB =-8<br />

; return to <strong>Pascal</strong> (or other suitable language) procedure<br />

- the 2 parameters to My_FNC are removed.<br />

RXP 8<br />

END<br />

It should be noted that while the code generated in <strong>Pascal</strong> for the function<br />

LocalFNC in the preceding example may be slightly less compact than the<br />

above hand-coded version, there will be an overhead in the cost of<br />

performing the CXP/RXP through My_FNC, relative to the BSR/RET<br />

which would be performed for the call to LocalFNC. The difference<br />

between the two methods may in consequence be very small.<br />

46 <strong>Pascal</strong> Issue I

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!