I used the assembly code on the website to turn the run indicator off, which under my impression was the thing in the top right corner that loads when things are waiting or running, however, even after using the hexadecimal code, the run indicator stays on. Help?
Are you running it from the homescreen or from a program? If you are running it from a program, then which code are you using?
The OS automatically turns the run indicator back on once the program finishes and it returns to the homescreen.
Z80 Assembly>English>TI-BASIC>Python>French>C>0
Personally, I would install an App like Batlib, and make turning the run indicator off a lot easier. That way, you don't need several ASM programs to do various different tasks.
Xeda, I was using it on the home screen. So if I included the assembly code before the getkey command, and operated it through Mirage, would that disable the indicator for that time only? And Rogue, what does Batlib do?
The run indicator code has to be run while running a program. For example, if you try the following:
Asm(prgmINDICOFF
Pause
You will notice that you don't see the pause indicator, or if you do the following, you won't see the run indicator:
Asm(prgmINDICOFF
Repeat getKey
End
As to the BatLib question, it does a wide range of things, many of which have clever uses if you can figure out what they do. Roguebantha is probably the most knowledgeable or second most when it comes to knowing the commands (I am ranked up there, too :P ) As a quick example code that you might find useful:
DelVar BDelVar C8→R
dim(1 ;Turn the run indicator off, disable the 'Done' message.
dim(56,4 ;clear the graph screen, silently
Repeat A=15
dim(106,B,C,R,6,{2 ;draw a circle with pxl-change logic, using a special pattern
dim(99 ;refresh the LCD screen, showing the newly drawn circle
dim(106,B,C,R,6,{2 ;re-invert the circle
dim(10,3 ;filter out the keys, only allowing arrows and Enter~Clear
dim(43→A ;get the keypress, doesn't use BASIC values
B+(Ans=1)-(Ans=4→B ;update Y coord
C+(A=3)-(A=2→C ;update X coord
R+(A=10)-(A=11→R ;modify radius
End
Use the arrows and + - to change the radius of the circle and move. At the cost of readability, you can get faster and smaller code by chaining commands together. For example, the dim(1 and dim(56,4 can be combined with dim(1,56,4. Similarly:
DelVar BDelVar C8→R
dim(1,56,4
Repeat A=15
{2
dim(106,B,C,R,6,Ans,99,106,B,C,R,6,Ans,10,3,43→A
B+(Ans=1)-(Ans=4→B
C+(A=3)-(A=2→C
R+(A=10)-(A=11→R
End
Also, if you change the list, used, you can change the pattern for drawing the circle (including using multi-element lists). For more info, just check out the documentation :)
Z80 Assembly>English>TI-BASIC>Python>French>C>0
Wow Xeda, I just looked Batlib up on the Ti-Calc archives and didn't know you wrote it! About to download it.
Xeda, I made the program like you suggested, then operated it on Mirage, but i get an Error from Doors Os. Is it because of the mix of assembly and basic?
Thanks for the compliment Xeda :)
No Huey, the issue lies with DoorsCS and the way it handles Parser Hooks. Since Doors installs its own Parser hooks, running Batlib programs through Doors doesn't work, no matter what you do. In fact, once you run Doors, you'll have to reinstall the Batlib parser hook (by running the batlib app) before Batlib commands will work again. There's even a case in which if there are enough Batlib commands inside a program, Doors won't even count it as a program, and you won't even be able to ATTEMPT to run it. If you disable the Homerun feature in Doors, you won't need to rerun the Batlib app every time you use Doors. I suggest running the Batlib App and then running programs from the home screen. Much prettier for Batlib to work with than through Mirage or Doors.
I know I'm probably making this a lot harder than it really is, but i made a program (having Omnicalc installed) where I started it off by running real(33,"EF4045C9 , then a getkey command, and I still see the run indicator on?
"EF4045" just clears the LCD. Use dim(1 to turn off the run indicator using Batlib.
EDIT: Oops sorry, didn't mean clear the LCD, my bad.
Success! It finally worked. However, now putting this all together. I'm recalling a pic in the beginning of my program, which thereafter will involve a getkey. I don't want to show the run indicator, which is why we went through all of this. I put dim(1 which has been turning off the indicator, but it's not working when i recall a pic :(
Under more review of batlib, I discovered the dim(36 command, which with conjunction of the appropriate arguments, applies a picture's details onto a graph screen. When I use this command outside of the program, it works, however, inside the program it just shows a blank screen
You will need a dim(99) to actually refresh the LCD with the new data. TI-BASIC automatically does this whenever drawing occurs. This may seem like a lacked feature in BatLib, but it is in fact the key to smooth and fast graphics. For example, in the code I gave for moving around a circle, the reason that it didn't flicker is because the LCD wasn't updated after re-inverting the circle. This means the user doesn't see the circle un-drawn, they only see it drawn :)
As well, you won't need to do a ClrDraw before recalling the picture with dim(36, either.
One of the other reasons for why graphics are faster is that the drawing and LCD updating is much faster in BatLib. For LCD updates, the OS routine can do 40 updates per second, compared to about 100 with the routine I wrote for BatLib.
Z80 Assembly>English>TI-BASIC>Python>French>C>0
Wait, so does the following not seem to work?
dim(1
RecallPic 1
Repeat getKey
End
I don't see why it wouldn't work since no BASIC code should be able to re-enable the run indicator. In fact, the only way to re-enable them aside from using assembly or Apps like BatLib is to finish the program, at which point, the OS turns the run indicator back on.
Z80 Assembly>English>TI-BASIC>Python>French>C>0
Xeda, to test it out to be sure, I made a code that followed:
dim(1
Repeat G=21
getkey→G
End
And what I found is that it works. Then, I use the code you just listed, and that also works (yay!). However, when I return to my original program that started this all, i see the run indicator. The code is:
dim(1
ClrDraw
ClrHome
RecallPic 1
Repeat max(getKey={93,105
End
ClrHome
Disp "Resetting All..."
// and then etc. which involves some usage of the graph screen later
So what's the difference between the code you just wrote Xeda and the one I have. Also, Rogue, I put the dim(99 in there, and it didn't work. However, I did see what you mean about the circle.
That is fantastic! Apparently when the graph screen is 'dirtied' and the OS displays it, the run indicator is re-enabled. To my knowledge, this is undocumented and quite possibly not intentional.
Z80 Assembly>English>TI-BASIC>Python>French>C>0
Wow! So uhh, what should we do about it? I put the dim(1 before the RecallPic 1 (after the dim(1 )), so that even after the graph screen is dirtied, it re enables the hook, and the result is still the same.
I did it I did it!!
AxesOff
ClrDraw
ClrHome
Asm(prgmBA // prgmBA contains the assembly code listed on the website to un dirty the graph screen
dim(1
AxesOff
RecallPic1
//start the max get key
I am glad you figured it out :) (Also, there is the dim(22) command which is similar to Omnicalc's real(33) command).
To undirty the graph in BASIC, you can do DispGraph, so really you could do:
ClrDraw:DispGraph
dim(1
However, using an asm code to undirty the graph is probably the cleanest way since you won't need to worry about graphs being redrawn, plots replotting, or any of that.
Z80 Assembly>English>TI-BASIC>Python>French>C>0
Keep the note that you shouldn't use "C9" with the dim(22 command (or at least I never have). Xeda would know better since she created it, but using it could yield unexpected results.
Hmmm, by the way, you could probably use dim(22 to execute a buffer overflow attack on the Batlib parser somehow…curious thought.
The extra C9 won't cause any problems, it's just that BatLib automatically adds a C9 so an extra one would be redundant.
And yes, there are many ways that dim(22) can be used against BatLib :P However, overflowing that buffer would more likely upset the OS system flags since that is what (nearly) immediately follows.
Z80 Assembly>English>TI-BASIC>Python>French>C>0