I'm using an ASIC that pages into its RAM/ROM. So it has 16k blocks that are paged using registers, PAGEA,PAGEB,PAGEC. It has 128k of code and ram space. How do i setup the compiler to access the ram correctly? I know under options i can set the size of the ram but it wouldn't know about the page registers. Do i have to declare variables in certain pages myself or will the compiler know when to put the variable into a different page? Will it know to toggle the page registers to access the data? David
You're right. The compiler emits calls to your user defined functions to to load and store data. If you can tolerate the speed hit, this is a simple way to go. I erroneously assumed, that for the sake of speed, that loads and store would be split into a "8 bit page changing macro" and "16 bit dptr accesses".
BYTE far Var1[ 0x1FFE ]; BYTE far Var2[100]; Var1[20] = Var2[5]; 0008 7B00 R MOV R3,#MBYTE Var2 000A 7A00 R MOV R2,#HIGH Var2+05H 000C 7900 R MOV R1,#LOW Var2+05H 000E 120000 E LCALL ?C?CLDPTR 0011 7B00 R MOV R3,#MBYTE Var1 0013 7A00 R MOV R2,#HIGH Var1+014H 0015 7900 R MOV R1,#LOW Var1+014H 0017 020000 E LJMP ?C?CSTPTR