Re: Elementary BASIC question - loading another file




"Leif Bloomquist" <spam@xxxxxxxxxxxx> wrote in message
news:11h6sats736j96d@xxxxxxxxxxxxxxxxxxxxx
>
>
> I'm writing a BASIC program and want to use a custom character set. The
> character set is nominally located at $3000 (12288 decimal) which is smack
> in the middle of the BASIC area on the 64 but still leaves lots of room
for
> my program and variables. I also want to load it in from disk as that
will
> be much faster than DATA statements (especially on an IDE64, the intended
> platform).

You have to re-set the VIC-II chip to look at your new character set in any
case, right? So you could put that character set on pretty much any 2K
boundary - including under the BASIC or Kernel ROMs, I believe. Then you
wouldn't have to mess with changing the top of BASIC RAM.

> So, when loading in some binary data in BASIC, it's usual practice to do
> this, because the BASIC program restarts.
>
> 10 IF A=0 THEN A=1:LOAD"FILE",8,1
>
> It is also usual practice to protect parts of memory from BASIC by
lowering
> the "top of data", i.e.
>
> 10 POKE 55,0: POKE 56,48:CLR
>
> However - these two aren't compatible! Simply because the CLR statement
> will wipe out the value of A.
>
> Several of the suggestions offered previously involved SYS's to kernal
> routines to load the file, but I couldn't get them to work. As a
workaround
> I suppose I could POKE a flag somewhere in memory unaffected by BASIC
> instead of using a variable.
>

Hmm. One possible flag might be the value found in location 56:

10 IF PEEK(56)<>48 THEN POKE55,0: POKE56,48:CLR:LOAD"FILE",8,1

- Anton Treuenfels


.



Relevant Pages

  • Re: Elementary BASIC question - loading another file
    ... I'm writing a BASIC program and want to use a custom character set. ... routines to load the file, but I couldn't get them to work. ... I suppose I could POKE a flag somewhere in memory unaffected by BASIC ...
    (comp.sys.cbm)
  • Re: GSE Dual CharGen Adapter
    ... > can modify present sets, but if none can be found, ... Once you have a new character set ... and write out the new character ROM. ... I will try to dig up the BASIC program this ...
    (comp.sys.apple2.marketplace)