Author Topic: ON break  (Read 12443 times)

0 Members and 1 Guest are viewing this topic.

Offline darklink.perry

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 16
  • Rating: +0/-0
    • View Profile
ON break
« on: August 15, 2012, 02:03:17 pm »
Can anyone help me? I learned the basics of assembly language a couple days ago, and I'm building one of my first long term programs. I need to keep people from breaking with the on button (one of the reasons why I turned to asm!) ???

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: ON break
« Reply #1 on: August 15, 2012, 02:04:28 pm »
Isn't that automatically as the basic interpreter breaks on ON?
EDIT: And Axe programs also don't break on ON ;)
« Last Edit: August 15, 2012, 02:04:51 pm by Sorunome »

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

Offline darklink.perry

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 16
  • Rating: +0/-0
    • View Profile
Re: ON break
« Reply #2 on: August 15, 2012, 02:18:45 pm »
But the assembly program I've written can be broken by pressing On...

Offline parserp

  • Hero Extraordinaire
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1455
  • Rating: +88/-7
  • The King Has Returned
    • View Profile
Re: ON break
« Reply #3 on: August 15, 2012, 02:18:51 pm »
Yes, iirc the ON break is disabled automatically in asm.
But if you are familiar with BASIC I would strongly recommend you learn Axe Parser.
« Last Edit: August 15, 2012, 02:19:10 pm by parserp »

Offline darklink.perry

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 16
  • Rating: +0/-0
    • View Profile
Re: ON break
« Reply #4 on: August 15, 2012, 02:23:12 pm »
Actually, I have learned that a while ago, but I still wanted to use Assembly.

Offline ben_g

  • Hey cool I can set a custom title now :)
  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1002
  • Rating: +125/-4
  • Asm noob
    • View Profile
    • Our programmer's team: GameCommandoSquad
Re: ON break
« Reply #5 on: August 15, 2012, 02:23:40 pm »
I think he means that his asm program breaks when he presses ON. If you don't use any OS routines (bcalls)(some will still work, but try it to be sure, and do that ON AN EMULATOR), then you can take full control by disabeling interrupts (the di instruction). This makes the CPU only run your code, so it won't do anything like breaking on ON, displaying the run indicator, etc. BUT it will also stop detecting keys when you don't use direct input. There should be a flag for this too, but I don't know which one.
My projects
 - The Lost Survivors (Unreal Engine) ACTIVE [GameCommandoSquad main project]
 - Oxo, with single-calc multiplayer and AI (axe) RELEASED (screenshot) (topic)
 - An android version of oxo (java)  ACTIVE
 - A 3D collision detection library (axe) RELEASED! (topic)(screenshot)(more recent screenshot)(screenshot of it being used in a tilemapper)
Spoiler For inactive:
- A first person shooter with a polygon-based 3d engine. (z80, will probably be recoded in axe using GLib) ON HOLD (screenshot)
 - A java MORPG. (pc) DEEP COMA(read more)(screenshot)
 - a minecraft game in axe DEAD (source code available)
 - a 3D racing game (axe) ON HOLD (outdated screenshot of asm version)

This signature was last updated on 20/04/2015 and may be outdated

Offline darklink.perry

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 16
  • Rating: +0/-0
    • View Profile
Re: ON break
« Reply #6 on: August 15, 2012, 02:25:46 pm »
ben_g is exactly on the point. But does that mean that I really can't use any B_CALLs?

Offline aeTIos

  • Nonbinary computing specialist
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3915
  • Rating: +184/-32
    • View Profile
    • wank.party
Re: ON break
« Reply #7 on: August 15, 2012, 02:27:47 pm »
are you by any chance testing with mirageOS? iirc that has break on ON interrupt.
I'm not a nerd but I pretend:

Offline darklink.perry

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 16
  • Rating: +0/-0
    • View Profile
Re: ON break
« Reply #8 on: August 15, 2012, 02:28:26 pm »
I'm not using any shells. I'm just running it regularly.

Offline aeTIos

  • Nonbinary computing specialist
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3915
  • Rating: +184/-32
    • View Profile
    • wank.party
Re: ON break
« Reply #9 on: August 15, 2012, 02:30:38 pm »
hmm. Not totally sure but iirc bcall _getKey also breaks on ON. other than that i have no clue what could be causing this, never happened to me.
I'm not a nerd but I pretend:

Offline darklink.perry

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 16
  • Rating: +0/-0
    • View Profile
Re: ON break
« Reply #10 on: August 15, 2012, 02:31:59 pm »
I am in fact using B_CALL _getKey. I wanted to use GetCSC, but I want to detect if any key was pressed, and testing for each and every key would be inconvenient.

Offline jacobly

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 205
  • Rating: +161/-1
    • View Profile
Re: ON break
« Reply #11 on: August 15, 2012, 02:33:29 pm »
B_CALL(_GetKey) returns with a = 0 when the ON key is pressed.  In order to use it again you need to res onInterrupt,(iy+onFlags).  Unfortunately, 2nd+ON can still exit the program during a B_CALL(_GetKey).  Fortunately, you can use B_CALL(_GetKeyRetOff) (which is what Axe uses) which returns kOff when 2nd+ON is pressed.  There might still be a link-port-related way to exit the program, but I don't know for sure.

Offline darklink.perry

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 16
  • Rating: +0/-0
    • View Profile
Re: ON break
« Reply #12 on: August 15, 2012, 03:26:56 pm »
the GetKeyRetOff on compilation says it isn't a label or macro. if I throw out that command, it still does not stop the on key breakage.

Offline jacobly

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 205
  • Rating: +161/-1
    • View Profile
Re: ON break
« Reply #13 on: August 15, 2012, 03:28:57 pm »
Get a more complete ti83plus.inc.

Offline ben_g

  • Hey cool I can set a custom title now :)
  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1002
  • Rating: +125/-4
  • Asm noob
    • View Profile
    • Our programmer's team: GameCommandoSquad
Re: ON break
« Reply #14 on: August 15, 2012, 03:30:07 pm »
you can use B_Call($500B) instaed. It's the same.
My projects
 - The Lost Survivors (Unreal Engine) ACTIVE [GameCommandoSquad main project]
 - Oxo, with single-calc multiplayer and AI (axe) RELEASED (screenshot) (topic)
 - An android version of oxo (java)  ACTIVE
 - A 3D collision detection library (axe) RELEASED! (topic)(screenshot)(more recent screenshot)(screenshot of it being used in a tilemapper)
Spoiler For inactive:
- A first person shooter with a polygon-based 3d engine. (z80, will probably be recoded in axe using GLib) ON HOLD (screenshot)
 - A java MORPG. (pc) DEEP COMA(read more)(screenshot)
 - a minecraft game in axe DEAD (source code available)
 - a 3D racing game (axe) ON HOLD (outdated screenshot of asm version)

This signature was last updated on 20/04/2015 and may be outdated