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

Re: Apple// CP/M question



"Paul Schlyter" <pausch@saaf.se> wrote in message
news:8uro7t$af0$1@merope.saaf.se...
> > If you can't run CP/M anymore, then the file(s) can be copied to ProDOS
> > using the Chameleon utility (as others have mentioned). I seem to
remember
> > that the layout of an MBASIC file was pretty similar to Applesoft BASIC
(not
> > too surprising, really!),
>
> Unfortunately, that's wrong!  The tokenization of Applesoft programs is
> really simple:
>
> Line number     2-byte binary
> Line length     2-byte binary
> Tokens          1 byte per reserved word or ASCII character
> End-Of-Line     00h
>
> In Applesoft only the reserved words are stored as tokens; everything else
> is stored in plain ASCII.
>
> In MBASIC the tokenization is much more complex.  Reserved words are
stored
> as tokens, as in Applesoft, but other things are tokenized too:
>
> Integers:           <token> + value as 2-byte binary
> Short reals:        <token> + value as 4-byte binary, Microsoft FP format
> Long  reals:        <token> + value as 8-byte binary, Microsoft FP format
> GOTO/GOSUB target:  <token1> + target line as 2-byte binary
>                     <token2> + offset to target line in tokenized program
>
> + some other things I don't remember now.

I told you it was a long time ago!   :-)

I think it was only once or twice that I looked at Microsoft BASIC on the
PC, and I remember it was constructed as you've described above. But for
some reason, I thought that MBASIC on the Apple II used a more
Applesoft-like method (since both were written several years earlier).

But as I keep saying, the memory plays tricks these days.  :-(
--
Peter Watson
-- Write to MSDOS disks on the Apple IIgs?
-- Impossible!  ;-)