Hi good afternoon.
I would like to exchange data with the bank, please.
set bank:
poke (0,8) = do I have bank 8 for my data with the address $a000 , 8kb ?
...poke($a000,123)....poke($a001,124).......
poke(0,9) = fill bank 9 with data ....poke($a000)....
poke(0,8)....peek($a000).....peek($a001)....my old bank data has been preserved?
Which bank can I still use?
Thanks.
greeting
I would like to exchange data with the bank, please.
Re: I would like to exchange data with the bank, please.
You can use any of the banks from #1 (#0 is reserved for other stuff).
A 512kb system (which is the default) has 64 banks, so #63 is the last bank you can use.
See https://github.com/X16Community/x16-doc ... y%20Map.md for more information.
A 512kb system (which is the default) has 64 banks, so #63 is the last bank you can use.
See https://github.com/X16Community/x16-doc ... y%20Map.md for more information.
- ahenry3068
- Posts: 1146
- Joined: Tue Apr 04, 2023 9:57 pm
Re: I would like to exchange data with the bank, please.
You can use $BF00-BFFF ONLY in Bank 0 for interprocess communication. This area is reserved for this purpose. The rest of Bank 0 should be considered off limits.
Re: I would like to exchange data with the bank, please.
Thanks for the info.
Can I do it as I described above: fill the benches and collect them with poke/peeke etc?
what kind of bank 0/1 is this on vpoke/vpeek?
Thanks.
greeting
Can I do it as I described above: fill the benches and collect them with poke/peeke etc?
what kind of bank 0/1 is this on vpoke/vpeek?
Thanks.
greeting
Re: I would like to exchange data with the bank, please.
Hmm... a misconception on my part.
actually should:
123
124
come out?
Thanks.
greeting
actually should:
123
124
come out?
Thanks.
greeting
- Attachments
-
- bank.jpg (42.98 KiB) Viewed 1213 times
Re: I would like to exchange data with the bank, please.
In BASIC, do not use POKE 0 or POKE 1 to set the bank. Instead, use the BANK command.
https://github.com/X16Community/x16-doc ... IC.md#bank
Since the KERNAL uses bank 0 for its own purposes, you can't count on the bank staying set between statements in BASIC, hence the BANK command, which sets the bank used by the next POKE, PEEK, SYS, or USR statement.
https://github.com/X16Community/x16-doc ... IC.md#bank
Since the KERNAL uses bank 0 for its own purposes, you can't count on the bank staying set between statements in BASIC, hence the BANK command, which sets the bank used by the next POKE, PEEK, SYS, or USR statement.
- ahenry3068
- Posts: 1146
- Joined: Tue Apr 04, 2023 9:57 pm
Re: I would like to exchange data with the bank, please.
At least he's poking 0. I made kind of the same mistake but I was trying to read the ROM font. POKE 1, 6 put me straight to the monitor. .
Re: I would like to exchange data with the bank, please.
hello , thanks.
madpascal is ok.
madpascal is ok.
Code: Select all
uses x16_vera, x16, crt;
var
x: byte;
begin
Poke(0,8);
Poke($a010,77);
Poke(0,9);
Poke($a010,88);
writeln('');
Poke(0,8);
x:=Peek($a010);
writeln(x);
Poke(0,9);
x:=Peek($a010);
writeln(x);
end.
- Attachments
-
- bank1.jpg (35.1 KiB) Viewed 1196 times