[Coco] VARPTR not what expected.
    coco at jechar.ca 
    coco at jechar.ca
       
    Sun Jul  3 18:21:29 EDT 2022
    
    
  
Thanks sort of worked.
It did not work for Array Element XP$(1) but If I give up the idea of 
using arrays
and just use regular strings like XP$ instead the method you present 
works great.
Charlie
On 2022-07-03 16:05, Allen Huffman via Coco wrote:
>> On Jul 3, 2022, at 2:54 PM, coco--- via Coco <coco at maltedmedia.com> 
>> wrote:
>> 
>> I Wrote the following program to try to understand how the VARPTR in 
>> Color Computer 3
>> Disk Extended Color Basic 2.1 works.
> 
> 
> VARPTR returns the address of the 5-bytes of data that represent a
> variable. If it’s a number, it’s the number itself. If it’s a string,
> that 5 bytes then points to where the string data is.
> 
> Bytes 3 and 4 give you the address of the string data.
> 
> I dove in to it in part 3 of my writeup of interfacing BASIC and 
> assembly:
> 
> https://subethasoftware.com/2017/02/07/interfacing-assembly-with-basic-via-defusr-part-3/
> <https://subethasoftware.com/2017/02/07/interfacing-assembly-with-basic-via-defusr-part-3/>
> 
> --
> Allen Huffman - PO Box 7634 - Urbandale IA 50323 - 515-999-0227 
> (vmail/TXT only)
> http://www.subethasoftware.com - 
> https://www.facebook.com/subethasoftware
    
    
More information about the Coco
mailing list