How about this for a starter:
10 N=6
20 K=1024
30 V=42
40 POKE N*K,V
50 Z=PEEK(N*K)
60 GOTO 40
This will write to (and read from) address 6K (6*1024 = 6144).
The value written is held in V. The memory address is in N.
Change the values N and/or V as required.
If you want a variable address you could modify the code as follows:
10 N=6
20 K=1024
30 V=42
40 L=16
50 FOR I=0 TO L
60 POKE (N*K)+I,V
70 Z=PEEK((N*K)+I)
80 NEXT I
90 GOTO 50
In this case, N = the Kilobyte boundary; V = the value to write into the memory and L = the number of bytes to modify from the specified Kilobyte boundary.
Of course, there are many variants of this code, for example:
10 S=6
20 F=7
30 V=42
40 K=1024
50 FOR I=S TO F
60 POKE (I*K),V
70 Z=PEEK(I*K)
80 NEXT I
90 GOTO 50
This code will test memory addresses from S to F (at every 1024 byte boundary). The block start is defined by S and finishes at F. In this case address 6K (6*1024 = 6144) and address 7K (7*1024 = 7168) will be tested.
Dave