Login [Register]
Don't have an account? Register now to chat, post, use our tools, and much more.
This is an archived, read-only copy of the United-TI subforum , including posts and topic from May 2003 to April 2012. If you would like to discuss any of the topics in this forum, you can visit Cemetech's Your Projects subforum. Some of these topics may also be directly-linked to active Cemetech topics. If you are a Cemetech member with a linked United-TI account, you can link United-TI topics here with your current Cemetech topics.

This forum is locked: you cannot post, reply to, or edit topics. Celtic III => Your Projects
United-TI Archives -> Celtic III
 
    » Goto page Previous  1, 2, 3, 4, 5, 6, 7
» View previous topic :: View next topic  
Author Message
ztrumpet


Active Member


Joined: 06 May 2009
Posts: 555

Posted: 17 Feb 2010 09:55:16 pm    Post subject:

I believe this http://tibasicdev.wikidot.com/custominput is what you're looking for. Good luck! Smile
Back to top
justm3


Newbie


Joined: 17 Feb 2010
Posts: 5

Posted: 17 Feb 2010 11:03:48 pm    Post subject:

Iambian wrote:
justm3 wrote:
I have a feature that I think will be a great addition to Celtic III: Making it so that you can go to a label based off of an input. Let me be more specific.
I am working on a program that is a notepad-type program that takes place on the graph screen, for a bigger size. One problem is that I have at least 30-50 If statements that check to see what key was pressed, and then goes to the corresponding label. This slows it down a lot. If there was a way to say something like, I dunno, GoTo det(40, for example, that would jump to a label that is the input or GetKey value, that would be awesome. It would also make the program a lot smaller. Get what I'm saying? I don't know if it is possible to do, cause I don't do assembly, but, in my opinion, that would be probably one of the most, if not the most, useful things that Celtic III could do. Personally, I wouldn't care if it took up another flash page or whatever it is called. Thanks.

justm3

Doing something like that would mean messing around with the operator stack, and I don't know a whole lot about that tidy little structure that the TI-OS likes to keep while running BASIC programs. If there was a good resource to look at, please. Point me in that direction! Especially what the operator stack looks like while running a parser hook.

Got it. Now, it isn't in assembly, but you might get the general idea. it is something like a gigantic If structure.
If (input as string)="A":GoTo A
If (input as string)="B":GoTo B
...
If (input as string)="99":GoTo 99
...
Dunno if that helps, but thats what I've got.
It'd be a lot quicker and smaller, in theory, in ASM, thats why I am suggesting it.
Thanks.
justm3
Back to top
Sven.Thomas0


Active Member


Joined: 19 May 2009
Posts: 520

Posted: 18 Feb 2010 11:12:59 am    Post subject:

This is definitely the wrong place for this, but I think I have an idea. A friend of mine (Unlimited Dev.) wanted to make a text-editor, too. He requested that I make an ASM program that would convert a keypress into the actual ASCII code. I don't know how much you understand about data manipulation, but here are the programs I made. If you get confused, e-mail me (see the readme). As a warning, I have very limited internet access (especially with school out for winter break).
Back to top
Sven.Thomas0


Active Member


Joined: 19 May 2009
Posts: 520

Posted: 18 Feb 2010 11:33:04 am    Post subject:

This is definitely the place to put this. I actually do have a feature request or rather a modification. Instead of those space delimited strings, how about new-line delimited strings? That should only be a matter of using a 3F instead of a 20 somewhere, right? The reason I ask this is because it would be a lot easier to use det(9, store the result to a program, and read the lines for program names.

det(8,"CAT",det(9,"FISH"),1
det(5,"CAT

I might be an assembly programmer now, but I still like BASIC.

Thanks a bunch in advance.
Back to top
Iambian


Advanced Member


Joined: 13 Mar 2004
Posts: 423

Posted: 18 Feb 2010 07:01:44 pm    Post subject:

ThunderBolt wrote:
This is definitely the place to put this. I actually do have a feature request or rather a modification. Instead of those space delimited strings, how about new-line delimited strings? That should only be a matter of using a 3F instead of a 20 somewhere, right? The reason I ask this is because it would be a lot easier to use det(9, store the result to a program, and read the lines for program names.

det(8,"CAT",det(9,"FISH"),1
det(5,"CAT

I might be an assembly programmer now, but I still like BASIC.

Thanks a bunch in advance.

You know. That's a wonderful idea! I haven't thought about that, and yes, you are right about the change from $20 to $3F to support that. I might go ahead and do that pretty soon if not right now.

EDIT: Found that the token used for the space character is not $20. It's actually $29 for some odd reason.

EDIT2: Added it in and made sure it worked correctly. Will be waiting a little until I can get more changes done before I release it.


Last edited by Guest on 18 Feb 2010 09:32:16 pm; edited 1 time in total
Back to top
Sven.Thomas0


Active Member


Joined: 19 May 2009
Posts: 520

Posted: 22 Feb 2010 01:06:32 pm    Post subject:

Yeah, I realised later that night about the whole 20h/29h thing. I am so used to working with ASCII, I forget some tokens are changed from their ASCII equivalent. Thanks a bunch for adding that because that could really help. Here is another idea, that I am implementing in one of my current projects. I am making an assembly library, but I was annoyed with some BASIC codes looking like this:

1:Asm(prgmLIB
2:Asm(prgmLIB
{3,2:Asm(prgmLIB ;In case a routine needs other syntaxes, I used list inputs.
...

So what I did was I made it so that this was an acceptable syntax:
{1,2,3,2:Asm(prgmLIB

Right now, I am making sure all the calls work so that I can add more routines (I'm on the fortieth right now and I found a problem. I program and debug on the calc, so it's a nightmare ☺).

With Celtic3 allowing the user to use a simple 1-byte token as a hook and omit some parts of the syntax, this idea is probably impractical. But hey, it's always an idea ☺.
Back to top
justm3


Newbie


Joined: 17 Feb 2010
Posts: 5

Posted: 01 Mar 2010 06:25:21 pm    Post subject:

Hi again. I was looking through the readme, and I didn't find a way to run a program from the det(9 string. Is there a way to do this already? If not, then that would be immensely useful for a Basic shell.
Thanks
justm3
Back to top
ztrumpet


Active Member


Joined: 06 May 2009
Posts: 555

Posted: 01 Mar 2010 06:53:48 pm    Post subject:

I'd recommend checking the source for this program: http://www.unitedti.org/forum/index.php?showtopic=9140
This was my attempt at a basic shell using Celtic III, and I think it turned out pretty well.

I'm not sure what you're asking, but you can probably find an answer in that code. :)

Good luck!
Back to top
Eeems


Advanced Member


Joined: 25 Jan 2009
Posts: 277

Posted: 01 Mar 2010 11:32:52 pm    Post subject:

You could first check to make sure that the program is unarchived then store "prgm"+<prgm name> to a temporary program and run that. That's how I do it all the time.
Back to top
Sven.Thomas0


Active Member


Joined: 19 May 2009
Posts: 520

Posted: 08 Mar 2010 11:02:35 am    Post subject:

I am working on a program (EnPro) that is also an assembly library. I was making a similar lineread command, when I realised soomething: I could make it so that the byte to search for could be defined by the user. So say I made a large data file that didn't use 3Fh (newline) to seperate data, it would be nice if an optional argument was used to define the byte to search for.
Back to top
ztrumpet


Active Member


Joined: 06 May 2009
Posts: 555

Posted: 08 Mar 2010 04:13:15 pm    Post subject:

ThunderBolt wrote:
I am working on a program (EnPro) that is also an assembly library. I was making a similar lineread command, when I realised soomething: I could make it so that the byte to search for could be defined by the user. So say I made a large data file that didn't use 3Fh (newline) to seperate data, it would be nice if an optional argument was used to define the byte to search for.

That's a great idea! Iambian, what do you think? Could this be an optional argument that defaults to '3F'?
Back to top
Iambian


Advanced Member


Joined: 13 Mar 2004
Posts: 423

Posted: 08 Mar 2010 08:47:42 pm    Post subject:

I think that's an option already embedded in the dev version. I believe I've made those changes.
Back to top
Display posts from previous:   
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
    » Goto page Previous  1, 2, 3, 4, 5, 6, 7
» View previous topic :: View next topic  
Page 7 of 7 » All times are GMT - 5 Hours

 

Advertisement