Any specific code? And stop with the freaking line breaks. It doesn't help _anything_. If you are just putting a line break where the text box splits, there is _no_ reason to do so. It will auto-word-wrap, you don't need to do it yourself.
Are you sure you're running your program with Celtic 3 or Doors CS with the libraries enabled?
spud2451 wrote:
I tried but i got a syntax error
Did you read BasicLibs:FindProg from the DCS wiki? Are you using Celtic III or Doors CS 7 for your Celtic libraries?
Yes and yes. and when i do just det(9) I get a syntax error.

This is the code I used to test it:

:ClrHome
:det(9)->Ans
:Disp Ans
You can't store data to Ans like that, data gets stored to Ans after every calculation automatically. For example, this code will store "HELLO" to Ans, and display it:

Code:
:"HELLO
:Disp Ans

Also, you can do this so that "HELLO" won't get stored into Ans, but it will still be displayed:

Code:
:Disp "HELLO"

So, to display every program on your calculator, you would either run:

Code:
:Disp det(9)
or

Code:
:det(9
:Disp Ans
depending on whether you want to use that same string again after displaying the list of programs.
Thanks Souvik. I'll have to try that
spud2451 wrote:
Thanks Souvik. I'll have to try that
So did that solve your problem? Any further issues yet?
hey can some one help me generate some code that that would sort asm programs from BASIC programs in a way that would be able to be read from later

here's some code


Code:
:ClrHome
:det(9)->Str1
:1->K
:inString( Str1," ",K)->Z
:While Z
:sub(Str1, K, Z-K) -> Str2
:
:detection stuff
:
:Z+1 -> K
:inString( Str1," ",K)->Z
:End
spud2451 wrote:
hey can some one help me generate some code that that would sort asm programs from BASIC programs in a way that would be able to be read from later
Basically, if the program starts with the two-byte sequence $BB,$6D (NOT characters! Bytes!) then it is an ASM program; otherwise assume it's a BASIC program or some kind of data file.
x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--
KermMartian wrote:
spud2451 wrote:
hey can some one help me generate some code that that would sort asm programs from BASIC programs in a way that would be able to be read from later
Basically, if the program starts with the two-byte sequence $BB,$6D (NOT characters! Bytes!) then it is an ASM program; otherwise assume it's a BASIC program or some kind of data file.

x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--

Yes I got that and I want to use this code to sort through it.

x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--


Code:

:ClrHome
:det(9)->Str1
:1->K
:inString( Str1," ",K)->Z
:While Z
:sub(Str1, K, Z-K) -> Str2
:
:detection stuff
:
:Z+1 -> K
:inString( Str1," ",K)->Z
:End


x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--

But how can I detect the bytes and how can I store the names. I've tried lists but it just gives me a data error. Does anyone know of any other way I could store them?

x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--
Spud, would you mind using
Code:
[hr]


instead of using

Quote:
x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--


to do the same thing?

It's more readable that way
Smile
Qwerty.55 wrote:
Spud, would you mind using
Code:
[hr]


instead of using

Quote:
x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--


to do the same thing?

It's more readable that way
Smile


However, this new kid speaks for everyone that it was clever and artistic and you probably worked hard in typing it out, so I give you props on that, but readibility does suffer. Smile
Personally, I'd prefer omitting the dividers entirely, but we're getting ever-so-slightly off-topic. Spud, to filter, use the optional second argument of Det(9), which can be the first N bytes of the programs you're looking for. That'll give you all the ASM programs, then you can simply detect that all programs in the full list but not the ASM list are BASIC programs.
See the thing is that I want to filter them out while grabbing the names of the programs out of Ans. Also I want to keep the code I'm using. So it there a way to check if the program inside of Str1 is an ASM program.



Code:

 
:ClrHome
:det(9)->Str1
:1->K
:inString( Str1," ",K)->Z
:While Z
:sub(Str1,K,Z-K) -> Str2
:
:detection stuff
:
:Z+1->K
:inString( Str1," ",K)->Z
:End

Well, take a look at Third-Party BASIC Libraries again. You can use LineRead to get the first two bytes of the first line of the program and see if they're $BB,$6D.
Thanks Kerm. I compleatly forgot about that command
spud2451 wrote:
Thanks Kerm. I compleatly forgot about that command
No problem. It's ever so slightly kludgy, since ASM programs don't have line breaks, per se, but it should provide you with a rough approximation. My main concern is that you might end up with huge temporary strings. Iambian, can you suggest a better solution?
Assuming you are using Celtic III and you're checking to see if the first two bytes are $BB,$6D...

EDIT3: Bad code removed.

EDIT: Removed the extra '='. Keep forgetting that this is TI-BASIC.
EDIT2: Forgot that the BINREAD instruction will (or should) convert the binary to hex for you. The corrected code is as follows:


Code:

If det(14,"FILENAME",0,2)="BB6D"
//Runs if file in question starts with BB6D
And that's why Iambian is the right person to answer your questions. Smile He of course is the man we have to thank for Celtic in the first place.
Unfortunately that code did not work. I just got the same results. Any other suggestions?

I'll post some screen shots of the home GUI tomorrow


sorry can't post screenshots ti connect is acting funny
  
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  Next
» View previous topic :: View next topic  
Page 4 of 7
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement