Omnimaga

Omnimaga => News => Topic started by: SirCmpwn on January 08, 2011, 10:20:58 pm

Title: Axe Terminal Beta Released
Post by: SirCmpwn on January 08, 2011, 10:20:58 pm
Terminal v0.1b
(http://www.omnimaga.org/index.php?action=dlattach;topic=6079.0;attach=5461)

I've just put the finishing touches on the beta of this.  I've gotten the shell support working - you can now create your own programs that use the Terminal routines, and have them execute within the shell.  You can perform I/O from the command line to provide a similar user experience to those using Windows or Linux within your own programs.  I've also added a few other methods - Index Programs, Compare Strings, Starts With, and a few more.  You can read all about it in the readme (which you should definately read if you are going to develop for Terminal).  I've also included a demo program that you can run from within Terminal that uses the command line capabilities of Terminal.

This is also the first shell that supports both assembly and Axe, meaning that not only can assembly programmers access the routines, it also has support for developers to use it with Axe without any additional code modifications.  I will eventually create an include file for assembly programmers, but all the details that are needed to use asm with Terminal are provided in the readme.  As for Axe, prgmTERMINC provides all the functionality you need to use Terminal, and easily.

I've included a demo program for Axe developers.  I welcome any and all feedback, feature requests, or questions.  Enjoy, and let's see some cool programs!

(Download) (http://www.omnimaga.org/index.php?action=dlattach;topic=6079.0;attach=5459)
Title: Axe Terminal Beta Released
Post by: Eeems on January 08, 2011, 10:55:20 pm
Amazing :D
Here is an idea, how about adding the ability to pass arguments to a program, and allow programs to call other programs? maybe just call them at the end or something, and pass arguments to that called program?
Title: Axe Terminal Beta Released
Post by: SirCmpwn on January 08, 2011, 10:56:26 pm
Well, for loading arguments, I'll put them in L1 on startup.  For calling other programs, that shouldn't be too hard, but it could get crowded in RAM.
Title: Axe Terminal Beta Released
Post by: Eeems on January 08, 2011, 10:58:09 pm
thought you'd do something like that :)
Are you going to do it the same way that C/C++ does it (argc argv)? Or store it in a different way?
Yeah it could get crowded, that's why I said possibly just running them right after instead
Title: Axe Terminal Beta Released
Post by: SirCmpwn on January 08, 2011, 10:59:26 pm
I think that it should be okay, so long as I change the way that archived programs are run.  As for C/C++, probably not.  I'll just put a zero delimited list of strings in L1 (SaveSScreen for assembly), ended with double zeros.
Title: Axe Terminal Beta Released
Post by: Eeems on January 08, 2011, 11:02:11 pm
Ah ok, sounds good. Maybe you could add a number at the start designating how many arguements are being passed kind of like argc? Then again, that might make it harder to figure out things.
Can't wait to see this implemented :)
Title: Axe Terminal Beta Released
Post by: SirCmpwn on January 08, 2011, 11:03:28 pm
I could do that.  So for arguments, I'll set it up at SaveSScreen (L1) like so (":" used for readability, not actually present in the program):
2:-A:0:-B:0:0
Title: Axe Terminal Beta Released
Post by: Eeems on January 08, 2011, 11:04:10 pm
Hmm, that could work :)
Title: Axe Terminal Beta Released
Post by: SirCmpwn on January 08, 2011, 11:06:04 pm
Will do :) for now, L1/SaveSScreen contains the command last used before starting your program "EXEC PRGMNAME".  I will also eventually add a Parse routine, which programs can use to parse a string as if it was entered into the command line.
Title: Axe Terminal Beta Released
Post by: Eeems on January 08, 2011, 11:14:21 pm
Sounds good :)

http://eeems.pastebin.com/EfZGqnpc
^ z80 include file for developers
Title: Axe Terminal Beta Released
Post by: SirCmpwn on January 08, 2011, 11:21:15 pm
Thanks Eeems, I'll add that to the next beta, along with a ZDS version.
Title: Axe Terminal Beta Released
Post by: Eeems on January 08, 2011, 11:32:26 pm
Sweet :)
(http://img.removedfromgame.com/imgs/0-wabbitemu7.gif)
Code: [Select]
.NOLIST
#INCLUDE "Terminal.inc"
.LIST
.org $9d93
.db $BB,$6D
call RestorePage
COUT(Hello)
SafeExit
Hello:
.db "Hello World!",0

EDIT: New Include file http://eeems.pastebin.com/htk4WmS8
Title: Re: Axe Terminal Beta Released
Post by: SirCmpwn on January 08, 2011, 11:50:38 pm
Very nice!  Glad to see asm support works out well.
Also, I've moved this to News.
Title: Re: Axe Terminal Beta Released
Post by: Eeems on January 08, 2011, 11:57:25 pm
:) Me too!
I think this is news worthy :P

