I want from address 4096 to address 4602 from vic20
how can you set a pointer that addresses all 506 addresses??? i want to control the addresses with the taste A/S/D/W.
I can't get any further than 255.
but there are 506 addresses.
how does that work with trse?
greeting
Code: Select all
program schiebechar;
var
charset : array[16] of byte = ( 24,24,60,126,255,24,36,66);
a,b,f,x,y,p : byte;
zpcharz: pointer;
zpscr: pointer;
zpcol: pointer;
procedure warte(t : byte);
begin
for a:=0 to 50 do
begin
wait(100);
end;
end;
begin
ClearScreen(white, screen_col_loc);
zpcharz:=5120;
zpscr:=4096;
zpcol:=37888;
poke(^37139,0,0);
poke(^37154,0,127);
poke(^36869,0,205);
zpcharz:=5120;
for b:=0 to 8 do
begin
zpcharz[b]:=charset[b];
end;
x:=11;
y:=5;
p:=y*22+x;
f:=5;
zpscr[p]:=0;
zpcol[p]:=f;
while (true) do
begin
waitforraster(0);
if peek(^197,0)= 18 then
begin
warte(10);
x:=x+1;
if (x>21) then x:=21;
p:=y*22+x;
zpscr[p]:=0;
zpcol[p]:=f;
zpscr[p-1]:=128;
end;
if peek(^197,0)= 17 then
begin
warte(10);
x:=x-1;
if (x=255) then x:=0;
p:=y*22+x;
zpscr[p]:=0;
zpcol[p]:=f;
zpscr[p+1]:=128;
end;
if peek(^197,0)= 41 then
begin
warte(10);
y:=y+1;
if (y>10) then y:=10;
p:=y*22+x;
zpscr[p]:=0;
zpcol[p]:=f;
zpscr[p-22]:=128;
end;
if peek(^197,0)= 9 then
begin
warte(10);
y:=y-1;
if (y=255) then y:=0;
p:=y*22+x;
zpscr[p]:=0;
zpcol[p]:=f;
zpscr[p+22]:=128;
end;
if peek(^197,0)= 10 then
begin
warte(10);
f:=f+1;
if (f>7) then f:=7;
zpcol[p]:=f;
end;
if peek(^197,0)= 42 then
begin
warte(10);
f:=f-1;
if (f=255) then f:=0;
zpcol[p]:=f;
end;
end;
end.