Well, I'm still in "oh my God, I can't beleive it's doing that" mode.

Taking a random sample of bit's and byte's and array's with random BANK1's ....
Code:
Cbyte       VAR BYTE
BBYTEArray  VAR BYTE(10)
BwordArray  VAR WORD(10)
AWORD       VAR WORD
BWORD       VAR WORD
ABYTEArray  VAR BYTE(10)   BANK1
AbitArray   VAR bit(10)
DWORD       VAR WORD
ABYTE       VAR BYTE
BBYTE       VAR BYTE
AWORDArray  VAR WORD(10)
CBit        VAR Bit
BbitArray   VAR bit(10)
C2byte      VAR BYTE      BANK1
B2BYTEArray VAR BYTE(10)  BANK1
B2wordArray VAR WORD(10)
A2WORD      VAR WORD
B2WORD      VAR WORD
A2BYTEArray VAR BYTE(10)  BANK1
A2bitArray  VAR bit(10)
D2WORD      VAR WORD
A2BYTE      VAR BYTE
B2BYTE      VAR BYTE
A2WORDArray VAR WORD(10)
C2Bit       VAR Bit
B2bitArray  VAR bit(10)
When compiled for a 16F877 looks something like this
Code:
  _A2WORDArray   EQU     RAM_START + 018h
  _AWORDArray    EQU     RAM_START + 02Ch
  _B2wordArray   EQU     RAM_START + 040h
  _BBYTEArray    EQU     RAM_START + 054h
  _A2WORD        EQU     RAM_START + 05Eh
  _A2BYTEArray   EQU     RAM_START + 080h  <-- BANK1 starts here
  _ABYTEArray    EQU     RAM_START + 08Ah
  _B2BYTEArray   EQU     RAM_START + 094h
  _C2byte        EQU     RAM_START + 09Eh
  _BwordArray    EQU     RAM_START + 09Fh
  _AWORD         EQU     RAM_START + 0B3h
  _B2WORD        EQU     RAM_START + 0B5h
  _BWORD         EQU     RAM_START + 0B7h
  _D2WORD        EQU     RAM_START + 0B9h
  _DWORD         EQU     RAM_START + 0BBh
  PBA01          EQU     RAM_START + 0BDh
  PBA02          EQU     RAM_START + 0BFh
  PBA03          EQU     RAM_START + 0C1h
  PBA04          EQU     RAM_START + 0C3h
  _A2BYTE        EQU     RAM_START + 0C5h
  _ABYTE         EQU     RAM_START + 0C6h
  _B2BYTE        EQU     RAM_START + 0C7h
  _BBYTE         EQU     RAM_START + 0C8h
  _Cbyte         EQU     RAM_START + 0C9h
  PB01           EQU     RAM_START + 0CAh
At this point, I can't see a pattern, or a definate "Rule" that could account for the placements.

A2WORD ends up in BANK0 even though it was declared after 3 BANK1 variables.

AWORD and BWORD were defined prior to any BANK1 vars, and yet, still ends up in BANK1???????

Does anyone see something I'm missing?
<br>