I need to access 512k of XDATA, and it seems that there are two options: XBANKING.A51 and L51_BANK.A51. Does anyone have any experience/knowledge that would help me choose which is best to use? Basically, I want pros/cons/war stories for each method. Thanks, Greg
XBANKING has code just for data space banking to allow more than 64KB of xdata (far memory). L51_BANK has routines both program space banking, to allow more than 64 KB of code, and also xdata banking. This file is a little hard to read due to all the conditional compilation, but essentially it has one set of routines for data access, and another set for code access, with several options that let you enable code for common types of banking hardware without having to write code. The actual memory access routines in either are the same, so it's not a question of capability or feature set. If one of the "canned" styles of hardware matches your hardware, then those are the easiest to enable. XBANKING expects a byte register that lives in either SFR space or xdata space that controls the high order address bits. L51 is a little more powerful. But even the "code your own" interface (type 4 in L51) is not that hard to understand. Oddly enough, I use both. I started out with XBANKING, and then as the code grew, I added L51_BANK -- but with the xdata banking code in that file disabled.