Author Topic: Archiving Programs within Axe programs  (Read 9844 times)

0 Members and 1 Guest are viewing this topic.

Offline hardyboy16jm

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 7
  • Rating: +0/-0
    • View Profile
Archiving Programs within Axe programs
« on: December 05, 2012, 10:10:36 pm »
Is there any way that I could archive an axe program within itself? When I say that, I mean the same axe program, too. Or if I can't do it within the main program, can I run a sub program and the archive the main program?

Offline aeTIos

  • Nonbinary computing specialist
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3915
  • Rating: +184/-32
    • View Profile
    • wank.party
Re: Archiving Programs within Axe programs
« Reply #1 on: December 06, 2012, 06:58:58 am »
That's not possible, since a program has to be copied into RAM in order to be run (Applications are another story but that's irrelevant here). Subprograms don't go like Basic in Axe, they are actually a part of the program. So sorry, no way to do it.
I'm not a nerd but I pretend:

Offline Eeems

  • Mr. Dictator
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6267
  • Rating: +318/-36
  • little oof
    • View Profile
    • Eeems
Re: Archiving Programs within Axe programs
« Reply #2 on: December 06, 2012, 11:08:10 am »
Well, you could try to do some sort of compression thing with your program and have it expand out things as they need it. You would run out of ram fast though, and I'm not sure you could get that much compression on your programs.
If someone made some sort of axiom for groups, so your launcher program would ungroup only the stuff you need at the moment from the group and then run it, that would be awesome though.

EDIT: Oh, wait, completely misread that. Actually you probably could figure out a way to do that, it would be tricky and require a lot of knowledge of the OS, and probably a lot of custom asm code.
« Last Edit: December 06, 2012, 11:09:38 am by Eeems »
/e

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: Archiving Programs within Axe programs
« Reply #3 on: December 06, 2012, 12:46:22 pm »
But why do you want to archive the program you are runnin ? ???
Can't you just launch it with a shell that is able to launch archived programs (that is to say, any shell) ?
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: Archiving Programs within Axe programs
« Reply #4 on: December 06, 2012, 04:03:37 pm »
Yeah, I would suggest just running it from a shell, but that makes for a very interesting idea. Assembly programs are normally run from the OS by copying the original program to 9D95h. I think there should be no problem with archiving the original as the OS does not do any writebacks. Here is the hex code:
Code: [Select]
Asm(EFF14278B72003EFD84F
That must go at the beginning of your program! The reason is very simply that when the OS runs you program, it copies its name to OP1, that way when your program starts, it can reference the original program (for writeback and whatnot). However, there are a number of OS routines that will destroy OP1.

That should work, but I didn't test it.

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Archiving Programs within Axe programs
« Reply #5 on: December 06, 2012, 04:21:56 pm »
If you compile your program for noshell, it's actually pretty easy and the OS doesn't get into your way:

Code: [Select]
.AXE
Archive "prgmAXE"

Ta da!

Offline hardyboy16jm

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 7
  • Rating: +0/-0
    • View Profile
Re: Archiving Programs within Axe programs
« Reply #6 on: December 06, 2012, 09:32:58 pm »
But why do you want to archive the program you are runnin ? ???
Can't you just launch it with a shell that is able to launch archived programs (that is to say, any shell) ?
Oh, i probably should of put this in question, but I meant that while i was still making the game, i could archive itself while i was testing it because if tried to make it like five times but my calculator keeps getting frozen, so i have to take out the batteries and clear the ram

Offline hardyboy16jm

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 7
  • Rating: +0/-0
    • View Profile
Re: Archiving Programs within Axe programs
« Reply #7 on: December 06, 2012, 09:39:03 pm »
If you compile your program for noshell, it's actually pretty easy and the OS doesn't get into your way:

Code: [Select]
.AXE
Archive "prgmAXE"

Ta da!
I tried this but got an error when i tried to compile. It said "no nested libs".

Offline aeTIos

  • Nonbinary computing specialist
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3915
  • Rating: +184/-32
    • View Profile
    • wank.party
Re: Archiving Programs within Axe programs
« Reply #8 on: December 07, 2012, 03:47:50 am »
In that case you have a subroutine in a subroutine.
I'm not a nerd but I pretend:

Offline willrandship

  • Omnimagus of the Multi-Base.
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2953
  • Rating: +98/-13
  • Insert sugar to begin programming subroutine.
    • View Profile
Re: Archiving Programs within Axe programs
« Reply #9 on: December 07, 2012, 04:04:43 am »
Is that against the rules in Axe? I didn't know that.

Offline aeTIos

  • Nonbinary computing specialist
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3915
  • Rating: +184/-32
    • View Profile
    • wank.party
Re: Archiving Programs within Axe programs
« Reply #10 on: December 07, 2012, 04:06:09 am »
He might have an outdated version...
I'm not a nerd but I pretend:

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Archiving Programs within Axe programs
« Reply #11 on: December 07, 2012, 04:10:46 am »
If you compile your program for noshell, it's actually pretty easy and the OS doesn't get into your way:

Code: [Select]
.AXE
Archive "prgmAXE"

Ta da!
I tried this but got an error when i tried to compile. It said "no nested libs".
That seems like a strange error to get in those circumstances, what version of Axe are you running?  And are you sure you typed it in exactly right?

Offline hardyboy16jm

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 7
  • Rating: +0/-0
    • View Profile
Re: Archiving Programs within Axe programs
« Reply #12 on: December 07, 2012, 07:44:10 am »
If you compile your program for noshell, it's actually pretty easy and the OS doesn't get into your way:

Code: [Select]
.AXE
Archive "prgmAXE"

Ta da!
I tried this but got an error when i tried to compile. It said "no nested libs".
That seems like a strange error to get in those circumstances, what version of Axe are you running?  And are you sure you typed it in exactly right?
I typed it exactly like that. I'm running v1.0.5
Oh, and by the way, I actually want to archive the source code for the program, not the compiled one.
« Last Edit: December 07, 2012, 07:47:24 am by hardyboy16jm »

Offline stevon8ter

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 663
  • Rating: +10/-0
    • View Profile
Re: Archiving Programs within Axe programs
« Reply #13 on: December 07, 2012, 07:58:32 am »
Just do it manually? Cause you can compile archived programs... And download zstart, so you can even edit archived programs
None of my posts are meant offending... I you feel hurt by one of my posts, tell me ... So i can appoligise me and/or explain why i posted it


Hi there, I'm the allmighty (read as: stupid, weak...) STEVON8TER

Offline shmibs

  • しらす丼
  • Administrator
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2132
  • Rating: +281/-3
  • try to be ok, ok?
    • View Profile
    • shmibbles.me
Re: Archiving Programs within Axe programs
« Reply #14 on: December 07, 2012, 10:12:47 am »
If you compile your program for noshell, it's actually pretty easy and the OS doesn't get into your way:

Code: [Select]
.AXE
Archive "prgmAXE"

Ta da!
I tried this but got an error when i tried to compile. It said "no nested libs".
did you make sure to use tokens, rather than actually typing things out?
Archive should be the token accessible from the [2nd]+mem menu, prgm is a single token from the prgm menu, and the only thing actually using single characters is the program name.

In that case you have a subroutine in a subroutine.

that's not illegal in axe