[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Two friendly questions to Apple II users...
Fabrice Frances <frances@ensica.fr> wrote:
> > From : Bryan Dunphy <bdunphy@cityscape.net>
> > 3) Half-right. Only the first two chars are significant is correct;
> > however, var name were limited to 123 chars if you wanted to do
> > anything with them by the 127 byte input buffer.
>
> Ok, let's say I was right, there are always limits 8-)
Bryan got the limit wrong - the line input buffer holds 255 characters,
but the practical limit is slightly less than this.
> > From : David Empson <dempson@actrix.gen.nz>
> > 4) Well, there are ten unused bytes immediately after the lookup table
> > which is used to calculate SIN (TAN is done by calculating SIN and COS
> > then dividing).
>
> Oups, sorry, I didn't have the listing at hand. The polynomial
> coefficients
> are indeed those of SIN, and they come after the TAN routine (and 3
> floating
> values: PI/2, 2*PI and PI/4). Same for you ?-)
Exactly the same. The SIN table contains a single byte (5) indicating
the array index to the last value (multiply by 5 to get the actual
offset in bytes). The values in the SIN table are apparently:
(2pi)^11/11!
(2pi)^9/9!
(2pi)^7/7!
(2pi)^5/5!
(2pi)^3/3!
(2pi)
> > In order the bytes are:
> >
> > A6 D3 C1 C8 D4 C8 D5 C4 CE CA
> >
> > Exclusive-OR each byte with 87, and you get:
> > 21 54 46 4F 53 4F 52 43 49 4D
> >
> > Converting to ASCII:
> > !TFOSORCIM
> >
> > :-)
> >
> > The XOR was an educated guess, from looking at the first byte! I have
> > no idea why 87 was picked as the mask.
>
> Excellent ! Was this known in this newsgroup ?
I have never seen it mentioned, though I haven't been here for the
entire lifetime of this newsgroup.
(In case anyone wants to look at the values themself, the SIN table
starts at $F075 and the encoded MICROSOFT! signature bytes are at
$F094.)
> With Oric Basic, this signature seems to mark the end of the Microsoft
> code,
> then we have the routines written by the Tangerine guys (tape routines,
> graphic routines, etc). I guess it's the same scheme with Applesoft
> Basic ?
Possibly, but it isn't such a clear distinction. Is ATN part of the
standard Microsoft code?
After the signature bytes are the following:
- the ATN (arctan) routine
- a table used to calculate ATN
- the master copy of the CHRGET routine, which is copied into zero page
- cold start code for Applesoft (Ctrl-B entry from monitor)
- CALL, IN# and PR# handlers
- Lores graphics routines
- VTAB, SPEED, TRACE, NOTRACE, NORMAL, INVERSE, FLASH, HIMEM:, LOMEM:,
ONERR, RESUME, DEL, TEXT
- Tape routines (replaced by double lo-res support on IIc and IIgs)
- Hires graphics routines
> Also, can you tell me if Apple went further than a first release of this
> Basic ?
There are many versions of Applesoft. The very first one was loaded
from cassette tape on an original Apple ][ (with Integer BASIC in ROM).
It ran in low memory, and got in the way of the graphics screens, so
some features were not available.
The next version was provided in ROM on a plug-in card. I believe this
is identical to the version which is included on the motherboard in the
][+ and original IIe.
In the Apple IIc, the tape routines were removed and replaced with
double lo-res graphics support. The command parser also accepts
lower-case commands.
In the enhanced IIe, Apple added support for lower case, but didn't
touch the tape routines.
The IIgs version is similar to the IIc one, but has a few more patches
(I don't recall the exact details, but I remember noticing that it
borrowed some code space in the monitor area).
All versions are identical for all the fundamental BASIC code - no
changed entry points, all bugs preserved, no new reserved words or
similar features.
--
David Empson
dempson@actrix.gen.nz
Snail mail: P.O. Box 27-103, Wellington, New Zealand