I've made this simple little program using a pointer to simulate and see what happen, but it don't work like I think it should be. There is surely something I don't understand with pointer, and I didn't found any example.
Code: Select all
program Pointer
Dim MyArray As Word[5] ' Simple 5 elements array for testing
Dim MyPointer As ^Word ' Pointer declaration
Dim MyData As Word ' Used to store the array elements
Dim MyCount As Word ' Loop counter
MyArray[0] = $0001 ' Initial known content of the array
MyArray[1] = $0010
MyArray[2] = $0100
MyArray[3] = $1000
MyArray[4] = $1111
MyPointer = @MyArray ' Pointer hold the address of the array
For MyCount = 0 To 4 ' Repeat 5 times
MyData = MyPointer^ ' Content of pointer in MyData
Inc (MyPointer) ' Increment pointer value
Next MyCount
End.
Thank you.