Author Topic: ON break  (Read 12442 times)

0 Members and 1 Guest are viewing this topic.

Offline darklink.perry

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 16
  • Rating: +0/-0
    • View Profile
Re: ON break
« Reply #15 on: August 15, 2012, 03:40:27 pm »
If I use the ti83plus.inc file jacobly provided, it gives me errors for all B_CALLs. If I use the B_CALL $500B, it waits for a keypress, and then continues, breaking on ON.

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 #16 on: August 15, 2012, 03:45:33 pm »
Did you try adding
Code: [Select]
#define B_CALL(label) rst 28h \ .dw labelat the start of your code? (together with jacobly's .inc file), and do you call it with the brackets?
« Last Edit: August 15, 2012, 03:46:29 pm by ben_g »
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 #17 on: August 15, 2012, 03:48:46 pm »
If I add that, using your method returns the same, and using the provided include, all the B_CALLs return errors, all saying the same:
error: Macro B_CALL is missing arguments

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 #18 on: August 15, 2012, 03:55:08 pm »
How do you call them? Do you do
Code: [Select]
B_CALL(_ExampleBCALL)or
Code: [Select]
B_CALL _ExampleBCALLAlso, is your assembler case-sensitive? If so, you might want to check the case. Also, don't forget the underscore at the front of the label.
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 #19 on: August 15, 2012, 03:56:53 pm »
I use B_CALL _ExampleBCALL. And I use spasm.

Offline darklink.perry

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 16
  • Rating: +0/-0
    • View Profile
Re: ON break
« Reply #20 on: August 15, 2012, 04:02:59 pm »
Is there a way to test if GetCSC returns with no keys pressed?
As in, if no keys are pressed, will it set off a flag?
« Last Edit: August 15, 2012, 04:15:04 pm by darklink.perry »

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 #21 on: August 15, 2012, 04:40:19 pm »
Try doing B_CALL(_ExampleBCALL), and GetCSC sets a to 0 if no key was pressed.
« Last Edit: August 15, 2012, 04:41:17 pm by ben_g »
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 #22 on: August 15, 2012, 04:46:06 pm »
Okay, when I use the other style, it works, but it still breaks on ON.
How frustrating.

Offline darklink.perry

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 16
  • Rating: +0/-0
    • View Profile
Re: ON break
« Reply #23 on: August 15, 2012, 04:51:05 pm »
Okay, here's some code, if it helps.
.option BM_SHD = 2

.option bm_min_w = 96

#define B_CALL(label) rst 28h \ .dw label

#include "ti83plus.inc"

.org $9D93

.db t2ByteTok, tAsmCmp

      B_CALL(_RunIndicOff)
      ld hl, Splash_Screen
      ld de, plotsscreen
      ld bc, 768
      ldir
      
      B_CALL(_GrBufCpy)
      res onInterrupt,(iy+onFlags)
      B_CALL(_GetKeyRetOff)
      B_CALL(_ClrLCDFull)
      
      ret

Splash_Screen:

#include "images/logo.bmp"

Offline jacobly

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 205
  • Rating: +161/-1
    • View Profile
Re: ON break
« Reply #24 on: August 15, 2012, 04:52:47 pm »
The OS didn't actually interrupt your code.  If your code exits with onInterrupt,(iy+onFlags) set, then the break error automatically shows up after your program exits.

Edit: and the flag is automatically set when ON is pressed in B_CALL(_GetKey).

Edit 2: ...so all you have to do is put res onInterrupt,(iy+onFlags) before you return.
« Last Edit: August 15, 2012, 05:01:24 pm by jacobly »

Offline darklink.perry

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 16
  • Rating: +0/-0
    • View Profile
Re: ON break
« Reply #25 on: August 15, 2012, 04:54:43 pm »
But it doesn't come up with a break error until I press ON. If I press any other button, then it shows the error.

Offline darklink.perry

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 16
  • Rating: +0/-0
    • View Profile
Re: ON break
« Reply #26 on: August 15, 2012, 05:23:21 pm »
Aha! It works! Thank you SO MUCH!