Author Topic: Running External Programs  (Read 4350 times)

0 Members and 1 Guest are viewing this topic.

Offline ACagliano

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 919
  • Rating: +32/-2
    • View Profile
    • ClrHome Productions
Running External Programs
« on: October 05, 2010, 01:18:31 am »
Is it possible to, in a compiled Axe executable, transfer control to another asm program or compiled Axe program and then return, like you can in TI-Basic?

Offline Ikkerens

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 378
  • Rating: +28/-9
  • JavaScript Magician
    • View Profile
    • Walotech
Re: Running External Programs
« Reply #1 on: October 05, 2010, 01:22:42 am »
Not as far as I know.
I tried using the following to do so, but I failed.
Code: [Select]
.MYTEST
1->{25+L4
prgmCOMPPRG
Output(0,1,{25+L4}>Dec)
This program would multiply {25+L4} by 2, but axe gives me a bad program error.
(COMPPRG ofc was already compiled by axe itself, but I don't think that matters much.)
« Last Edit: October 05, 2010, 01:23:13 am by Ikkerens »

Splut for Android [----------]
Paused/halted indefinitely, might be abandoned, our graphic designer quit and the rest of us simply doesn't have the time to work on it...

Offline calcdude84se

  • Needs Motivation
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2272
  • Rating: +78/-13
  • Wondering where their free time went...
    • View Profile
Re: Running External Programs
« Reply #2 on: October 05, 2010, 07:58:22 am »
You can only include source files, not compiled programs. It does matter :P
Try it again, see if it does anything. If you really need to include a binary file, you need to use Asm(
"People think computers will keep them from making mistakes. They're wrong. With computers you make mistakes faster."
-Adam Osborne
Spoiler For "PartesOS links":
I'll put it online when it does something.

Offline LordConiupiter

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 339
  • Rating: +3/-0
  • Just one of the thousands of Axe-fans...
    • View Profile
Re: Running External Programs
« Reply #3 on: October 05, 2010, 10:16:58 am »
is it really a posibility to do this:?
Code: [Select]
Asm(prgmWHATEVER)

It would be very handy in case it isn't possible jet!
« Last Edit: October 05, 2010, 10:17:34 am by LordConiupiter »
everytime that I was down, you would always come around, and get my feedback on the ground. (modified part from 'Seasons in the sun')

No matter how many errors are bothering you, always try to stay rel-Axe!

The HoMM project will be resumed as soon Axe 1.0.0 will be released!
Projects:
Code: [Select]
HoMM:   [==--------]    Project 'resumed': I'm suffering overwhelming new ideas being popped up in my dreams :P
tiDE:   [----------]    Explored and understood the main part of the code: just started writing a Tokenizer.



password of the week: uvanapererubupa (Any pronunciation is the right one ;) )   :D click me, and you'll be raided :D

Offline ACagliano

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 919
  • Rating: +32/-2
    • View Profile
    • ClrHome Productions
Re: Running External Programs
« Reply #4 on: October 05, 2010, 10:23:40 am »
Asm( is already used to run hex within a program. There would need to be a different command for it.

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Running External Programs
« Reply #5 on: October 05, 2010, 10:29:37 am »
Asm( is already used to run hex within a program. There would need to be a different command for it.

If you need a different token, how about AsmPrgm? Although you could always use Asm() for this too, and just check if a program name or hex is inside the parentheses and parse it accordingly.
« Last Edit: October 05, 2010, 10:31:07 am by Runer112 »

Offline LordConiupiter

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 339
  • Rating: +3/-0
  • Just one of the thousands of Axe-fans...
    • View Profile
Re: Running External Programs
« Reply #6 on: October 05, 2010, 10:36:54 am »
yes, when you do a normal Asm( command, the hex will never start with prgm or appv or whatever. perhaps it would be a better idea to use Asm(HEX) or Asm({PTR}r)? since otherwise the Asm routine would be much larger, cuz it would have to get the starting of the prgm on the calc, and this way it is much more flexible.
everytime that I was down, you would always come around, and get my feedback on the ground. (modified part from 'Seasons in the sun')

No matter how many errors are bothering you, always try to stay rel-Axe!

The HoMM project will be resumed as soon Axe 1.0.0 will be released!
Projects:
Code: [Select]
HoMM:   [==--------]    Project 'resumed': I'm suffering overwhelming new ideas being popped up in my dreams :P
tiDE:   [----------]    Explored and understood the main part of the code: just started writing a Tokenizer.



password of the week: uvanapererubupa (Any pronunciation is the right one ;) )   :D click me, and you'll be raided :D