0 Members and 2 Guests are viewing this topic.
b_call _GetCSC CP skDel JP Z, Quit CP skYequ JP Z, presYequ CP skWindow JP Z, presWindow CP skZoom JP Z, presZoom CP skTrace JP Z, presTrace CP skGraph JP Z, presGraph in a,($04) bit 3,a jp z,Quit
LD A, %10111111 OUT (1), A IN A, (1) CP %11101111 Call Z, yequsprshow
ld a, $BF out (01), a ld a, (keyStates) ;for our case, this is a better option ld b, a ;than just putting nop \ nop ld c, 0 ;b is what was pressed last loop ;c is what is pressed this loop in a, (01) ;bits 0 to 4 are: ;graph, trace, zoom, window, y= rrca call nc, graphPressed rrca call nc, tracePressed rrca call nc, zoomPressed rrca call nc, windowPressed rrca call nc, yEquPressed ld a, c ld (keyStates), a jp anywheregraphPressed: push af set 0, c ;graph is pressed this time bit 0, b jr nz, graphIsHeld ;do stuff here for graph is being pressed ;remember not to kill bc jr graphDonegraphIsHeld: ;do stuff here for graph is being held ;again, don't kill bcgraphDone: pop af ret