Omnimaga

Calculator Community => Major Community Projects => The Axe Parser Project => Topic started by: Siphonic_Sugar on August 12, 2015, 05:23:05 pm

Title: 2 Axe Questions
Post by: Siphonic_Sugar on August 12, 2015, 05:23:05 pm
Okay, so I'm trying to make a program in Axe, (obviously) and I have two questions.

1) Is there a way to use and create matrices using axe? Because I'm still a little fuzzy on the GDB sort of thing. (It would be helpful if someone could also explain that.

2) You know how in the Axe app, it shows all of your programs that you made? Could someone explain how that works because I need it for something and I would like to be able to use it for myself.

Thank you for your time,
SiphonicSugar
Title: Re: 2 Axe Questions
Post by: Sorunome on August 12, 2015, 05:36:48 pm
1st: GDB is a pointer, pointers are just numbers that point somewhere in ram, from there on you have to think of your own data format to store a matrix.

So, for a matrix, you could basically do something like like:
Code: [Select]
:Data(5,5,5,5)→GDB0
:Data(4,5,5,4)
:Data(4,5,5,4)
:Data(3,3,3,3)
(Data( is really the ∆List( token)
That would save it row-by-row. Then then fetch it you can do:
Code: [Select]
{Y*4+X+GDB0}


2nd: axe looks through the VAT, that is the table of the OS where all the variables/programs/appvars are listet, for programs that start with :. and displays those.


[Runer112] Edit: fixed code snippets
Title: Re: 2 Axe Questions
Post by: Siphonic_Sugar on August 12, 2015, 05:49:30 pm
Okay, do you know how to program the VAT thingy?
Title: Re: 2 Axe Questions
Post by: Sorunome on August 12, 2015, 05:51:50 pm
I don't think that is possible with axe alone, I think you'd need some asm for that, to cycle through all the programs. What you can do with axe, though, is, if you already know the name of a program, look into it's content. That is what GetCalc is for.
Title: Re: 2 Axe Questions
Post by: Siphonic_Sugar on August 12, 2015, 05:53:36 pm
Okay, thank you for your help. I'll have to search up GetCalc.
Title: Re: 2 Axe Questions
Post by: Siphonic_Sugar on August 12, 2015, 05:55:52 pm
Oh wait, actually one more thing. How do you use the text( command and have the things that you made with the line( command show up at the same time? Because it will show the lines that it drew, but the text is really hard to read.
Title: Re: 2 Axe Questions
Post by: Hooloovoo on August 12, 2015, 05:59:04 pm
I think there's one of the flags (Fix n) commands which switches the function of Text(
Title: Re: 2 Axe Questions
Post by: Sorunome on August 12, 2015, 06:01:22 pm
Yep, Fix 4 and Fix 5
Code: [Select]
Fix 0 Small size font. Calculator should exit in this mode if changed!
Fix 1 Large size font.
Fix 2 Normal colored font. Calculator should exit in this mode if changed!
Fix 3 Inverted font.
Fix 4 Text is drawn directly to the screen. Calculator should exit in this mode if changed!
Fix 5 Text is drawn to the buffer.
Fix 6 Automatic scrolling on last line of display. Calculator should exit in this mode if changed!
Fix 7 No scrolling on last line of display
Fix 8 Lowercase alpha is turned off.
Fix 9 Lowercase alpha is turned on.

Also, in future please don't double-post but use the "Modify"-Button in the top-right corner of your posts instead ;)
Title: Re: 2 Axe Questions
Post by: Siphonic_Sugar on August 12, 2015, 06:39:31 pm
Well guess what? I can't find anything to explain how to access numbers and stuff in GDBs or how to create custom ones. Could anyone explain that? I know how to store things in the GDB, but how do I access a certain number in it.

Sorry for double-posting.  D:
Title: Re: 2 Axe Questions
Post by: Sorunome on August 12, 2015, 06:46:22 pm
the GDB0 is then a pointer, and as the doc states:
Quote
{EXP}: Returns the single byte the expression points to. It will be in the range 0 to 255.
That means for you that {GDB0} will return the first number you "stored" in it, and {GDB0 + 1} the second number etc.
Title: Re: 2 Axe Questions
Post by: Siphonic_Sugar on August 12, 2015, 07:13:33 pm
Okay, but how would I display that, like the value of a certain spot in the GDB?
Title: Re: 2 Axe Questions
Post by: Sorunome on August 13, 2015, 04:48:12 am
You can do that with the >Dec - token, so that you have like
Code: [Select]
Text(10,10,{GDB0 + 5}>Dec)
Title: Re: 2 Axe Questions
Post by: Haobo on August 13, 2015, 05:58:29 pm
2) You know how in the Axe app, it shows all of your programs that you made? Could someone explain how that works because I need it for something and I would like to be able to use it for myself.


I'm not 100% sure this is right cause I never used it myself, but I think you want something like the MEMKIT axiom. I also found a topic a while ago on omnimaga that lets you sort programs some other way, but I forgot the link. I think think that MEMKIT is what you need. The file should have come with axe version 1.2.2.
Title: Re: 2 Axe Questions
Post by: Sorunome on August 13, 2015, 06:02:04 pm
2) You know how in the Axe app, it shows all of your programs that you made? Could someone explain how that works because I need it for something and I would like to be able to use it for myself.


I'm not 100% sure this is right cause I never used it myself, but I think you want something like the MEMKIT axiom. I also found a topic a while ago on omnimaga that lets you sort programs some other way, but I forgot the link. I think think that MEMKIT is what you need. The file should have come with axe version 1.2.2.
Doing a quick search, yes it seems to me as if memkit would do it, link here: https://www.omnimaga.org/the-axe-parser-project/axiom-requests/msg340795/#msg340795 also check out the post after that and the link in there and read some stuff there.
Title: Re: 2 Axe Questions
Post by: Siphonic_Sugar on August 13, 2015, 06:37:56 pm
Okay thank you. I need that in my Windows XP program, which I am hoping can be used as a shell.