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
Virtual Variables do NOT require indirect access.
Virtual Variables do NOT require indirect access.
TomC
DM42:00068/03961, DM41X:
DM42:00068/03961, DM41X:
-
- Posts: 328
- Joined: Wed May 24, 2017 10:44 pm
- Location: Vancouver Canada
- Contact:
Re: Virtual Variables do NOT require indirect access.
Hi TomC
Not being ignored but I too must have missed the missive!
Geoff
Not being ignored but I too must have missed the missive!
Geoff
Re: Virtual Variables do NOT require indirect access.
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
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
TomC
DM42:00068/03961, DM41X:
DM42:00068/03961, DM41X:
-
- Posts: 564
- Joined: Mon Apr 24, 2017 8:38 pm
Re: Virtual Variables do NOT require indirect access.
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.
Unless I'm remembering wrong.
Re: Virtual Variables do NOT require indirect access.
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.
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.
There are only 10 kinds of people in the world: those who understand binary and those who do not.
Re: Virtual Variables do NOT require indirect access.
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.
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.
There are only 10 kinds of people in the world: those who understand binary and those who do not.