<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Thu, 03 Dec 2009 21:25:09 +0100
From   : rick@... (Rick Murray)
Subject: Address of a variable

Phill Harvey-Smith wrote:

> Ok so is there an easy way to get the address of a variable in memory ?
> Specifically in BBC Basic 86 ?

> If it helps in MS basic this is acomplished with VARPTR()

It is VarPtr() (and others) in VB5/6 too, but you need to dig around to 
find this documented as accessing variables by address is a big no-no in 
the VB concept of the world. They had to put it in, however, as some 
stuff (like, uh, bits of the API?) sometimes ask for the address of 
something rather than something itself.

As for BBC Basic 86, there's a lot of documentation on where and how 
variables are stored at:
   http://www.compulink.co.uk/~rrussell/bbcbasic/manual/annexd.html

But, to be honest... I'm not sure BBC BASIC ever had this as the 
indirection operators made fiddling around in memory to be pretty 
simple, like a dirty way to look for an APCS program:
   MyMem%  = &8000
   ChkOSX% = MyMem%!16
{the fifth instruction is always SYS "[X]OS_Exit"}


Best wishes,

Rick.




> 
> Cheers.
> 
> Phill.
> 
> 


-- 
Rick Murray, eeePC901 & ADSL WiFI'd into it, all ETLAs!
BBC B: DNFS, 2 x 5.25" floppies, EPROM prog, Acorn TTX
E01S FileStore, A3000/A5000/RiscPC/various PCs/blahblah...
 >> TO PRIVATE MAIL ME, REMOVE [BBC-Micro] FROM SUBJECT <<
<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>