06.02.2013 Views

C166/ST10 Cross-Assembler, Linker/Locator, Utilities ... - Tasking

C166/ST10 Cross-Assembler, Linker/Locator, Utilities ... - Tasking

C166/ST10 Cross-Assembler, Linker/Locator, Utilities ... - Tasking

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.

• • • • • • • •<br />

<strong>Assembler</strong> Directives 7−55<br />

4. When an EXTERN NEAR or FAR is resolved by a GLOBAL NEAR or FAR<br />

symbol from a module, the locator assumes that the GLOBAL is a<br />

procedure which is called by the EXTERN. To be sure that the register<br />

bank of the caller (the EXTERN) contains all registers which can be used<br />

by the callee (the GLOBAL), all registers which exist in register banks of<br />

the module of the callee but do not exist in the register banks in the<br />

module of the caller are added to the register banks of the caller as private<br />

registers (see example A.). This combination is not done when the<br />

STRICTTASK control is set.<br />

When register definitions or declarations are combined, overlapping or<br />

mismatching COMMON register ranges result in an error message.<br />

Example A<br />

file mod1.src:<br />

RB1 REGDEF R5,R7,R10−R15<br />

RB2 REGDEF R4,R7<br />

...<br />

GLOBAL PROC1<br />

PROC1 PROC NEAR<br />

...<br />

PROC1 ENDP<br />

...<br />

END<br />

file mod2.src:<br />

RB REGDEF R1,R3,R10−R12<br />

...<br />

EXTERN PROC1:NEAR<br />

...<br />

CALL PROC1<br />

...<br />

END<br />

Invocations:<br />

a166 mod1.src<br />

a166 mod2.src<br />

l166 locate mod1.obj mod2.obj to mod.out

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

Saved successfully!

Ooh no, something went wrong!