Author Topic: Password Protection - Turn Off Calculator?  (Read 7017 times)

0 Members and 1 Guest are viewing this topic.

Offline jimbo1qaz

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 7
  • Rating: +0/-0
    • View Profile
Password Protection - Turn Off Calculator?
« on: December 19, 2014, 08:47:01 pm »
I have an Axe password protector I programmed with a special feature involving a BCALL.

Any suggestions on how to turn it off in a way that ZStart will still run when the calculator turns on?

That means no "make the calculator think it's low on battery". That results in an APD, and the next time the thief turns my calculator on, it will no longer be locked.

Alternatively, is it possible to suspend my program until the ON button is pressed, to save power without having to deal with ZStart not running or RAM leaks?

Offline Keoni29

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2466
  • Rating: +291/-16
    • View Profile
    • My electronics projects at 8times8
Re: Password Protection - Turn Off Calculator?
« Reply #1 on: December 20, 2014, 04:14:09 am »
The on-button triggers an interrupt, so you could shut down peripherals and then halt the cpu. Make sure that the on- button interrupt is the only one that is enabled. After the halt instruction you have to restore the peripherals to their previous state.

You need to use some asm for this.
If you like my work: why not give me an internet?








Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: Password Protection - Turn Off Calculator?
« Reply #2 on: December 20, 2014, 09:31:15 am »
The first part of your post is easy. Add in your program a key (or several keys) that makes it quit immediately when pressed. Like

Code: [Select]
If getKey(54)
   Return
End
<follows the code you already have for your password thing>

Then, when you turn your calc on, press this key (or those keys) while pressing on and it will skip the password.
« Last Edit: December 20, 2014, 11:01:12 am by Hayleia »
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline jimbo1qaz

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 7
  • Rating: +0/-0
    • View Profile
Re: Password Protection - Turn Off Calculator?
« Reply #3 on: December 20, 2014, 03:14:45 pm »
NO. I wanted to turn the calculator off such that ZStart will relaunch the program when it turns back on. Not to skip the password prompt. That's trivial.

Anyway, how do I disable peripherals and halt?

Offline Digital

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 107
  • Rating: +0/-0
  • 10101
    • View Profile
    • Digital's Hp
Re: Password Protection - Turn Off Calculator?
« Reply #4 on: December 20, 2014, 03:30:09 pm »
thats the b_call(_poweroff
in axe it is:
Code: [Select]
asm(EF0850)
I'm sorry if i might make some mistakes, I'm German so English isn't my first language. Please correct me :)

Offline jimbo1qaz

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 7
  • Rating: +0/-0
    • View Profile
Re: Password Protection - Turn Off Calculator?
« Reply #5 on: December 20, 2014, 05:46:35 pm »
Tried your turnOff BCALL.

As soon as it turns off, the calculator becomes extremely unstable. I tried rerunning password: 1 time it hung, one time it did nothing. After it did nothing, I tried opening editor with Axe hooks enabled, it crashed.

Offline Hooloovoo

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 225
  • Rating: +22/-0
    • View Profile
Re: Password Protection - Turn Off Calculator?
« Reply #6 on: December 20, 2014, 06:27:48 pm »
If you enable the on-interrupt and low-power mode in port 03 (http://wikiti.brandonw.net/index.php?title=83Plus:Ports:03), if you execute a halt instruction and set up an interrupt (in IM 2), you can set the interrupt to do whatever you need to do. This is probably easier in assembly and there might be a better way to do it in axe.
"My world is Black & White. But if I blink fast enough, I see it in Grayscale." -tr1p1ea
Spoiler For some of the calcs I own:



(actually I have quite a few more than this, but I don't feel like making bars for them all.)

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: Password Protection - Turn Off Calculator?
« Reply #7 on: December 21, 2014, 11:39:39 am »
NO. I wanted to turn the calculator off such that ZStart will relaunch the program when it turns back on. Not to skip the password prompt. That's trivial.
Oh, I misunderstood because in your first post, you say "turn it off" without mentionning your calc (except in the title) so I thought "it" referred to the program -.-
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline Streetwalrus

  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3821
  • Rating: +80/-8
    • View Profile
Re: Password Protection - Turn Off Calculator?
« Reply #8 on: December 21, 2014, 11:42:11 am »
There's an opcode floating around somewhere. You need to output a value to some port and halt the cpu, this turns the whole calc off but it will resume your program if you turn it on.

Offline benedikt.muessig

  • LV2 Member (Next: 40)
  • **
  • Posts: 35
  • Rating: +2/-0
    • View Profile
    • My homepage
Re: Password Protection - Turn Off Calculator?
« Reply #9 on: January 21, 2015, 06:03:34 pm »
I made a password app with axe and zstart before. Just do:
Code: [Select]
Asm(3E01D303FB76FDCB09A6C9)This powers the calc off and as soon as the on key is pressed the program will resume directly after this line.
« Last Edit: January 21, 2015, 07:08:24 pm by benedikt.muessig »

Offline c4ooo

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 252
  • Rating: +10/-1
  • The impossible chemical compound.
    • View Profile
Re: Password Protection - Turn Off Calculator?
« Reply #10 on: March 05, 2015, 06:29:39 am »
Ime personaly not an Axe pro, but cant you just use
Code: [Select]
shade()->s
shade(0)
Repeat IsLocked
end
shade(s)
My calculator protector system i wrote just uses shade() to turn the screen "off". But, once again ime no pro in Axe or Ti-8x, so dont be mad if ime missing an important point.
-German Kuznetsov
The impossible chemical compound.

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: Password Protection - Turn Off Calculator?
« Reply #11 on: March 05, 2015, 08:00:52 am »
The issue is that you'd still be able to exit that program by simply pulling a battery

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline c4ooo

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 252
  • Rating: +10/-1
  • The impossible chemical compound.
    • View Profile
Re: Password Protection - Turn Off Calculator?
« Reply #12 on: March 05, 2015, 01:07:41 pm »
The issue is that you'd still be able to exit that program by simply pulling a battery
Yea...
But you can also bypass the MirageOS protectin by pulling the battery  ::) ...
And like every security system ive tried.
-German Kuznetsov
The impossible chemical compound.

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: Password Protection - Turn Off Calculator?
« Reply #13 on: March 06, 2015, 04:35:23 am »
But isn't that MirageOS thingy then gone once you clear the ram? Wouldn't it be thus more secure to have a program hooked on turning on with zstart?

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline c4ooo

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 252
  • Rating: +10/-1
  • The impossible chemical compound.
    • View Profile
Re: Password Protection - Turn Off Calculator?
« Reply #14 on: March 06, 2015, 07:08:41 pm »
I made a password app with axe and zstart before. Just do:
Code: [Select]
Asm(3E01D303FB76FDCB09A6C9)This powers the calc off and as soon as the on key is pressed the program will resume directly after this line.

I tied out your opcode, it does not really work. It does turn the calculator of, but the it just goes back to the OS, not to the next line of code. For example:
Code: [Select]

Clrhome
Disp("hello")
Asm(your opcode)
Disp("world")
Reapeat getkey
End

This will display "hello" but not "world". Mabey I have to enable some zstart settings.
-German Kuznetsov
The impossible chemical compound.