Page 1 of 1

Virtual Variables do NOT require indirect access.

Posted: Mon Sep 30, 2019 1:33 am
by TomC
Perhaps I've missed details of an update, but I can access GrMod and RefLCD WITHOUT using indirection.

I first did this accidentally, but then verified it!

The current .pdf file [3.14]still shows indirection is required, yet the help file [2018-08-31] on the DM42 does not mention the indirection requirement.

TomC

Re: Virtual Variables do NOT require indirect access.

Posted: Fri Oct 04, 2019 3:13 am
by Geoff Quickfall
Hi TomC

Not being ignored but I too must have missed the missive!

Geoff

Re: Virtual Variables do NOT require indirect access.

Posted: Fri Oct 04, 2019 6:47 pm
by TomC
Geoff:

Awwww....tnx for the special attention!!!

I'm not sure when/if this was announced, but I stumbled into it! Makes the code much simpler/less cumbersome/does not 'waste' any memories!

TomC

Re: Virtual Variables do NOT require indirect access.

Posted: Sat Oct 05, 2019 6:52 am
by keithdalby
I recall seeing the instruction to use indirect access from the start, not bothering and just using names directly, and it working. Always wondered what the fuss about I direct access was about when it always seemed to work for me.

Unless I'm remembering wrong.

Re: Virtual Variables do NOT require indirect access.

Posted: Sun Oct 06, 2019 9:11 am
by grsbanks
Of course direct access is possible. It just uses up a lot more memory and it's harder to enter a program.

STO "RefLCD" uses 8 bytes and takes ages (comparatively) to type because you can't create a real variable "RefLCD" to have it ready in a menu.

STO IND 00 uses 2 bytes and is much easier to type.

It's also much less prone to error if the name of the variable is stored in one location.

Of course, it doesn't make that much sense if you're only going to refer to the virtual variable once in your program. You're not going to save any time or space because you still have to enter the string "RefLCD" and store it in a register.

That's the only reason I used indirect access in programs I've provided. I thought people would realize that.

Re: Virtual Variables do NOT require indirect access.

Posted: Tue Oct 08, 2019 3:20 pm
by Rmollov
grsbanks wrote:
Sun Oct 06, 2019 9:11 am
That's the only reason I used indirect access in programs I've provided. I thought people would realize that.
I don't see anyone suggesting otherwise. As for the memory savings given the size of DM42's memory and typical program size 4 bytes a call is hardly a big deal. Otherwise I agree it's a lot more convenient to use indirect addressing.

Regards,

Re: Virtual Variables do NOT require indirect access.

Posted: Wed Oct 09, 2019 10:54 am
by grsbanks
TomC wrote:
Mon Sep 30, 2019 1:33 am
The current .pdf file [3.14]still shows indirection is required, yet the help file [2018-08-31] on the DM42 does not mention the indirection requirement.
Could you point me to the PDF in question and the part where it says that indirection is required? This is incorrect, as you found out for yourself, and should be corrected.