; Memory: reading and writing bytes by their address BYTE background=710 ; this variable IS the byte at address 710 BYTE ARRAY page6(256)=1536 ; an array placed at address 1536 ($600) PROC Main() BYTE value CARD word Poke(1536, 65) ; write 65 to address 1536 value=Peek(1536) ; read it back Print("Address 1536 holds ") PrintBE(value) PokeC(1538, 50000) ; a CARD takes two bytes: 1538 and 1539 word=PeekC(1538) Print("Addresses 1538-1539 hold ") PrintCE(word) Print("Low byte ") PrintB(Peek(1538)) Print(", high byte ") PrintBE(Peek(1539)) page6(4)=7 ; the same memory through the array Print("page6(4) is address 1540: ") PrintBE(Peek(1540)) Print("page6(0) is address 1536: ") PrintBE(page6(0)) background=148 ; the same as Poke(710, 148) Print("Address 710 holds ") PrintBE(Peek(710)) RETURN