The print position address is found at PEEK 16389 + 256 * PEEK 16399.
If the program area is empty then this address = 16510.
If this address is POKEd with a character code then the referenced character will be displayed at position 0,0.
To print a line, POKE this address with the code in increments of 1 to a maximum of 31.
The 33rd print position must hold code 118 page number.
PEEK 16441 for the X value and PEEK 16442 for the Y value to find the current print position.
To find the PLOT co-ordinates:
PEEK 16438 for X
PEEK 16439 for Y
To calculate the address of the screen the starting addres can be called X. For the sake of argument we will call the starting point 0,0.
Each additional point will equal X + 1. The maximum value to be added = 31. Each additional line is 33 bytes from the previous line. An example is:
Let X = 16510, therefore line 1 would end at 16541 and line 2 would start at 16543. 16510 is the equivalent address as the print at 0,0.
If a loop is used to fill the screen with digits then the loop must have a counter to maintain the correct parameters of the print position.
THE SCREEN ADDRESS VALUES
0,0 0,31 1,33 1,64 2,66 2,97 3,99 3,130 4,132 4,163 5,165 5,196 6,198 6,229 7,231 7,262 8,264 8,295 9,297 9,328 10,330 10,361 11,363 11,394 12,396 12,427 13,429 13,460 14,462 14,493 15,495 15,526 16,528 16,559 17,561 17,592 18,594 18,625 19,627 19,658