A86: sqrt[key] and calc states


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

A86: sqrt[key] and calc states




ok, this question is a two parter:
1) How do I invoke an action using [sqrt]key if ALPHA [f1] is pressed?
(not simultaneously, but like a 2nd function)

2) How do I invoke the y= input screen? i know the current address is at
$C1B4, but how do i set it? (i have the calc states list, but i do not
know whether a call has to be used or not, I am assuming so)

here's what I have so far:

code:
.org _asm_exec_ram-2
code_start:
.db $8e,$28


 call $479f            ;pop op1
 ld a,($d625)        ;get saved a register (keypress)
 or a
 ret z				;leave if no keypress (speeds up OS)

 ld b,a
 bit 4,(iy+$12)
 jr z,end
 ld a,b
 cp $C2
 call z,$4A7E  ;this will be a calc state later but for now, i am using
ClLCD to test it.

end:
 cp a					;must set zero flag
 ret
code_end:

.end

Thanks in advance,
Justin TerAvest (aka Base_16)

base_16 @geocities.com