A little example of using pointers and memcpy to speed up screen updates.
#Include "fbgfx.bi"
#Include "crt.bi"
#Define sw 640
#Define sh 480
ScreenRes sw, sh, 32
Dim buffer As UInteger Ptr
buffer = Callocate(sw * sh, SizeOf(UInteger))
For y As Integer = 0 To sh - 1
For x As Integer = 0 To sw - 1
'Write to buffer.
buffer[y * sw + x] = RGB(0, 255, 0)
Next
Next
'Copy buffer to screen.
ScreenLock
memcpy ScreenPtr, buffer, sw*sh*4
ScreenUnLock
Sleep