[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Apple and the Holy War
In article <20000506192421.16108.00001856@ng-fh1.aol.com>,
Regnirps <regnirps@aol.com> wrote:
> pausch@saafNOSPAM.se (Paul Schlyter) wrote:
>
>> 3. Use table-lookup whenever feasible. Computations of e.g.
>> trigonometric function at low precision can be greatly speeded up
>> by using table lookup and perhaps linear interpolation between
>> two table values.
>
> I did a pile of 6502 enhancement tricks back when the Apple IIe first
> came out. I made ROMs to do things like "instant multiply" of two
> bytes where the two bytes form the address of the result in two ROMs,
> a MSB and LSB. So a multiply was basically write write read read
> (or STA STX LDA LDX) in zero page since I mapped the 4 addresses
> in ZP. What is that? 8 cycles?
Not quite ... only the implied and immediate addressing mode instructions
did execute in 2 cycles. As soon as you did read or write a memory
address, the minimum cycle count went up to 3.
Also, you should add in the cycles to do the back switching. Yes,
you are here talking about a ROM memory space of 128K, on a CPU which
has an address space of only 64K.
The total cycle count could easily rise to 30 or so. Which still is
fast for a multiply on the 6502 though.
In that particular case it would have been advantageous to use the
6802 instead, since that CPU did have an 8-bit multiply instruction.
It had two accumulators, A and B, and the instruction MUL did multiply
A by B, storing the 16-bit result in A+B.
> I did some other lookup tricks and added an AMD9511 FP processor that also
> did 16 and 32 bit integer math.
>
> The finale experiment was some logic and 16 bit registers mapped to ZP
> that did most of the Forth inner unterpreter in hardware. It was useful
> for other things since it included ZPage 16 pointers with autoincrement
> by 1 or 2 when they were accesed through appropriate addresses. I was
> after every little bit of extra speed back then especially for the Forth
> since it alowed pretty big programs in small memory.
Well, you sure needed that after having used up 128K of your 64K
memory space!!! :-)))
--
----------------------------------------------------------------
Paul Schlyter, Swedish Amateur Astronomer's Society (SAAF)
Grev Turegatan 40, S-114 38 Stockholm, SWEDEN
e-mail: pausch at saaf dot se or paul.schlyter at ausys dot se
WWW: http://hotel04.ausys.se/pausch http://welcome.to/pausch