OB1
Oct 29th, 2000, 12:42 AM
Is there a way to perform low level memory functions in basic? Is it the peek and poke commands that I saw somewhere?
Koralt
Oct 29th, 2000, 09:22 PM
Use the PEEK function to read a byte from memory, and POKE to set one. To set the Data Segment (DS), use DEF SEG
Example:
DIM I AS LONG, CL AS INTEGER
SCREEN 13 'VGA mode 19: 320x200 256 color
DEF SEG = &HA000 'Point to VGA memory
FOR CL = 1 TO 15
FOR I = 0 TO 63999
POKE I, CL 'Set each pixel ...
NEXT I
NEXT CL
DEF SEG 'Restore the default
Yeah. That should work ...
Paul282
Nov 5th, 2000, 08:54 PM
or get powerbasic and use pointers which are quicker.