Quote Originally Posted by BrianT View Post
I am using the M25P128 memory chip which needs a 24 bit address. I use

Addr0 var byte ' LSB of 24 bit address
Addr1 var byte
Addr2 var byte ' MSB of 24 bit address

Every time Addr0 overflows I increment Addr1.
Every time Addr1 overflows I increment Addr2.

In my case I run Addr2 all the way up to FF. In your case Addr2 will only be 0 or 1.

HTH
BrianT
Right. Thanks.
I use address_low as a word var and address_high as a word var.
When address_low overflows, it increments address_high by 1.

I use a word var because with that I can increment this variable up to $FF.

I think it should do the trick.