A86: MenuLoop


[Prev][Next][Index][Thread]

A86: MenuLoop




Can someone please tell me what is wrong with key press loop?  Every time
I use it, when I press any key, it shuts off the calc.  Also, I'm kinda
new to asm, so if it is a stupid mistake, please don't flame me.  Also,
in this routine, what should var_a be?  Someone told me it should be
var_a = $001h, but I don't think that is right.  Thanks.  Bellow is the
routine.
	Pat

MenuLoop:
  EI
sys_loop1:
  HALT
  CALL 5371h
  OR A
  jr z,sys_loop1
  LD L,A
  ld A,L
  LD (var_a),A
  LD A,(var_a)
  LD D,A
  LD A,K_1
  CALL sys_test_equalb
  ld A,L
  CP 0
  JP Z,if_not_true_1
  JP Custom
if_not_true_1:
  LD A,(var_a)
  LD D,A
  LD A,K_2
  CALL sys_test_equalb
  ld A,L
  CP 0
  JP Z,if_not_true_2
  JP Power
if_not_true_2:
  LD A,(var_a)
  LD D,A
  LD A,K_3
  CALL sys_test_equalb
  ld A,L
  CP 0
  JP Z,if_not_true_3
  JP Alpha
if_not_true_3:
  LD A,(var_a)
  LD D,A
  LD A,K_4
  CALL sys_test_equalb
  ld A,L
  CP 0
  JP Z,if_not_true_4
  JP Fake
if_not_true_4:
  LD A,(var_a)
  LD D,A
  LD A,K_5
  CALL sys_test_equalb
  ld A,L
  CP 0
  JP Z,if_not_true_5
  JP Self
if_not_true_5:
  LD A,(var_a)
  LD D,A
  LD A,K_6
  CALL sys_test_equalb
  ld A,L
  CP 0
  JP Z,if_not_true_6
  JP Battery
if_not_true_6:
  JP MenuLoop
sys_test_equalb:
  CP D
  JR NZ,equalb_no
  LD L,1
  JR equalb_end
equalb_no:
  LD L,0
equalb_end:
  RET



	Thanks!

_____________________________________________________________________
You don't need to buy Internet access to use free Internet e-mail.
Get completely free e-mail from Juno at http://www.juno.com
Or call Juno at (800) 654-JUNO [654-5866]


Follow-Ups: