Download MCUez ASSEMBLER USER`S MANUAL
Transcript
Freescale Semiconductor, Inc. OPERATING PROCEDURES CHAPTER 12 OPERATING PROCEDURES Freescale Semiconductor, Inc... 12.1 INTRODUCTION This chapter provides operating procedures for the the MCUez Assembler. 12.2 WORKING WITH ABSOLUTE SECTIONS An absolute section is a section in which the start address is known at assembly time (see modules fiboorg.asm and fiboorg.prm in the demo directory). 12.2.1 Defining Absolute Sections In The Assembly Source File Absolute sections are defined with the directive ORG. The Assembler makes pseudo-section ORG_<index>. The integer <index> is incremented when an absolute section is encountered. Example: Defining an absolute section containing data: ORG $A00 ; Absolute constant data section. cst1: DC.B $A6 cst2: DC.B $BC ORG $800 ; Absolute data section. var: DS.B 1 The label cst1 will be at address $A00, and cst2 will be at address $A01. Defining an absolute section containing code: ORG $C00 ; Absolute code section. LDA ADD STA BRA cst1 cst2 var entry ; Load value in cst1 ; Add value in cst2 ; Store in var entry: The instruction LDA will be at address $C00 and instruction ADD at address $C03. To avoid problems during linking or execution, an assembly file should: MCUEZASM08/D For More Information On This Product, Go to: www.freescale.com 12-1