Alternatively, join us on Discord.

Jarvis Artificial Intelligence

Started by alexgt, March 17, 2015, 09:45:11 pm

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Snektron

Quote from: alexgt on March 17, 2015, 11:03:58 pm
EDIT: I think I will try to make this into a shell kind of so you could execute programs with "/execute prgmNAME" or "/prgmNAME" if someone knows how to do so in Axe it would be nice to know

You need some ASM codes, but the problem is distinguishing asm programs and basic programs. I'll post some hex codes tomorrow (also theres probably an axiom for, and i can make one too if you want :))
Legends say if you spam more than DJ Omnimaga, you will become a walrus...


alexgt

Thanks! I don't know how hex codes work or how to use them so an Axiom would be best (as I said i am almost completely new to Axe and higher-level languages). Thanks guys for the support :) :) :) :)

CKH4

March 18, 2015, 01:02:26 am #17 Last Edit: March 18, 2015, 01:04:29 am by CKH4
Quote from: alexgt on March 17, 2015, 11:03:58 pm
EDIT: I think I will try to make this into a shell kind of so you could execute programs with "/execute prgmNAME" or "/prgmNAME" if someone knows how to do so in Axe it would be nice to know

ClrDraw would know but he has quit calculator coding  :'(. The source may be included in the CMDv2 download at the bottom of the page. http://clrdraw.weebly.com. Good luck.

Edit.
Looks like he didn't include the source. It may be written in asm.


alexgt

March 18, 2015, 08:22:47 pm #18 Last Edit: March 18, 2015, 08:24:37 pm by alexgt
No I wrote it in Axe :). Also i did include source it is named SRCJARVIS as an attachment in the last page :).

EDIT: I will put an attachment up soon with new features!!!!

Duke "Tape" Eiyeron

How do you manage the parser? I think I'm going to go for a rescursive one for my shell (FXSH, for FiXos kernel) and to manage relative paths I would like to use a recursive to manage each sub-folder correctly. How did you yours?

alexgt

Oh sorry you misunderstood I plan to make it into a shell I don't actually have that capability yet :).

Duke "Tape" Eiyeron

Oh, okay! If you can read C, here's my command parser source code if you can grab some ideas from that! ;)

alexgt

Thanks!!

I want to learn but no I don't know C or C++

Duke "Tape" Eiyeron

I use variables to know if I'm parsing a simple command, something stored in simple or double quotes. THe rest is just reading and putting the result into a argument list.

alexgt

Yeah if I understand correctly that is what I do, I have a value stored to L1 when i hit a button then when I press ENTER it adds up the values until it runs into a space then I store that into a value so I can read it and turn it into a response / execution of a command.

Duke "Tape" Eiyeron

March 18, 2015, 09:38:16 pm #25 Last Edit: March 18, 2015, 09:40:39 pm by Eiyeron
Here's some tips I could give you:
- Start with the parser and don't add features over times. The more you will have to change the parser's rules, the more you will suffer over time.
- Once you have the parser featured, you can start making your features, one per one, and check they blend well and you have predictible results
- Some builtins could be very useful. Try to bundle some classic commands into the shell and not bundling them in extern programs/apps. This can clutter or slow execution! (And in some UNIX cases, you can't do what these builtins does for your shell. CD for instance changes the current directory for the current process, that's why you can't have an executable do this work for you. Here this should be useless as that's not an UNIX system but builtins are a plus)

alexgt

What do you mean by the parser, are you talking about Axe? Anyways I am solely using Axe and ASM snippets to make it a shell-like program (right now I am focusing on the command prompt part).

Duke "Tape" Eiyeron

No, I'm talking about the method/functions you are writing to manage what the user wants to do, like running "cd" with arguments "-v", "../there"

alexgt

March 18, 2015, 09:57:10 pm #28 Last Edit: March 18, 2015, 10:37:26 pm by alexgt
Oh, the subroutines/functions that I use so far are ones that i have move the text up when you hit the bottom of the screen and the next detects what key you pressed. :)


EDIT: I use,
Buff(EXP)->D
0->E

Then I use that as a substitute for a list in basic with E adjusting the address of the pointer should I do it differently and is that whats crashing my calc?

Snektron

Okey, so i've updated my RUN axiom that i made some weeks ago. It now has basic program support, and won't checks if a program actually exists.
(It checks if the progra starts with the AsmPrgm byte, if it doesnt find it its recognied as a basic program)
Also note that you probably have to add some 0's to make the string exactly 9 bytes (prgm token + 8 bytes name)
Use

Axiom(RUN)
Run("prgmPROGRAM")

to run a program. The "Run(" token can be found in the stat-calc menu (QuadReg).
Legends say if you spam more than DJ Omnimaga, you will become a walrus...


Powered by EzPortal