[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Hacking on Integer Basic, and ProDOS



In article <pxa9e.417$%L1.398@newssvr30.news.prodigy.com>, 
nospam@nospam.com says...
> Paul,
> > What would happen if one booted Apple DOS on such a machine with your
> > modified Integer Basic in ROM which DOS believed is Applesoft Basic?
> > Would Integer Basic programs be stored on disk with the "A" file type?
> > Probably - and those programs would be impossible to load on a machine
> > with normal Applesoft and/or Integer Basic in ROM: DOS would think the
> > file was an Applesoft program, but to Applesoft the file would contain
> > garbage, since Applesoft is unable to interpret a tokenized Integer
> > Basic program.
>     You have a good theory and I agree.  I have no idea if DOS 3.3 may 
> detect "4C" in $E000 to give "A" or "I".  We should be able to modify DOS 
> 3.3 by adding two or three codes.  First code like "4C" will be renamed to 
> "01".  Second code like "20" will be renamed to "02".  Third code like new 
> version of Integer BASIC will be "03".  All three codes will be detected in 
> zero page.  More codes like Pascal, C, Fortran, or other languages will be 
> used in DOS 3.3 and ProDOS.
>     What do you think?  We need to find other way to onvercome the 
> incompatibility.
> 
> Bryan Parkoff

DOS uses the byte at $E000 to detect whether Applesoft or Integer Basic
is at the ROM addresses.  The "FP" and "INT" commands examines this
byte to see if the desired language already is available - if not,
it attmpts to bank switch and see if the language can be found.  If
it cannot be found, the "LANGUGAGE NOT AVAILABLE" error message is
given.  An equivalent procedure is performed when you LOAD or RUN a
file of type "A" or "I": if the target language is absent at the ROM
addresses, the file cannot be LOADed or RUN.  If a languag switch
is necessary, the new language is coldstarted after having been made
available by bank switching.

The RAM version of Applesoft (FPBASIC) overrides this procedure
somehow -- there you can LOAD and RUN an Applesoft program, despite
the only ROM language available is Integer Basic.  Or perhaps it is
DOS which, if an "A" type program is loaded, first checks for
Applesoft in ROM, and second for FPBASIC having been run, and
only as priority three attempts to bank switch the ROM addresses.

An alternative to make ROM-based Integer Basic appear as Applesoft
on address $E000 would be to try to modify ProDos so that it accepts
Integer Basic in ROM.