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

Re: Two friendly questions to Apple II users...



David Empson wrote:
> 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).

Same here... a single $5 byte followed by six coefficients 8-)

> > 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

Sorry, I *do* have the ATN routine and its table after the signature...

> - 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

All this is different, the tape support comes first (derived from the
old Microtan code) and Oric Basic has different graphics routines,
and quite a lot of different Basic words too (I just checked Nathan's
pages about Applesoft...). I guess Microsoft's core consists in
the interpreter itself, the floating point evaluator and all its
routines (including string management and garbage collecting), and the
main control structures (for, if, gosub, etc).
In this minimal core, I only spotted on difference: the ELSE is missing
in Applesoft. It is present in Oric Basic but in v1.0 it was rather
buggy,
and not completely fixed in v1.1. Also Oric Basic is 16KB, isn't
Applesoft 12KB ?

One funny thing would be if some Applesoft floating point routines
don't know the existence of the ROR instruction, when rotating the
mantissa (each "ROR var" being replaced by a sequence of 
      LSR var
      LDA #0
      BCC *+2
      LDA #$80
      ORA var
      STA var
or something like that, I don't have Oric Basic listing here)
Is this the case, or did Apple programmers discover that some
Microsoft guys weren't so familiar with the 6502 ?-)

I'm very interested in trying to figure out if Oric had the sources
or only binaries of this Basic's core... some parts of the v1.0
are patched with NOPs, other parts add 3 or 4 instructions to a
routine by jumping to the end of the rom and then jumping back
to the routine....
Could someone send me an image of Applesoft Basic ?

> All versions are identical for all the fundamental BASIC code - no
> changed entry points, all bugs preserved, no new reserved words or
> similar features.

Alas, either the Oric staff got Microsoft's source between v1.0 and
v1.1,
or they "sourced" the binaries. The result is *all* entry points changed
(thank godness a lot of bugs were fixed, but there still are loads of
them)

Thanks to you, active Apple II users 8-)
-- 
main(){char*s="@_DOONN_@AJQQDQA@AQQQDAA@OQOODAO@A_QEDAA@AQQIDQA@AQOQNN_";int
i,j,m,n,k;for(i=0;i<7;i++)for(j=0;m=j-6+i,j<55-i;j++)putchar(j==54-i?'\n':j<6-
i?32:s[n=i*8+m/6]&(k=1<<m%6)?(i==6||!(s[n+8]&k)?95:32):k/2&&(s[n]&k/2)?47:32);}