CPCWiki forum

General Category => Programming => Topic started by: SRS on 22:40, 12 January 17

Title: Speed Poke ?
Post by: SRS on 22:40, 12 January 17
Hi,

I remember a "speed poke" which made calculating loops i.e. about 20% faster in BASIC, for the price of ... dunno -

no interrupts ?
No screen refresh ?

Can't find it but it was really usefull those days ...
Title: Re: Speed Poke ?
Post by: HAL6128 on 08:19, 13 January 17
Hi, there's an article in the Amstrad International Issue 1988/1 about tuning BASIC by deactivating interrupts. Just quickly saw the headline, but I didn't read it...., maybe.
Title: Re: Speed Poke ?
Post by: AMSDOS on 10:16, 13 January 17
The two threads that spring to mind is my "16bit Poke in [whatever Language you prefer] ! :) (http://www.cpcwiki.eu/forum/programming/16bit-poke-in-(whatever-language-you-prefer)!-)/msg11691/#msg11691)", but a while ago I was asking about some routines to POKE a series of values and I got a set of RSX routines, one to handle bytes and the other for 16bit numbers which is here (http://www.cpcwiki.eu/forum/programming/poking-values-through-an-rsx-to-somewhere-in-memory/msg60175/#msg60175).
Title: Re: Speed Poke ?
Post by: SRS on 00:57, 05 November 21
I found it, I found it :)
Clearing up my place there was a hardcopy of the "3D-Apfelmaennchen" which uses it ...
It's "POKE &B939,&c9" for activating and "POKE &b939,&F3" for deactivating on CPC464
and "&B941" for 664/6128.
Also see: https://cpcrulez.fr/applications_graphic-3d-apfelmannchen-schneider_magazin.htm (https://cpcrulez.fr/applications_graphic-3d-apfelmannchen-schneider_magazin.htm)


Title: Re: Speed Poke ?
Post by: eto on 01:38, 05 November 21
Interesting ....
Having a quick look at it, I would say it's deactivating the 300Hz interrupt. Keyboard press is no longer recognized and the timer doesn't count any more.


So this does not make the loop faster but frees up the resources usually consumed during interrupt. I tested it with a stop watch (as TIME didn't work anymore) and the program got about 10% faster.


Fine for such a calculation but might be problematic if you need user input ;-)
Powered by SMFPacks Menu Editor Mod