| Author |
Message |
pronatalist
Joined: 04 Sep 2007 Posts: 5
|
Posted: September 9, 2007 5:18 AM Post subject: My TI89 just trashed all my program files! HELP! #3 |
|
|
Reply to mellamokb:
| Quote: | Hi pronatalist,
I'm probably not much help, but here are my answers to your questions (there really is nobody else active on this forum....)
|
So how come you are able to Reply? Thanks for replying on the same thread. I can see the "1" in the Replies column, before even refreshing the actual posts screen. I suppose next thing, you will tell me that the included Mac OS Safari browser isn't doing the job, and that I need to download Firefox, if they make a Mac OS 10.4.7 Tiger Intel chip version? I hear for Macintosh, Safari is best, or else may try Firefox? Not much Mac support or updates anymore for Netscape or MyCrudSoft Internet ExploDer?
Nobody else active? Surely that will change in time, as I can't be the only person around in the internet virtual communities interested in programming a graphing calculator. Why program such a tiny little gadget? Because it's really designed for such explorations, while other gadgets and computers don't even come with program compilers anymore, but people have to take the inititive and add all that stuff from somewhere. And the 160*100 pixel screen really does seem big enough, for much of what I want to do. The number of elements I can put into a Dialog and have it fit the screen, seems about "just right." I had one that was too big, and sure enough, that cool scrolling I saw on my TI89T for Dialogs, of course doesn't work in TI-Basic. Well at least then I won't have to do a separate TI89 version. I had a complicated, too many parameter,s repeating Reminders Dialog, and fixed the stuff that never did fit just right, by using pre-set menus in the Toobar, to select the group and specific Reminder to Edit, and a pre-Dialog to set the Reminder Name and Priority, which then are echoed in the main Dialog Title, and accessable again via a simple ESC press.
Thanks for taking the trouble to reply and for your thoughts, even if you don't know all the answers to what I ask. Sometimes another mind helps eliminate the mental roadblocks, just by suggesting something I might not have thought of.
| Quote: | | 1) TI does NOT support assembly programming on their calculators! You're at your own risk. So "boycotting" TI because one of your own programs crashed your own calculator and cleared the FLASH ROM is really pointless... |
Well I haven't done any Assembly yet. But I must, to see if there is anything text fragments I can recover from my old TI89. All I want, to start, is merely a simple EXEC(String) Peek(Memory) command, to see what's lurking in the Archive Flash ROM? But I don't know anything about 68000 opcodes yet, and I think you see, I must pass the parameter Memory location, and receive the value of the memory location contents back to TI-Basic. So it's a FUNC call actually. Then I can program a TI-BASIC MemView() program, to let me see what text (and hexadecimal numbers) are lurking around in the Flash memory, to see if there's anything left to rescue. Since TI-Basic is an interpreted language?, I expect there could be text galore lurking there to rescue and Copy-and-Paste back into the Program Editor. Since I can't rearchive until everything is rescued, I probably will have to do fragments or a few files at a time in RAM, and transfer to my Mac Mini, then reload the Archive Flash ROM later and/or to my TI89T.
BTW, where is the Assembler in my TI89T, which I read somewhere is a new feature? Maybe it's on the CD-ROM which I haven't got around to looking at yet? I would like an Assembler within the calculator, not always having to do every Build on my Mac?
Most everything I have been reading on the TI89 support websites, seems to just assume that I can compile everything on my Mac (Windows PC?), in some complicated Assembly environment. Do I really need Doors and all that, just to do the simplest machine language call? So far, it appears rather unlikely that I would exceed the 8K HW2.0 limit of my old TI89.
Yeah, no use "boycotting." An honest look would show that most every computer imaginable, was pretty much designed to eventually crash. Never enough recovery protections. Always some level of shoddy programming within the OS. It's amazing that these still user-unfriendly devices, have become so popular. A computer should be like a microwave oven or toaster. Just plug it in and it works. I guess we will be waiting a while longer, for that dream to work. Still waiting for people like me, to design the software with better standards, more innovation, etc.
| Quote: | | 2) TI does not have variable parameter capability built-in for BASIC programs, but you're welcome to write your own library for this. I might even use it . |
I am afraid it's beyond me, for a while. Too easy to "cheat" and use the null-set approach. But maybe you gave me an idea. What if my program writes the program, and I have an almost empty program header file to call? I was thinking of doing that, so I don't leave a huge memory hog program running in memory, while it switches to yet another memory hog program to extend features. Perhaps I can as a user, launch a small program header program, which then calls and switches to the correct program files. Never can all programs quit at once, or it's all over. But then I can't edit a program already running? And it wouldn't work, because the other programs don't have "foreknowledge" of how many parameters will be needed.
One related problem, is the variable date format in my old Calendar program. I like my dates Year\Month\Date. This is obviously not a very standard format, so the correct way to program it, is as a user-definable option, not a forced requirement. But once the user changes it, then the program is launched with Cal({Year,Month,Date})? But what if the user selects a different order? Sure, I can swap the order around, and assign to other variables, but the problem is that first Comment, that shows "Year,Month,Date" in the TI system Catalog User view. Do I bother to update that too, as well? Under program control? That would then require that small program launcher approach, but then, it won't work, because my program launcher is still open?
| Quote: | | 3) TI-89 Titanium was not created to have additional features. It was created to be faster and have more memory (and it is both of these, I own one myself and can attest to this). |
Then the positive side of that then could be, better compatibility between the TI89 and TI89T?
It looks like they ate up most all the additional memory, with more Applications that while almost useless, I would be loathe to Delete, because I am such a packrat. Why delete stuff and have empty useless memory instead? At least wait until the memory is needed, and for what? My awkward, nearly useless slow programs? But then if I ever manage to write small tight efficient coding, it shouldn't be an issue of which to keep. Just keep everything, and maybe I could fit in a few Mario brothers games too? Now I am dreaming? Play Mario without any color nor sound? When I have a Sony Playstation 2? Whatever for?
| Quote: | | 4) You cannot display to the very bottom status line because that is reserved for the OS. However, ASM can use the whole screen, and your welcome to write your own library so that BASIC programs can use the whole screen, too. |
Yeah, I can just throw out all those pesky space-wasting Toolbar menu area, the bottom "BATT" indicator, because I love "surprises" when it all suddenly goes dead? Actually, I would probably have to try to preserve the bottom status line as much as reasonably possible, but I would like to trash the top Menu bar, at least get rid of the F1, F2, F3, etc. stuff, and change the style to a slimmer fit, leaving more screen for useful stuff. Duh? I know what F1...F5 keys go to which menus.
Grayscale appears to be a possible waste though, due to having only up to 4 levels before noticable flicker, and differing ways to do it, depending on the HW version?
As I only have but a TI89 and a TI89T, I seem to be neglecting to check screen pixel resolutions, for any presumed compatibility with Voyage 200 or TI92. Would really anybody run my programs but me? But any Assembly I do, I would prefer to be universally compatible with both HW 2.0 and 4 to run on at least my 2 calculators. Hopefully, if anybody runs my programs on the "wrong" calculator, they would just notice that part of the bigger screen isn't used?
| Quote: | 5) You can indeed run any program code using Expr(). You are simply using the wrong syntax. For instance, I used the following to create a custom menu bar with two items (could be programmatically determined for any number of items):
Code:
Expr("Custom: Title ""m"": Item ""h"": Item ""n"": EndCustm") |
That's what I was looking for. That should do my variable length sub-menus nicely. Will have to do some "experiments." But another question. Is it then a "separate" program, as with Define Function, that exists only temporarily? Can it branch to "real" creator program locations? If a "separate" program, I must figure out how to set up all my temporary Labels, and at least return a result code, perhaps stash it into a global text variable or something, to the creating program.
| Quote: | | Notice two things: everything quoted must have double quotes when already in quotes; colons are used to separate multiple instructions (much like the colons at the beginnings of lines in the program editor). |
Yeah, I think I had suspected the double-quotes thing. And I figured that colons would work better than Return characters.
| Quote: | | 6) I typed Expr("09") on my calculator and got the number 9. What did you get? |
Yeah, that works on the Home screen, so why not within the program? I was confused over the power of Expr(String) because that seemed to be the expected usage in the manual. I had wondered if I needed something more like Expr("09"&"->z") to avoid a Syntax error? Or in more detail Expr(mid(String,Offset+1,2)&...).
| Quote: | | 7) Expr() is very powerful, you just have to use it properly. It can be used to run any code, store variables, and create menubars / toolbars / dialogs with variable length menus / dropdowns. It is however less efficient than typing the code directly because all programs are compiled before running, and Expr() causes run-time code execution, which is always slower than pre-compiled code. |
A delay of hopefully not much more than a second, should be acceptable. I am more interested in the proper styling, than a zippy fast program. After all Basic can't do everything anyway, especially if it is to be "fast." I just hope I don't get any random compiling errors.
| Quote: | | The calculator is too small and slow to justify abstract data types just for a "cleaner" program. Computer programmers take advantage of the extreme speed of most modern computers to cut corners in writing code and to make code look "neater" and "well-written". If nobody is going to read the source code except you, you will have much better luck writing the program for speed than for "neatness". |
And yet, the memory is so small, that I require more efficient "clean" coding. I even even having to resort to "short" 1 or 2 character variable names, although I prefer readability, so that I can update later. But I am still 1-character indenting my code to indicate loops and If-Then stuff. Too easy to get lost otherwise and introduce unnecessary errors as a result. I am not so sure that "clean" code is costing me much speed. Perhaps if I actually had some "clean" code, I could find out? Also to conserve memory, I have been limiting Comments to whatever will fit without adding extra rows, having to view it through that tiny "keyhole" calculator 9-row Program Editor.
I don't suppose many people will read my code, but if they do, I hope that they might find a clue, as to how all that complicated stuff actually works, so that they can build on it. I aim more for "open source" than "protecting trade secrets" sort of coding. I do hope that other people might come along, fix a few bugs, adapt to run on other machines, etc.
| Quote: | | You might, however, try splitting a single program into multiple programs and use individual prorgams as "subroutines" as opposed to using Goto's and Label's. This may increase speed slightly and will make code easier to debug since there is no "jump to line number" feature in TI-89. You might also try writing your BASIC code on a computer where you can see a lot more code at once and type a lot faster. Then you can test with a Virtual TI before sending it to your calculator--and BASIC programs have the added advantage of not being able to disrupt the OS or FLASH ROM . |
It's hard to separate everything into "subroutines" because of the lack of variable sharing. But some functions work nicely as "subroutines." I wrote my "Clock" icon drawing routine, as a "subroutine." Lifesimo(x,y,IconData,Window). The IconData contains a number specifying time and format, x and y simply tell it where to draw on the screen. If y value is too great, Window is a set of 4 numbers, that tell what portion of the screen to "scroll" to draw the icon at the bottom, and then drop it back into place. This avoids the dreaded Domain error for clipping the bottom of an icon off, at the bottom of the screen. If Window is the null set, then the entire screen is assumed to be the "window." In TI-Basic, I just can't seem to avoid temporarily "disturbing" the screen sometimes, to achieve all my designed graphic effects. No way to composite drawings "off screen." Oh well, "disturbing" the screen can be visually appealing, if not done in too tack of a way.
I like the lack of line numbers, as line numbers are always getting messed up and in need of "renumbering" anyway. And they would be a huge waste of screen space too. But I recall way back in the 1980s, on the Apple ][ computers, Integer Basic programs did crazy stuff with Goto. Goto X*100+1000. Applesoft Basic which came along later, and gained the ability to calculate floating point real numbers, and lost the ability to do variable expression Gotos, substituting a more limited command for processing user menu choices. I think it was On X Goto num1,num2,num3...
| Quote: | Hope this helps you in some way. PLEASE just ask your questions, short, quick, and to the point. Don't try to tell me all about your knowledge of programming, I'm a seasoned programmer.
~ mellamokb |
Once in a while, I manage "short and to the point."
Perhaps I am only somewhat-seasoned, and would like to become more seasoned? I desire more elegant code, than I have managed so far. Elegant code also has a way of "just working" even with "unforseen" problems.
What is this "I need a check variable?" Why won't it just post my post? |
|
| Back to top |
|
 |
mellamokb
Joined: 10 May 2007 Posts: 100
|
Posted: September 13, 2007 8:02 PM Post subject: |
|
|
Hi pronatalist,
| Quote: | | So how come you are able to Reply? |
Hmm. I don't know if this helps you any, but I wasn't able to reply to a specific topic until I logged in first (instead of logging in after I click "reply"). I don't know if you log in first or not, but it's worth suggesting, I suppose.
| Quote: | | All I want, to start, is merely a simple EXEC(String) Peek(Memory) command, to see what's lurking in the Archive Flash ROM? |
For using EXEC for Assembly, I would get ahold of the TI-GC C or TI-ASM computer software programs that allow you to write ASM and C code for the TI-89 family of calculators. Not only are they easy to use, but the help libraries in the programs are very extensive and may point you in the right direction for what to write after EXEC.
| Quote: |
BTW, where is the Assembler in my TI89T, which I read somewhere is a new feature? |
There isn't a built-in assembly editor in TI89T to my knowledge, but there are programs available to let you program in ASM and C right on the calculator. Do a Google search for these tools. Also try the TIcalc file archives for other applications and utilities you can use to help you with your programming ventures:
http://www.ticalc.org/pub/
| Quote: | | One related problem, is the variable date format in my old Calendar program. I like my dates Year\Month\Date. |
As far as allowing different formats for your "Cal(" function, you might try a second argument that identifies the input format (European vs. US, etc.) so that you use something like "Cal(date_fmt, {date_pt1, date_pt2, date_pt3})" where date_pt# represents the parts of the date, whose order is dictated by the selected format (which could be a string or number or anything as long as your program knows how to interpret it).
| Quote: | | Then the positive side of that then could be, better compatibility between the TI89 and TI89T? |
There is indeed pretty good compatibility between the TI89 and TI89T, especially for BASIC which is interchangeable. However, when writing ASM, there are a few minor differences that can crash a program written for TI89 when run on the TI89T, and these differences are associated with how the OS operates on memory (because there is more memory so the address offsets are different), not functionalities of the OS interface itself. There is a program available called GhostBuster ("GhostB(") on TICalc archives that I've used myself to convert TI89 Assembly programs to TI89T programs, and it works for about 80-90% of the programs as far as I can see. But for BASIC, you shouldn't ever have to worry.
| Quote: | | Now I am dreaming? Play Mario without any color nor sound? |
BTW, I play Mario without any color or sound because PS2's aren't allowed in college .
| Quote: | | Yeah, I can just throw out all those pesky space-wasting Toolbar menu area, the bottom "BATT" indicator, because I love "surprises" when it all suddenly goes dead? |
I didn't mean get rid of the indicators altogether, I meant provide an ASM-based extension to BASIC that allows graphics to use the whole space, but the indicator can be redrawn when the program finishes or even during the program.
| Quote: | | But another question. Is it then a "separate" program, as with Define Function, that exists only temporarily? |
It is actually code that is interpreted on the fly rather than compiled. I would imagine, however, that the entire string is read before it is actually interpreted, so the calculator would handle the situation fine where halfway through the "Expr(" string there is a program call that must return back to that half-way point later on using the stack. I'm not sure how it works, but it's as if that code was indeed embedded within the current program AFAIK.
| Quote: | | I had wondered if I needed something more like Expr("09"&"->z") to avoid a Syntax error? Or in more detail Expr(mid(String,Offset+1,2)&...). |
Not sure I understand. I created a program like so, and it worked perfectly:
| Code: |
test()
Prgm
Expr("09->z")
EndPrgm
|
Note that using "Expr(" in a function is a little tricky because the calculator knows to check first if what is being done within the "Expr(" call is allowed in a function before it runs that. That could cause some unexpected errors, for instance, if you try to modify a global variable from an "Expr(" call within a function, rather than a program.
| Quote: | | I just hope I don't get any random compiling errors. |
All compiling errors have a reason .
About commenting and indenting. I do that on computer programs, but not TI calculator programs because the programs have such limited scope, it's not worth my time, and nobody cares anyway for the programs I write. But I wouldn't think it would affect the runtime of the program, because all the comments and line indenting should affect how the program is compiled, which all programs are compiled before being run.
| Quote: | | Quote: | | PLEASE just ask your questions, short, quick, and to the point. Don't try to tell me all about your knowledge of programming, I'm a seasoned programmer. |
|
I said this to feel you out and make sure you weren't just coming here to promote yourself, but you really had legitimate questions . You're doing a wonderful job, don't take me wrong when I say this. I like discussing programming, because programming is my life. Feel free to say as much or as little as you want.
Have a great day, and I hope I've helped you in some way!
~ mellamokb |
|
| Back to top |
|
 |
|
|
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
|
Powered by phpBB © 2001, 2005 phpBB Group
|
Saphic 1.5 // Theme created by Sopel
|
|