First page Back Continue Last page Overview Graphics

Assembler Directive - switch


Notes:

The switch directive sets the active assembler location counter to the specified section. If this is the first code in the section and an explicit origin is not defined, the offset in the section will be zero. As code or data is encountered the location counter is incremented by 1 with each byte of data or code. Offset addresses are assigned to each instruction or variable based on the value in the location counter. When the code is finally linked, the offset values assigned to instructions or variables are added to the section starting addresses defined in the linker setup. Sections from different program modules with the same names are linked together and placed in sequential memory.

A programmer can switch back to previous sections at any time.