I think Jim meant what Stonemonkey said.
Anyway, lots of people have said it here, I'll say it again.
You have outgrown Blitz. It is not capable of the sort of speedy pixel manipulation you need, no matter how you try and do it you need to learn another language.
I wrote two quick comparisons for you, both run in 800 * 600 mode (see attached zip for exes).
FPS is displayed in the console window (you may have to move the display window out of the way).
Firstly, if you were rasterising a solid colour you could use something like this;
' FAST PIXELWISE BLITTING USING SIMPLE RASTERISATION.
'
'---------------------------------------------------------------------------
#DEFINE PTC_WIN
#INCLUDE "TINYPTC.BI"
#INCLUDE "WINDOWS.BI"
OPTION STATIC
OPTION EXPLICIT
CONST XRES = 800
CONST YRES = 600
DIM SHARED AS UINTEGER BUFFER ( XRES * YRES )
DIM SHARED AS INTEGER Y,SLICE,TC,TICKS
DIM SHARED AS UINTEGER PTR PP
DIM SHARED AS DOUBLE GRAB
IF( PTC_OPEN( "SPEED TEST", XRES, YRES ) = 0 ) THEN
END -1
END IF
GRAB=TIMER
WHILE(GETASYNCKEYSTATE(VK_ESCAPE)<>-32767)
FOR Y=0 TO YRES-1
SLICE = XRES
TC = RGB(Y /4 , Y/3 , Y/5 )
PP = @BUFFER(Y*XRES)
asm
mov eax,dword ptr[TC]
mov ecx, [slice]
mov edi, [PP]
rep stosd
end asm
NEXT
PTC_UPDATE@BUFFER(0)
TICKS=TICKS+1
IF TIMER-GRAB>=1 THEN
PRINT "FPS : " + STR(TICKS)
TICKS=0
GRAB=TIMER
END IF
WEND
And to pick pixels out of a work buffer, it can be done as fast as this;
' FAST PIXELWISE BLITTING USING POINTERS.
'
'---------------------------------------------------------------------------
#DEFINE PTC_WIN
#INCLUDE "TINYPTC.BI"
#INCLUDE "WINDOWS.BI"
OPTION STATIC
OPTION EXPLICIT
CONST XRES = 800
CONST YRES = 600
DIM SHARED AS UINTEGER BUFFER ( XRES * YRES )
DIM SHARED AS INTEGER Y,SLICE,TC,TICKS,X
DIM SHARED AS UINTEGER PTR PP
DIM SHARED AS DOUBLE GRAB
IF( PTC_OPEN( "SPEED TEST", XRES, YRES ) = 0 ) THEN
END -1
END IF
GRAB=TIMER
WHILE(GETASYNCKEYSTATE(VK_ESCAPE)<>-32767)
PP=@BUFFER(0)
FOR Y=0 TO YRES * XRES -1
*PP = Y
PP+=1
NEXT
PTC_UPDATE@BUFFER(0)
TICKS=TICKS+1
IF TIMER-GRAB>=1 THEN
PRINT "FPS : " + STR(TICKS)
TICKS=0
GRAB=TIMER
END IF
WEND
Or just invoke memcpy if you want to include crt.bi.
In any case, this is in another variant of Basic, you would find if fairly easy to port your code over and as you'll see from the axamples it runs about 6-8 times faster than Blitz on most computers for pixelwise stuff.
If you are software rendering, you can persist with Blitz but in the end, trust me, you will eventually get pissed off and switch to another language.