
Assembler Package for 740 Family V.4.10 Release 02 Release Notes
Rev.3.00 Jul. 16, 2006 page
17 of 19
REJ10J1149-0300
7. Tips for SRA74
Writing programs for accessing the M37280’s expansion memory
SRA74 is capable of working beyond the 64 Kbytes of the M37280.
BK single term operator
This operator obtains the bank value.
• Only values defined in assembly execution can be specified as the operation value.
• Forward reference values, external reference values and relocatable values cannot be specified.
Bank value
The bank value is obtained by shifting the address value to the right 12 bits and subtracting 10H.
For example, the bank value of 12345H would be 2.
To calculate the bank value using a regular operator, the following equation must be written.
However, with the BK operator, program readability is improved.
To calculate the bank value using a regular operator
# DTtBank10 / 1000H - 10H
To calculate the bank value using the BK single term operator
# BK DTtBank10
BL single term operator
This operator obtains the extra area value.
• Only values defined in assembly execution can be specified as the operation value.
• Forward reference values, external reference values and relocatable values cannot be specified.
Extra area value
The extra area value is obtained by adding 1000H to the low-order 12 bits of the address value.
For example, the extra area value of 12345H would be 1345H.
To calculate the extra area value using a regular operator, the following equation must be
written. However, with the BL operator, program readability is improved.
To calculate the extra area value using a regular operator
# DTtBank10 & 0FFFH + 1000H
To calculate the extra area value using the BL single term operator
# BL DTtBank10
SECTION E
Section E is a non-generated section.
It can be specified to avoid overlap errors that occur in linking when local information of the same
address exists in multiple files.
Area exceeding 64 KB can be accessed locally. Accordingly, BL and BK single term operators,
which are the only operators applicable with values defined in assembly, can be used.
Note!
Section E must be defined as an absolute section using the .ORG pseudo-command.
Capital and small case letters are not distinguished in the “E” of the section name.
Programming example
The below example programs access the M37280’s expansion memory area. In this example,
data DTtBank10 is loaded into the respective files starting from address 1BA00H in the expansion
memory. Here also, section E of file1.a74 and section DataSecE of file2.a74 have the same
contents, but link errors are avoided by specifying section E of file1.a74, which makes it possible
to access DTtBank10 in each of the files locally.
Comments to this Manuals