2021-11-27 22:52:47 +00:00
|
|
|
%import textio
|
2021-12-03 23:07:21 +00:00
|
|
|
%zeropage basicsafe
|
2021-12-04 14:27:54 +00:00
|
|
|
%option no_sysinit
|
2021-10-27 21:48:02 +00:00
|
|
|
|
2021-10-30 13:15:11 +00:00
|
|
|
main {
|
2021-11-09 23:17:56 +00:00
|
|
|
sub start() {
|
2021-12-04 14:27:54 +00:00
|
|
|
ubyte num_banks = cx16.numbanks()
|
|
|
|
txt.print("number of ram banks ")
|
|
|
|
txt.print_ub(num_banks)
|
|
|
|
txt.print(" = ")
|
|
|
|
txt.print_uw($0008*num_banks)
|
|
|
|
txt.print("kb\n")
|
|
|
|
print_banks()
|
|
|
|
cx16.rambank(55)
|
|
|
|
cx16.rombank(3)
|
|
|
|
print_banks()
|
|
|
|
}
|
2021-12-01 21:26:36 +00:00
|
|
|
|
2021-12-04 14:27:54 +00:00
|
|
|
sub print_banks() {
|
|
|
|
ubyte rambank = cx16.getrambank()
|
|
|
|
ubyte rombank = cx16.getrombank()
|
|
|
|
cx16.rombank(0) ; enable kernal
|
|
|
|
txt.print("ram bank ")
|
|
|
|
txt.print_ub(rambank)
|
2021-12-04 03:43:58 +00:00
|
|
|
txt.nl()
|
2021-12-04 14:27:54 +00:00
|
|
|
txt.print("rom bank ")
|
|
|
|
txt.print_ub(rombank)
|
2021-12-03 23:07:21 +00:00
|
|
|
txt.nl()
|
2021-12-04 14:27:54 +00:00
|
|
|
cx16.rombank(rombank)
|
2021-11-16 22:52:30 +00:00
|
|
|
}
|
2021-05-12 22:35:22 +00:00
|
|
|
}
|