Please note that JavaScript and style sheet are used in this website,
Due to unadaptability of the style sheet with the browser used in your computer, pages may not look as original.
Even in such a case, however, the contents can be used safely.
FAQ-ID : 78map-nnnn
FAQ-ID : 78map-0001Last Updated : 2006/04
Memory type Size Address Variable name Segment name
-----------------------------------------------------------------------------------------
(1) Internal high-speed RAM 1 Kbyte (FB00 to FE1F) a, b, c @@DATA (default)
saddr area (FE20 to FEFF) x, y, z @@DATA (default)
(2) Buffer RAM 32 bytes (FAC0 to FADF) serbuf[32] BUFSEG
(3) Internal expansion RAM 1 Kbyte (F400 to F7FF) extdbuf[1024] EXTDSEG
|
| main.c |
extern char serbuf[32];
extern char extdbuf[1024];
int a, b, c;
sreg int x, y, z;
void main()
{
}
|
| data.c |
#pragma section @@DATA BUFSEG char serbuf[32]; #pragma section @@DATA EXTDSEG char extdbuf[1024]; |
| linkdir.dr | |
merge BUFSEG : =LRAM merge EXTDSEG : =IXRAM |
(a) (b) |
| s0l.map |
*** Public symbol list *** MODULE ATTR VALUE NAME (Other symbols are omitted) main ADDR FB78H _a main ADDR FB7AH _b main ADDR FB7CH _c main ADDR FE20H _x main ADDR FE22H _y main ADDR FE24H _z data2 ADDR F400H _extdbuf data1 ADDR FAC0H _serbuf |
Memory type Size Address Variable name Segment name ------------------------------------------------------------------------------- (1)Internal ROM 48 Kbytes (0000 to BFFF) main() @@CODE (2)External ROM 4 Kbytes (C000 to CFFF) sub() GROMSEG (3)External RAM 1 Kbyte (D000 to D3FF) gaibubuf[1024] GRAMSEG |
| main.c |
void sub();
void main()
{
sub();
}
|
| sub.c |
#pragma section @@CODE GROMSEG
extern char gaibubuf[1024];
void sub()
{
gaibubuf[1] = 123;
}
|
| data.c |
#pragma section @@DATA GRAMSEG char gaibubuf[1024]; |
| linkdir.dr | |
memory GAIROM : (0C000H,1000H) /EX1 memory GAIRAM : (0D000H,0400H) merge GROMSEG : =GAIROM /EX1 merge GRAMSEG : =GAIRAM |
(a) (b) (c) (d) |
| s0l.map |
*** Public symbol list *** MODULE ATTR VALUE NAME (Other symbols are omitted) main ADDR 0111H _main sub ADDR C000H _sub data ADDR D000H _gaibubuf |
| main.hex |
:0200000080007E :1000800061D0EE1C20FE9AEC001000000354FB032C :1000900040FB0344FB400342FB1058FB0356FB1696 :1000A00080001478FBC6EA8000AD0687958684FA46 :1000B000F41678FBC6EA78FBAD06A1009786FAF441 :1000C0001680001420FEC6EA8000AD06879586845F :1000D000FAF41620FEC6EA20FEAD06A1009786FAC5 :1000E000F49A11011000009AED00FAFEAF0240FBF5 :1000F0003061013027D667616EAD129696B7C6CAD9 :1001000000FBD68730AE01B69A0F01FAE9FAFE314C :010110009856 :040111009A00C0AFE1 :00000001FF |
| main.H1 |
:06C00000A17B9E01D0AF00 :00000001FF |
FAQ-ID : 78map-0002Last Updated : 2006/04
data2 dseg 8000h tmp: ds 2Why cannot this method be used to access an external memory area?
MEMORY RAMEX : (8000H,7800H)In this memory directive, "RAMEX" is the name of the added external memory area (specify a name that is not already being used). Use the linker option -D to specify the file name of the link directive created in this way.
FAQ-ID : 78map-0003Last Updated : 2006/04
FAQ-ID : 78map-0004Last Updated : 2006/04
MOVW HL, #TEST
MOV A, [HL]
TEST: <- Address is in the range from 00000H to 0EAFFH
DB 00H, 00H, 00H, 00H
FAQ-ID : 78map-0005Last Updated : 2006/04
FAQ-ID : 78map-0006Last Updated : 2006/04
MOV A, #0
MOV [DE], A
it seems that [TDE] is set instead of [DE]. MOV 0[DE], AThe above example shows the format (a 5-byte instruction).
FAQ-ID : 78map-0007Last Updated : 2006/04
FAQ-ID : 78map-0008Last Updated : 2006/04
FAQ-ID : 78map-0009Last Updated : 2006/04
memory ROM :(0, 0EE00H)
memory RAM :(0EE00H, 1100H)
FAQ-ID : 78map-0010Last Updated : 2006/04
FAQ-ID : 78map-0011Last Updated : 2006/04
FAQ-ID : 78map-0012Last Updated : 2006/04
FAQ-ID : 78map-0013Last Updated : 2006/04
SEG1 CSEG AT 40H
If the CALLT instruction is used effectively, it may result in a shorter program than when this method is used.
FAQ-ID : 78map-0101Last Updated : 2008/02