Hi Daniel,
I am in the process of testing my own code based on AN3730 Understanding Memory Paging in 9S08 Devices,
Method 1:
p.4 ---> Section 2.1 The Program Page (PPAGE)
Quote:To read and write data, set the page value in the PPAGE register and then access the memory between
addresses 0x8000 and 0xBFFF. Every page is offset with the PPAGE value.
p.7 ---> Section 4 The Full Memory Map
Quote:The PPAGE default value is 2 at startup, which results in a contiguous memory block from page 1
to 3.
Therefore I simply read and write using LDA, STA or MOV instructions to read and write (LAP2:LAP0)
My code:
/*To write 0 in the 1st address at PPAGE2
ldhx #$80
ldx #0
clra
sta ,x
//======================
Method 2:
p.5 ---> Section 2.2 Linear Address Pointer and Linear Address Space
Using addresses in Figure.9 on page 11
My code:
/*To write 0 in the 1st address at PPAGE2
mov #0, LAP2
mov #$80, LAP1
mov #0, LAP0
mov #0, LB
Both method does not work, looking forward to your advise.