Ok, a few command/function requests:
Title: Re: Axe Terminal Beta Released
Post by: SirCmpwn on January 09, 2011, 12:01:05 am
list]
  • Command Alias's
    • Quit
      • Exit
      • Bye
    • LS
      • Dir (for windows people)
  • Commands
    • CP (copy a file to the new name)
    • UGrp (ungroup a backup)
    • LG (list groups)
  • Functions
    • Call (calls a program from within another)
    • Write (write a string of data into a program/appvar)
    • Read (gets the pointer to a program/appvar's data in hl and puts the size in bc
Alias's will be done.
CP and LG will be done, and LG-esque commands will be available for every data type (and have Index routines to go with).  UGrp will be saved for later, but will be possible.
As for functions, I'll add Call through the Parse routine, through which you can use "EXEC PRGMNAME" from within your program.  The rest of the functions are trivial in both Axe and Asm, so I'll leave them out.  Also, for IMG and Update, I'll have Ion compatability eventually.
Title: Re: Axe Terminal Beta Released
Post by: Michael_Lee on January 09, 2011, 12:20:25 am
This is pretty cool!

Question:
So, if I make an Axe program using the subprograms provided, would that mean I could compile and run programs and display correctly even without the app?

Feature requests:
In addition to the ability to list all programs, what about the ability to list and run/display/archive/unarchive/delete/make (pick appropriate verbs) all BASIC apps, appvars, picvars, strings, lists, variables, and groups?

And also, would it be possible to add subprograms that would allow you to do any of the above when coded into Axe?
It might help with things like saving and opening level data - let the user input in a name for the appvar and save to it, or use your search function to return a list of all appvars with the correct beginning sequence then display all the available appvars all with just 3 or 4 subprograms...
Title: Re: Axe Terminal Beta Released
Post by: SirCmpwn on January 09, 2011, 12:38:14 am
You need to run programs using these routines from the Terminal, although I will add a routine later to launch the Terminal.
I can look into all of those features as well.
Title: Re: Axe Terminal Beta Released
Post by: Eeems on January 09, 2011, 12:38:20 am
Question:
So, if I make an Axe program using the subprograms provided, would that mean I could compile and run programs and display correctly even without the app?
Not if you use any of the given routines, this is like running programs made for DCS or ION etc.
Feature requests:
In addition to the ability to list all programs, what about the ability to list and run/display/archive/unarchive/delete/make (pick appropriate verbs) all BASIC apps, appvars, picvars, strings, lists, variables, and groups?
I'm liking that idea too :)


EDIT: Wow, ninja'd!

EDIT2: Btw, same program I showed I also made with mimas, here is the source and the include I made

EDIT3: Oh, btw, calling ConsoleInput doesn't seem to be doing anything at least not when called with assembly... :(

EDIT4: Also attached is the fruit of my coding tonight :) A little poem for all you The Blue Platform fans have fun :D
Title: Re: Axe Terminal Beta Released
Post by: SirCmpwn on January 09, 2011, 12:13:41 pm
I've added the CP command to copy one program to another, and the MV command to rename a program (both unfinished - the latter will be difficult).  I will be adding MORE as well, and eventually removing the need to preface a program with EXEC.  I've added the ClearConsole routine for Axe/Assembly developers.  I'll look into why ConsoleInput isn't working from Asm, it certainly is working from Axe.

Eeems, very nice!  Impressive, and more optimized once I release the update with ClearConsole.  I'll also be changing the text routine, it will support \n, so you can use that for new lines as well.

As for ConsoleInput, it works fine.  It uses the ">" to get input.  It looks the same as the Terminal does.  I'll eventually add a routine to provide a custom message at the input prompt.
Title: Re: Axe Terminal Beta Released
Post by: Eeems on January 09, 2011, 12:52:21 pm
Sounds great! :D
Yeah that would be helpful, my code is a mass of labels and COUT() right now x.x

When I tried a COUT() followed by a CIN() and then a COUT() nothing happened other then both the COUT()'s displayed and there was no input prompt at all.

