sx28 memory question
Is this how the memory is laid out in the sx28
for each bank:
$0 - $f = global registers, indf,rtcc....
$10 - $20 = sram
for each bank:
$0 - $f = global registers, indf,rtcc....
$10 - $20 = sram
Comments
for each bank
$0 = indf
$1 = rtcc
$2 = pc
$3 = status
$4 = fsr
$5 = ra
$6 = rb
$7 = rc
$8 = ?
$9 = ?
$a = ?
$b = ?
$c = ?
$d = ?
$e = ?
$f = ?
$10 = sram
$11= sram
$12= sram
$13= sram
$14= sram
$15= sram
$16= sram
$17= sram
$18= sram
$19= sram
$1a= sram
$1b= sram
$1c= sram
$1d= sram
$1e= sram
$1f= sram
All other memory is "bank switched" using FSR.
$10 to $1F is a bank - This is the bank used by SX/B for normal variables, all other banks are for arrays
$30 to $3F is a bank
$50 to $5F is a bank
So if you want to use memory from $30 to $3F you would set FSR to #$20.
It's really confusing, and one of the major reasons why SX/B was created.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
“The United States is a nation of laws -· poorly written and randomly enforced.” - Frank Zappa
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
www.hittconsulting.com
·
$0 - $f = globals
$10 - $1f = bank 0
$20 - $2f = globals
$30 - $3f = bank 1
$40 - $4f = globals
$50 - $5f = bank 2
$60 - $6f = globals
$70 - $7f = bank 3
$80 - $8f = globals
$90 - $9f = bank 4
$a0 - $af = globals
$b0 - $bf = bank 5
$c0 - $cf = globals
$d0 - $df = bank 6
$e0 - $ef = globals
$f0 - $ff = bank7
right?