Author Topic: Finding / listing programs  (Read 22798 times)

0 Members and 1 Guest are viewing this topic.

Offline calc84maniac

  • eZ80 Guru
  • Coder Of Tomorrow
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2912
  • Rating: +471/-17
    • View Profile
    • TI-Boy CE
Re: Finding / listing programs
« Reply #30 on: September 30, 2010, 12:41:19 am »
A few things I noticed:

:.Get Next Entry
:.Returns 1 if End of Vat or 0 otherwise

:Lbl VX
:P-{P-6}-6->P>={E982E}r
:Return

Should this be <=? (I actually think a simple = might suffice though)

Quote
:.Get Pointer to current entry data
:Lbl VD
:{P-4}r
:Return

I think this should be {P-4}rr, since it is stored backwards.

Quote
:.Get Pointer to current name length
:Lbl VNL
:{P-6}
:Return

This actually returns the length itself, not the pointer.
"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Finding / listing programs
« Reply #31 on: September 30, 2010, 12:56:15 am »
An example would be good. This could definitively become useful :)

Offline Broseph Radson

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 295
  • Rating: +20/-1
  • Its 0x1A4 somewhere
    • View Profile
Re: Finding / listing programs
« Reply #32 on: September 30, 2010, 09:01:29 am »
Awesome thanks Quigibo! This works perfectly. I just tested it and had no errors :)
 EDIT: This is what i did:

Code: [Select]
:sub(VI)
:
:Lbl L
:If sub(VT)=5
:  For(A,1,sub(VNL))
:    Disp {sub(VN)-A+1}>Char
:  End
:  Disp i
:End
:If sub(VNX)
:  Goto L
:End
:Return
:
:Lbl VI
:{E9830}r->P
:Return
:
:Lbl VNX
:P-{P-6}-7->P>={E982E}r
:Return
:
:Lbl VT
:{P}
:Return
:
:Lbl VD
:{P-4}rr
:Return
:
:Lbl VA
:{P-5}
:Return
:
:Lbl VNL
:{P-6}
:Return
:
:Lbl VN
:P-7
:Return

And it worked perfectly.

Also, since when is the 2nd+8 key "appv?" Has it always been the appvar key?
I just noticed this lol

EDIT2: Ok thats cool. It only does "appv" if you have an Axe header :D
« Last Edit: September 30, 2010, 09:11:00 am by Broseph Radson »

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Finding / listing programs
« Reply #33 on: September 30, 2010, 09:16:26 am »
Yeah that "v" token was changed to "appv" because there is already another lowercase "v" token available when lowercases are enabled. I wonder why TI used two different tokens for the exact same symbol x.x.

The new token names were implemented in version 0.3.0 I think. I was not a big fan of them at first because I thought QUigibo would just plain rename every existing commands, confusing those who have been used to the old syntax for a while, but finally only 3 or 4 old commands were renamed and all new tokens names added later were used only for new Axe commands/symbols/modifiers, so for now, the only issue I had was finding some in the CATALOG menu because they no longer show in alphabetical order.
« Last Edit: September 30, 2010, 09:19:01 am by DJ Omnimaga »

Offline Broseph Radson

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 295
  • Rating: +20/-1
  • Its 0x1A4 somewhere
    • View Profile
Re: Finding / listing programs
« Reply #34 on: September 30, 2010, 09:17:49 am »
Yeah i also noticed that with an Axe header, the lowercase "u" token is "var" and the lowercase "w" token is "grp"

Ossim!

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Finding / listing programs
« Reply #35 on: September 30, 2010, 09:32:20 am »
Yeah those were changed a bit later. It is mostly for readability, as using w for group prefixes for example would confuse people and make it hard to remember the syntax. In fact, weird syntax and cryptic names are something that turns me off from z80 assembly source x.x

Offline Broseph Radson

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 295
  • Rating: +20/-1
  • Its 0x1A4 somewhere
    • View Profile
Re: Finding / listing programs
« Reply #36 on: September 30, 2010, 09:34:50 am »
Well that is pretty darn cool

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Finding / listing programs
« Reply #37 on: September 30, 2010, 05:18:09 pm »
Yeah. At first I did not realize this could be possible, but then I remembered the Français APP that translated all calc menus in French. For brand new commands, since whenever there's an Axe header at the top of the program the new tokens are enabled, it makes code much easier to read. RectI() looks MUCH more like a rectangle drawing command than rref(), for example.

SirCmpwn

  • Guest
Re: Finding / listing programs
« Reply #38 on: September 30, 2010, 05:18:55 pm »
Nice, Quigibo!

Offline ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: Finding / listing programs
« Reply #39 on: September 30, 2010, 07:13:02 pm »
Nice job! ;D
I can't wait for that example. :)

Offline Quigibo

  • The Executioner
  • CoT Emeritus
  • LV11 Super Veteran (Next: 3000)
  • *
  • Posts: 2031
  • Rating: +1075/-24
  • I wish real life had a "Save" and "Load" button...
    • View Profile
Re: Finding / listing programs
« Reply #40 on: September 30, 2010, 10:35:41 pm »
The example was already edited in :)
___Axe_Parser___
Today the calculator, tomorrow the world!

Offline ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: Finding / listing programs
« Reply #41 on: October 01, 2010, 05:48:51 pm »
Ah, I see. :) * ZTrumpet feeds himself to the lobster

The example looks cool. :D  Thanks.

Offline nemo

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1203
  • Rating: +95/-11
    • View Profile
Re: Finding / listing programs
« Reply #42 on: October 06, 2010, 07:06:53 pm »
i have a question with quigibo's routine. how do you retrieve the length of the data of a vat entry? subtracting two pointers to the vat entries themselves doesn't work, and neither does subtracting the pointers to their data. suggestions?


Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Finding / listing programs
« Reply #43 on: October 06, 2010, 07:13:17 pm »
The "pointer to the data" in the VAT entry actually points to the two bytes containing the size of the data. Just store that as a two-byte number.




Offline nemo

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1203
  • Rating: +95/-11
    • View Profile
Re: Finding / listing programs
« Reply #44 on: October 07, 2010, 07:49:17 pm »
another question: is there any way to allocate more room for a variable you have accessed? so if i wanted to add a line onto a program, could i do it in axe by simply changing the size bytes of the variable in the VAT?