Join us on Discord!
You can help CodeWalrus stay online by donating here.

Jarvis Artificial Intelligence

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

Previous topic - Next topic

0 Members and 3 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 :))
  • Calculators owned: TI-84+
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 :) :) :) :)
  • Calculators owned: Ti-84+, Ti-Nspire, Hp Prime, Broken HP Prime, HP 48SX

CKH4

#17
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.
  • Calculators owned: TI-83+, TI-84+


alexgt

#18
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!!!!
  • Calculators owned: Ti-84+, Ti-Nspire, Hp Prime, Broken HP Prime, HP 48SX

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?
  • Calculators owned: A lot.

alexgt

Oh sorry you misunderstood I plan to make it into a shell I don't actually have that capability yet :).
  • Calculators owned: Ti-84+, Ti-Nspire, Hp Prime, Broken HP Prime, HP 48SX

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! ;)
  • Calculators owned: A lot.

alexgt

Thanks!!

I want to learn but no I don't know C or C++
  • Calculators owned: Ti-84+, Ti-Nspire, Hp Prime, Broken HP Prime, HP 48SX

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.
  • Calculators owned: A lot.

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.
  • Calculators owned: Ti-84+, Ti-Nspire, Hp Prime, Broken HP Prime, HP 48SX

Duke "Tape" Eiyeron

#25
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)
  • Calculators owned: A lot.

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).
  • Calculators owned: Ti-84+, Ti-Nspire, Hp Prime, Broken HP Prime, HP 48SX

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"
  • Calculators owned: A lot.

alexgt

#28
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?
  • Calculators owned: Ti-84+, Ti-Nspire, Hp Prime, Broken HP Prime, HP 48SX

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).
  • Calculators owned: TI-84+
Legends say if you spam more than DJ Omnimaga, you will become a walrus...


Powered by EzPortal