Date : Tue, 16 Aug 1994 09:35:02 EST
From : Stephen Quan <quan@...>
Subject: Re: Can I get BASIC going without BCD implementation?
Chris Lam writes :
>
> Stephen Quan <quan@...> wrote:
>
> ;I am now converting my C emulator to the assembly version and find
> ;a lot of quirks, but I will summarize in another article.
>
> may i suggest before you do this, that you try to optimize your C
> version as much as you can. my first version crawled along at about
> 30 times slower. but improvements are always possible.
No worries. I am not concerned on the speed problem; I have access to
a DX2-66 which irons out the slowness! :) Anyhow, I keep the C version
so that I can try out ideas quickly before diving into the deep water
with ASM code.
Anyhow, my assembly version now almost equals to my C version in
functionality, I have to work on the undocumented instructions as
well as that indirect bug. I think it's going to be an ugly to
implement the indirect bug.
BTW, my ASM version (with 6845 stubs off and clock disabled) runs
faster than my real beeb using a 386DX-40 as benchmark. I can write
the 256^3 in my emulator and execute it under 44 seconds easily!
Just inserting the 6845 (blank asm subroutine) the speed slows down.
When I have full hardware support I reckon that a 386DX-40 won't be
fast enough.
> are you using a big SWITCH statement? this seems the fastest way. also
> do not use functions as they eat up a lot of time. also can't you
> 'malloc' a 64K region of memory in your C? i hate to say it but GOTOs
> are very useful.
>
> glad to see you're making progress.
Yes, in my C version, I used a plain switch statement. What kills it is
that I have a function for memory reads and writes, that function is also
boggled with if statements (for hardware).
> chris lam,
> aston univ.
> u.k.
--
Stephen Quan (quan@... ), SysAdmin, Analyst/Programmer.
Centre for Spatial Information Studies, University of Tasmania, Hobart.
GPO BOX 252C, Australia, 7001. Local Tel: (002) 202898 Fax: (002) 240282
International Callers use +6102 instead of (002).