Byte ptr export/import?

BlitzMax Forums/BlitzMax Programming/Byte ptr export/import?

Sub_Zero(Posted 2011) [#1]
Hi

I want to do something like this:

program 1:
mem = memalloc(65535)
mem[0] = 252
pointer = int(mem)
writetext(pointer, "out.txt")


program 2:
mem:Byte Ptr = int(loadtext("out.txt")

' do stuff with mem


Any ideas?

Last edited 2011


Jesse(Posted 2011) [#2]
You can do it with a bank. Check out "CreateBank","LoadBank","BankBuf", and "BankSize".

Last edited 2011


ImaginaryHuman(Posted 2011) [#3]
Just convert the byte ptr to an integer and back again


Sub_Zero(Posted 2011) [#4]
yes but how do i convert the integer to a byte ptr?


ImaginaryHuman(Posted 2011) [#5]
byte ptr(myinteger)