I was also wondering if you could make a command to allow us to change the cursor location so we can output anywhere on the terminal :)
Title: Re: Axe Terminal Beta Released
Post by: SirCmpwn on January 09, 2011, 01:22:45 pm
I could add the cursor change pretty easily.  Axe users just have to set X and Y (I'll force that to be aligned later).  For now, you can change the value at $89E4 (X) and $89E6 (Y).
I just tried your COUT/CIN/COUT and it worked fine for me.
Title: Re: Axe Terminal Beta Released
Post by: Munchor on January 09, 2011, 01:24:19 pm
I have an idea, not show Terminal in the list of programs, since well you're running it.
Title: Re: Axe Terminal Beta Released
Post by: SirCmpwn on January 09, 2011, 01:25:03 pm
That is the source code.  Terminal is an App.  The source code displays in the listing on my emulator when I grabbed the screen shot.
Title: Re: Axe Terminal Beta Released
Post by: Eeems on January 09, 2011, 02:08:29 pm
http://eeems.pastebin.com/JtMTxFPU
^ new include file containing TCurX/Y and Argv (the location where CIN() stores its stuff ($86EC+56) )

You are right, it works now for some reason, but it wasn't before strangely...not sure why...

EDIT: New include file for mimas too :)
Title: Re: Axe Terminal Beta Released
Post by: willrandship on January 09, 2011, 02:41:33 pm
Will it support loading apps? :P
Title: Re: Axe Terminal Beta Released
Post by: SirCmpwn on January 09, 2011, 02:49:09 pm
No.  I also have created my own include file for ZDS, Tasm, and Mimas, and I'll be taking over the include maintentance.  Thanks, Eeems!
Title: Re: Axe Terminal Beta Released
Post by: Eeems on January 09, 2011, 03:01:42 pm
No.  I also have created my own include file for ZDS, Tasm, and Mimas, and I'll be taking over the include maintentance.  Thanks, Eeems!
Ok, sounds good :) Can't wait to use the official one :P
Title: Re: Axe Terminal Beta Released
Post by: SirCmpwn on January 09, 2011, 03:14:51 pm
Thanks, although I removed most of the macros :P I hate using macros for one-line operations.
Title: Re: Axe Terminal Beta Released
Post by: Eeems on January 09, 2011, 03:15:58 pm
Like safeexit cout and quit? they are really helpful
Title: Re: Axe Terminal Beta Released
Post by: SirCmpwn on January 09, 2011, 03:16:59 pm
SafeExit, COUT, and Quit were left in.
Title: Re: Axe Terminal Beta Released
Post by: Eeems on January 09, 2011, 03:18:03 pm
Ah ok, then did you change the other ones back into equates? I was doing it that way to make code size smaller.
Title: Re: Axe Terminal Beta Released
Post by: SirCmpwn on January 09, 2011, 03:19:05 pm
Yeah, I changed to equates.
Title: Re: Axe Terminal Beta Released
Post by: Eeems on January 09, 2011, 03:19:34 pm
oh :(
Title: Re: Axe Terminal Beta Released
Post by: SirCmpwn on January 09, 2011, 03:22:07 pm
I think most people can afford an extra 5 letters, no?  It leaves more room for optimization IMHO.  And a custom include would not be difficult.
Title: Re: Axe Terminal Beta Released
Post by: Eeems on January 09, 2011, 03:23:22 pm
how could you optimize call $4094 more?
Yeah it wont. Maybe you could make some macros though for those beginners who want to use them?

EDIT: new version of my poem program btw
(http://img.removedfromgame.com/imgs/0-wabbitemu9.gif)
Title: Re: Axe Terminal Beta Released
Post by: SirCmpwn on January 09, 2011, 03:30:00 pm
I can look into optimizing it, but it is pure Axe, so there's only so fast it can go...
I reccomend using "\n" in the next version for multiline couts.
Title: Re: Axe Terminal Beta Released
Post by: Eeems on January 09, 2011, 03:31:30 pm
Ok.

Yeah I will, just using the current code I am until you get the next version out so I can do multiline code :P
Title: Re: Axe Terminal Beta Released
Post by: SirCmpwn on January 09, 2011, 03:32:20 pm
Yep.  Any other requests?  I've already added a few of your requests, still working on more.  I'll post a new version before finishing them all, though.

Also, I'll be adding an Axe Bridge routine set, where Axe users can decrease program size by using Terminal's Axe routines instead of using them in-code, and where assembly users can call Axe routines.  This will make grayscale on Terminal via assembly as trivial as it is on Axe.
Title: Re: Axe Terminal Beta Released
Post by: ztrumpet on January 09, 2011, 05:40:35 pm
Also, I'll be adding an Axe Bridge routine set, where Axe users can decrease program size by using Terminal's Axe routines instead of using them in-code, and where assembly users can call Axe routines.  This will make grayscale on Terminal via assembly as trivial as it is on Axe.
Ooh, cool!  How will this work?  Will there be an AxeBridge compiler as well?
Title: Re: Axe Terminal Beta Released
Post by: SirCmpwn on January 09, 2011, 05:42:13 pm
No, it will basically allow you to change your code from this:
Code: [Select]
Pt-Change(0,0,Pic1)To this:
Code: [Select]
sub(PC,0,0,Pic1)Which would remove the Pt-Change code from your executable and decrease the size dramatically.
Or assembly programmers could use:
Code: [Select]
call DispGraphGSWhich would call DispGraphrr
Title: Re: Axe Terminal Beta Released
Post by: ztrumpet on January 09, 2011, 05:45:47 pm
Ah, I see.  Very cool. ;D  Good luck. :)
Title: Re: Axe Terminal Beta Released
Post by: Eeems on January 09, 2011, 05:51:27 pm
Read my mind on that stuff SirCmpwn :P
Title: Re: Axe Terminal Beta Released
Post by: aeTIos on January 10, 2011, 08:23:17 am
nice! if i get my link cable back im going to put this on my calc!
Title: Re: Axe Terminal Beta Released
Post by: Munchor on January 10, 2011, 02:30:46 pm
I shall repeat a question: In the list of programs can it there be no 'Terminal', since well you're running it? It's just a simple feature request that I'd like. Do you agree?
Title: Re: Axe Terminal Beta Released
Post by: SirCmpwn on January 10, 2011, 02:32:29 pm
No.  Like I've said before, Terminal is only in the list because it is the source code.  The source code was on the emulator when I screenie'd it.  You shouldn't be seeing it when you run this on-calc.
Title: Re: Axe Terminal Beta Released
Post by: Munchor on January 10, 2011, 02:33:29 pm
No.  Like I've said before, Terminal is only in the list because it is the source code.  The source code was on the emulator when I screenie'd it.  You shouldn't be seeing it when you run this on-calc.

:O Sorry, that's great :D
Title: Re: Axe Terminal Beta Released
Post by: Broseph Radson on January 10, 2011, 05:34:56 pm
So this can do something similar to Windows batch files?
Title: Re: Axe Terminal Beta Released
Post by: SirCmpwn on January 10, 2011, 05:35:22 pm
Eventually, yes.  I'll add scripting.
Title: Re: Axe Terminal Beta Released
Post by: Broseph Radson on January 10, 2011, 05:37:29 pm
Cool i like new languages :D
Title: Re: Axe Terminal Beta Released
Post by: SirCmpwn on January 10, 2011, 05:38:46 pm
The scripting language will basically consist of a series of instructions that Terminal interprets, in order, like most console scripting languages.
Title: Re: Axe Terminal Beta Released
Post by: Broseph Radson on January 10, 2011, 05:44:13 pm
I especially like languages like that. Super easy to learn.
Title: Re: Axe Terminal Beta Released
Post by: SirCmpwn on January 10, 2011, 05:44:36 pm
Right, plus arguments and such.
Title: Re: Axe Terminal Beta Released
Post by: Eeems on January 10, 2011, 11:40:37 pm
New program for the beta :)
Converts the hex you input to the ascii equivalent on the calculator. Currently it can only do 1 character, I might add more later if people want.
(http://img.removedfromgame.com/imgs/1-wabbitemu10.gif)
Source is also attached
Title: Re: Axe Terminal Beta Released
Post by: DJ Omnimaga on January 11, 2011, 04:06:43 am
This is nice SirCmpwn, nice job. I also like the batch script idea, it would be pretty great :D
Title: Re: Axe Terminal Beta Released
Post by: SirCmpwn on January 11, 2011, 08:47:09 am
This is nice SirCmpwn, nice job. I also like the batch script idea, it would be pretty great :D
*Eeems
It's his program :P
Title: Re: Axe Terminal Beta Released
Post by: DJ Omnimaga on January 11, 2011, 02:38:59 pm
Oh I was talking about Terminal, which you created. I just didn't see this topic until last night :P

Eeems program is nice too, though :P
Title: Re: Axe Terminal Beta Released
Post by: Eeems on January 12, 2011, 07:12:59 pm
Thanks :)
Title: Re: Axe Terminal Beta Released
Post by: SirCmpwn on March 03, 2011, 05:52:13 pm
As you can probably imagine, I have dropped this project.  I'll post the source code if I can find it, but the reason I made this was to demonstrate that it was possible to create shells using Axe, and to merge assembly and Axe.  Terminal was a proof-of-concept that leads up to something I've been working on for several months.  You'll get more details later, but I think you'll like it.
Title: Re: Axe Terminal Beta Released
Post by: DJ Omnimaga on March 04, 2011, 02:38:57 am
Sorry to hear, but I'm glad this lead to another interesting project. I can't wait to see it. :D