Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
BNKSETUP.EXE
C:\PROG\IAR\V440A\EXE>BNKSETUP.EXE
Welcome to the 64180/Z818X bank setup utility.
Your logical 64K memory map is divided in 3 parts:
1. A root code area (Common area 0) which will hold
interrupts, non-banked functions and assembly support
routines. This block starts at address 0x0000
2. A bank area which will hold your banked C code.
3. A fixed data area (Common area 1) which starts above
the bank are and ends at 0xFFFF. This is where you
will have your stack and RAM
Each block must start at an even 4K boundary
Hit a key...
The logical memory map can be visualized as:
+----------------+ FFFF
| |
| Data area |
| |
+----------------+ YYYY
| |
| Bank area |
| |
+----------------+ XXXX
| |
| Root code |
| |
+----------------+ 0000
Give me the value of XXXX (in hex):4000
Give me the value of YYYY (in hex):8000
Ok, now a few words about the physical memory which can be
512K or 1024K large depending on your chip.
In your case, the root code area must be located at physical memory
address 0000-3FFF.
Both the bank area and the data area can start at any 4K
page within the physical memory.
Enter full physical start address for banked code (in hex):10000
Enter full physical start address for the data area (in hex):20000
Your logical 64K memory map looks like this:
+----------------+ FFFF
| |
| Data area |
| |
+----------------+ 8000
| |
| Bank area |
| |
+----------------+ 4000
| |
| Root code |
| |
+----------------+ 0000
Hit a key...
Physical memory is layed out as follows:
Root code ranges from 0000-3FFF.
Data is located at 020000-027FFF
Banked code is located at 010000-01FFFF
It is perfectly ok if you do not fill out all this memory as
long as it is enough to hold your application.
Hit a key...
* * Information to put into your link file:
-b(CODE)CODE=0C4000,4000,040000
-Z(DATA)DATA0,IDATA0,UDATA0,ECSTR,WCSTR,TEMP,CSTACK+200=8000-FFFF
-Z(CODE)RCODE,CDATA0,ZVECT,CONST,CSTR,CCSTR=100-3FFF
-DCBAR=84
-DCBR=18
If you use the INTVEC segment and interrupt mode 2, you may want
to make some room by adjusting the RCODE segment above.
You should also adjust the stack size (200) and insert your own
segments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment