Download RA78K0R Ver. 1.20 Assembler Package Language UM
Transcript
CHAPTER 3 DIRECTIVES [Application Example] <Module 1> S1 : NAME EXTRN CSEG DW MOV BR SAMP1 SYM1 , SYM2 , BASE (SYM3) ; (1) SYM1 A , SYM2 !SYM3 ; (2) ; (3) ; (4) NAME PUBLIC SAMP2 SYM1 , SYM2 , SYM3 ; (4) CSEG EQU DSEG DB CSEG MOV 0FFH SADDR 012H BASE A , #20H END <Module 2> SYM1 DATA1 SYM2 : C1 SYM3 : ; (5) ; (6) ; (7) END (1) This EXTRN directive declares symbols "SYM1", "SYM2" and "SYM3" to be referenced in (2), (3) and (4) as external references. Two or more symbols may be described in the operand field. (2) This DW instruction references symbol "SYM1". (3) This MOV instruction references symbol "SYM2" and outputs a code that references an saddr area. (4) This BR instruction references symbol "SYM3" and outputs a code that references an area within a 64 KB area (0H to 0FFFFH).The symbols "SYM1", "SYM2" and "SYM3" are declared as external definitions. (5) The symbol "SYM1" is defined. (6) The symbol "SYM2" is defined. (7) The symbol "SYM3" is defined. User’s Manual U18546EJ1V0UM 137