Sorry if this should be in the ez80 forum, but I think it goes here.

I was wondering if there was an equivalent to onblock for the CE? I wanted to use it to make a password program in basic, and it is annoying that people can just hit on to get around it. Sad
Ask and you shall receive. Here's the relevant program:

OnBlockCE

Hope this helps! Smile


Code:
 1:Asm(pgrmONBLOCK   - Disables OnBlock, this allows you to power off your calculator
 0:Asm(pgrmONBLOCK   - Enables OnBlock, prevents the use of the [ON] key
I've always wondered: What happens if you activate OnBlock, run your program and forget to disable it again before the calculator auto powers down?
I mean a situation where you can't use On but the calculator is off.
Nik wrote:
I've always wondered: What happens if you activate OnBlock, run your program and forget to disable it again before the calculator auto powers down?
I mean a situation where you can't use On but the calculator is off.

With mine, the calculator automatically resets the interrupt controller when doing this. So; you will still be able to turn on your calculator, of course, and OnBlock will have been disabled.
That Mateo, what a productive and helpful guy. Razz Thank you for addressing this concern, although I remain as suspicious as ever about the efficacy of BASIC password protection programs.
Thanks Mateo! Your awesome! Very Happy
KermMartian wrote:
I remain as suspicious as ever about the efficacy of BASIC password protection programs.

Haha, isn't that the truth. Smile For those of you who missed the above link, I assembled one for the CSE calculator in addition to the CE version:

OnBlock CE: Download
OnBlock CSE: Download
I am making a password program for my calculator using OnBlock and TextLib, but I found a problem with the program. First, I use 0:Asm(prgmONBLOCK. Then, when I input the correct code, I use 1: Asm(prgmONBLOCK. However, if I have pressed the ON button before entering the correct code, it does not affect the program until that part. Then it does the ON break. Is there a way for you to make it so that the calculator does not know at all about the ON button being pressed? It doesn't really matter a lot, but it would make it more useful. I hope you know what I am talking about.
readroof2 wrote:
However, if I have pressed the ON button before entering the correct code, it does not affect the program until that part. Then it does the ON break.

Fixed and updated. Smile Might be a little bit before it is approved, however. Hope this helps!
Thanks! What did you change (I don't understand assembly, but I understand English explaining why stuff was happening)? Also, how hard would it be to make a program that would be like the Start-up app for the monochrome calculators if it can't be an app?

Edit: I was about to go try to download it and then I realized what you meant by it getting approved. At first I was confused and thought that you thought that people wouldn't like it. I guess I will see the new and improved version later. Very Happy
readroof2 wrote:
Also, how hard would it be to make a program that would be like the Start-up app for the monochrome calculators if it can't be an app?

Well, there are a few who oppose this, as it requires modification of the OS through writes to falsh and recalculating checksums and such. Technically, it is possible to do without this, but it wouldn't be very secure as a simple press of the reset button would delete the startup program. Anywho, as for what I changed, I simply made it so the the ON interrupt bit doesn't latch while running. If it latches, that means that it will eventually be triggered again once the interrupt is renabled.
How could a program modify the OS of the calculator? Is it because it can basically do anything in assembly (with the calculator's limitations)? Also, did Doors CSE modify the OS of my CSE, and does that make my calculator unstable, or is it okay because Doors is an app?
readroof2 wrote:
How could a program modify the OS of the calculator? Is it because it can basically do anything in assembly (with the calculator's limitations)? Also, did Doors CSE modify the OS of my CSE, and does that make my calculator unstable, or is it okay because Doors is an app?

DoorsCSE does nothing of the sort. ZStart does, however. Literally anything can be done in assembly, as long as one knows what they are doing. The OS is just a program, like anything else. DoorsCSE uses provided functionality to take advantage of loading on start, specially the OFFSCRPT variable.
I would just like to point out that with TI being cool and updating OSes, OnBlock for the CE no longer works if you use any sort of getkey routine. Sorry about that Razz

For those that care; here are the OS comparisons:

Original:

Code:
                    _0637DB:
0637DB: 3A0000D0      ld        a, (ramStart)
0637DF: B7            or        a, a
0637E0: 287E          jr        z, code_063860
0637E2: FECC          cp        a, $CC
0637E4: 207A          jr        nz, code_063860
0637E6: CD904302      call      code_024390
0637EA: CDF40500      call      _CheckEmulationBit


Updated OS:


Code:
                code_0656B2:
0656B2:3A0000D0      ld        a, (ramStart)
0656B6:B7            or        a, a
0656B7:CAB95706      jp        z, code_0657B9
0656BB:FECC          cp        a, $CC
0656BD:C2B95706      jp        nz, code_0657B9
0656C1:C5            push      bc
0656C2:01045000      ld        bc, port_5004
0656C6:ED78          in        a, (bc)
0656C8:CB47          bit       0, a
0656CA:200F          jr        nz, code_0656DB
0656CC:CBC7          set       0, a
0656CE:ED79          out       (bc), a
0656D0:78            ld        a, b
0656D1:FE50          cp        a, $50
0656D3:2801          jr        z, code_0656D6
                code_0656D5:
0656D5:CF            rst       code_000008
                code_0656D6:
0656D6:79            ld        a, c
0656D7:FE04          cp        a, $4
0656D9:20FA          jr        nz, code_0656D5
                code_0656DB:
0656DB:C1            pop       bc
0656DC:CDF64302      call      code_0243F6
0656E0:CDF40500      call      _CheckEmulationBit
Is there a way to stop people from just hitting 2nd + Quit? I understand that On Block for the Ti 84 Plus CE works well to stop people from just simply clicking that on key at the bottom of the calculator. I feel that, quite frankly, On Block is useless if one can just hit 2nd quit, which is I think is how most people quit programs.

Forgive me if this question has been asked many times or if there is a simple answer, I am not an expert of programming.
rohanmodi wrote:
Is there a way to stop people from just hitting 2nd + Quit? I understand that On Block for the Ti 84 Plus CE works well to stop people from just simply clicking that on key at the bottom of the calculator. I feel that, quite frankly, On Block is useless if one can just hit 2nd quit, which is I think is how most people quit programs.

Forgive me if this question has been asked many times or if there is a simple answer, I am not an expert of programming.

Have you attempted to run it for yourself and discover the answer?
Hi Guys,

When I run 0:asm(prgmONBLOCK in a program, and click the on button in the program, I will still receive an ERROR : BREAK error message. I have checked, and I will still receive that same message if I do the same exact command, but instead of doing 0:asm(prgmONBLOCK, I replace that 0 with a 1. The same error is displayed. Why might this be?
  
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
Page 1 of 1
» All times are GMT - 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