| |
Moloch
Registered: Jan 2002 Posts: 2929 |
Release id #178956 : Plant
Submitted by Compyx [PM] on 23 June 2019
Probably this (from Lemon64 of all places):
There is an even better way to do it - let's abuse the DIM-command!!
Since DIM normally clears an array, why not use it for clearing a bitmap as well?
Try this:
POKE 88,0:POKE 89,63:POKE 113,64:POKE 114,31:POKE 12,1:SYS 45760
This will fill memory from 8192-16191 ($2000-$3F3F) will nullbytes.
- Catboy
Fucking BASIC weirdos :)
User Comment
Submitted by Oswald [PM] on 22 June 2019
IIRC you can clear memory faster with declaring a large array :)
User Comment
Submitted by Oswald [PM] on 22 June 2019
80 mem=8192+int(v/8)*320+int(u/8)*8+(vand7):pokemem,peek(mem)or2^(7-(uand7))
lol :D |
|
... 10 posts hidden. Click here to view all posts.... |
| |
ChristopherJam
Registered: Aug 2004 Posts: 1409 |
Rudi - you need 504 ($01f8) to support X values greater than 255
That said, -8 also works to clear the low three bits, and a quick test shows it's considerably faster! I guess it avoids a couple of multiply-by-10s in the parser.
I just compared a=ti:fori=1to1000:j=iand-8:next:?ti-a to a=ti:fori=1to1000:j=iand504:next:?ti-a
The latter is around 420 ticks, compared to 320 for the former. |
| |
Rudi
Registered: May 2010 Posts: 126 |
ok neat |
| |
bugjam
Registered: Apr 2003 Posts: 2594 |
*waitingfornewversion* :-) |
| |
Rudi
Registered: May 2010 Posts: 126 |
bugjam: ChristopherJam is the Master of size and speed optimizing Basic programs so let him do it :) I can come up with wrong ideas that will lead to some lesser ticks perhaps, but. |
| |
bugjam
Registered: Apr 2003 Posts: 2594 |
Don't be too modest, you triggered the whole thing, which is an achievement as well. :-) |
| |
Rudi
Registered: May 2010 Posts: 126 |
Thanks bugjam. |
Previous - 1 | 2 - Next |