Mike Chambers
Veteran Member
- Joined
- Sep 2, 2006
- Messages
- 2,621
i don't know if there are any QB experts here, but i'm trying figure out a way to modify where QB thinks it stores a variable. as in, i want to arbitrarily modify it's pointer value in QB's segment of memory.
afaik, there is no command built in to do this. if anybody does know something, please let me know! other than that, i'm thinking the only way to do it is dimension a string like so:
DIM thearray(1 TO 320, 1 TO 200) AS STRING * 1
then i am thinking i could get the VARSEG and VARPTR values of that array's start byte in RAM... then, perhaps i could implement a little trick such as scan QB's memory segment for those values as 2-byte words. once i have that location i could hopefully change it to A000:0000
you probably guessed this already, but what i'm trying to do here is start the 320x200 array at the beginning of the VGA graphics memory and use 320x200x8bpp video mode. i imagine it would be a lot faster than using PSET to draw stuff. like i could say:
thearray(1, 1) = 15
then the very top left pixel would have a value of color 15. anybody have some advice on this? am i going about it the right way? if you know of any magical built-in command for QB to do something like this, let me know.
afaik, there is no command built in to do this. if anybody does know something, please let me know! other than that, i'm thinking the only way to do it is dimension a string like so:
DIM thearray(1 TO 320, 1 TO 200) AS STRING * 1
then i am thinking i could get the VARSEG and VARPTR values of that array's start byte in RAM... then, perhaps i could implement a little trick such as scan QB's memory segment for those values as 2-byte words. once i have that location i could hopefully change it to A000:0000
you probably guessed this already, but what i'm trying to do here is start the 320x200 array at the beginning of the VGA graphics memory and use 320x200x8bpp video mode. i imagine it would be a lot faster than using PSET to draw stuff. like i could say:
thearray(1, 1) = 15
then the very top left pixel would have a value of color 15. anybody have some advice on this? am i going about it the right way? if you know of any magical built-in command for QB to do something like this, let me know.