Submitted by Steve Fewell
Description:
This routine will return the value of PAGE.
Set Y (MSB of the address) to the value of location &18 (i.e. the PAGE number).
Set A (LSB of the address) to 0, as pages always start at byte 0 within the page.
Call routine &AE1A to set the IWA to the value of Y * 256 + A.
AE08 | 164 024 | A4 18 | LDY &18 | |
AE0A | 169 000 | A9 00 | LDA#&00 | |
AE0C | 128 012 | 80 0C | BRA 12 --> &AE1A Set IWA to 16-bit value |