Hello,
Yesterday I started a post about variables and memory locations.
Me, being of quick wit, deleted it!
Tom Hanlin was saying: (before I rudely killed the message)
PutMailBox(TransferArray(),DestSeg,DestOff,Length)
def seg = varseg(DestSeg)
for i=0 to Length
poke DestOff+i*2,TransferArray(i) and 255
poke DestOff+i*2+1,TransferArray(i)\256 and 255
next i
end sub
GetToArrayI(TransferArray(),Source,Length)
def seg = varseg(Source)
v=varptr(Source)
for i=0 to Length
TransferArray(i)=peek(v+i*2)+peek(v+i*2+1) *256
next i
end sub
This was for unsigned integers and Intel byte ordering.
1. The user will key in a value, say 40000
2. The data entered needs to be stored in a specific memory location.
3. When the data is pulled from memory location it needs to be 40000.
I need to be able to both signed/unsigned double percission values.
Is there something that I can do to the above code to allow
me to use what I need?
I am not sure the client is asking for a specific memory segment
or not. I do know that he is asking for specific offsets to
store the data in.
If this does not work for him he is going to check with his
motor controller manufacturer's and see if he is limited to Qb
or if he can yes PB (Yeah!).
Thanks for your support.
Noble
------------------
Noble D. Bell - Owner
Noble Software Publishing
http://www.noblesoftware.com
Yesterday I started a post about variables and memory locations.
Me, being of quick wit, deleted it!
Tom Hanlin was saying: (before I rudely killed the message)
PutMailBox(TransferArray(),DestSeg,DestOff,Length)
def seg = varseg(DestSeg)
for i=0 to Length
poke DestOff+i*2,TransferArray(i) and 255
poke DestOff+i*2+1,TransferArray(i)\256 and 255
next i
end sub
GetToArrayI(TransferArray(),Source,Length)
def seg = varseg(Source)
v=varptr(Source)
for i=0 to Length
TransferArray(i)=peek(v+i*2)+peek(v+i*2+1) *256
next i
end sub
This was for unsigned integers and Intel byte ordering.
1. The user will key in a value, say 40000
2. The data entered needs to be stored in a specific memory location.
3. When the data is pulled from memory location it needs to be 40000.
I need to be able to both signed/unsigned double percission values.
Is there something that I can do to the above code to allow
me to use what I need?
I am not sure the client is asking for a specific memory segment
or not. I do know that he is asking for specific offsets to
store the data in.
If this does not work for him he is going to check with his
motor controller manufacturer's and see if he is limited to Qb
or if he can yes PB (Yeah!).
Thanks for your support.
Noble
------------------
Noble D. Bell - Owner
Noble Software Publishing
http://www.noblesoftware.com
Comment