Page 1 of 1

TRSE : pointer not function.

Posted: Thu Dec 19, 2019 2:25 am
by funkheld
hello, good day.

the pointer so not funktion???

zpscr : pointer ;
zpcol : pointer;
........
..........
if peek(^197,0)= 17 then
begin
warte(10);
x:=x-1;
if (x=255) then x:=0;
zpscr:=4096+(y*22+x);
zpcol:=4096+(y*22+x);
zpscr[0]:=0;
zpcol[0]:=f;
end;
.........
........


thanks
greeting

Re: TRSE : pointer not function.

Posted: Thu Dec 19, 2019 2:41 pm
by AndyH
Shouldn't x be in range from 0 to 21 from your calculation?

For example, this works for me:

Code: Select all

	p1:= 4096+(y*22+x);
	x:=x+1;
	if (x>21) then x:=0;
	p1[0] := 1;

Re: TRSE : pointer not function.

Posted: Thu Dec 19, 2019 2:43 pm
by AndyH
Although I should add, I use AddressTable to get the Y address to avoid heavy calculations such as multiplication and then can do:

p1[ x ] := 1;

Re: TRSE : pointer not function.

Posted: Fri Dec 20, 2019 2:05 am
by funkheld
hello thanks.

greeting