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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

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

Software Concept 1−15<br />

All attributes of a task (except the task name to which no address or value<br />

corresponds) are relocatable; a task can, therefore, be programmed as an<br />

unit available for general use. It is not until locate−time that a task is<br />

assigned, via its attributes, to the processor resources (internal RAM,<br />

interrupt vector table). For special programming tasks, however, it is<br />

possible to absolutely define the attributes already in the assembler. The<br />

submodules of a task contain procedures which are, in general, used only<br />

in this task. Each submodule contains a register bank declaration. This<br />

declaration (REGBANK without name) notifies the assembler as to the<br />

register configuration of the register bank defined in the main module. In<br />

this manner, you can check already at assembly time whether only<br />

registers belonging to this task have been used. If more registers have<br />

been used, the linker issues a warning and expands the register bank to<br />

the correct length.<br />

Example:<br />

Register definition in the main module:<br />

RBAST1 REGBANK R0 − R9<br />

Register declaration in the submodules:<br />

REGBANK R0 − R9<br />

All modules of a task are linked by the linker to a larger relocatable ’task<br />

module’. Thus after the linker run, only one module exists for each task.<br />

The locator fulfills the function of linking several tasks, distributing the<br />

processor resources and generating one program module from all input<br />

modules.<br />

1.4.4 CONNECTIONS BETWEEN TASKS<br />

Several tasks can communicate with each other by using shared data.<br />

Access can also be made from one task to the data and code of another<br />

task by COMMON sections. Fast access to data can be performed by<br />

COMREG registers.

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

Saved successfully!

Ooh no, something went wrong!