|
-
Oct 28th, 2000, 11:42 PM
#1
Thread Starter
Junior Member
Is there a way to perform low level memory functions in basic? Is it the peek and poke commands that I saw somewhere?
May the source be with you
-
Oct 29th, 2000, 09:22 PM
#2
Member
Yes, it is.
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:
Code:
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 ...
-
Nov 3rd, 2000, 07:24 PM
#3
Thread Starter
Junior Member
May the source be with you
-
Nov 5th, 2000, 08:54 PM
#4
Fanatic Member
or get powerbasic and use pointers which are quicker.
Paul Dwyer 
Network Engineer
Aussie In Tokyo
Using Powerbasic 6 & VB6 SP4 (Please also add your VB Version to your signature!)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|