<b>
;
;
;routine to get the key stroke status for two key roll over check.
;this maintains two active key strokes in the "key1" and "key2"
;variables. key2 is the second key down code. This routine should 
;be called periodically (about once each 10-30 milliseconds)
;
KEYfetch
        cjae     key1,#KEY_NONE,keyfet_d    ;there is no key 1
        mov      W,key1
        call     keycheck                   ;see if key1 still down
        jc       keyfet_a                   ;key 1 still down
;
        mov      key1,key2                  ;key 1 went away to copy 2 to 1
        mov      key2,#KEY_NONE
        jmp      keyfetch                   ;retest the new key 1
;
;processing section when key1 still down
keyfet_a
        cjae     key2,#KEY_NONE,keyfet_b    ;look for new key2 if none now
        mov      W,key2
        call     keycheck                   ;see if key2 still down
        jc       keyfet_x                   ;exit if key2 still down
;
keyfet_b
        call     keycode                    ;look for a new key2
        cjne     keycnt,key1,keyfet_c       ;skip if this is same as key1
        call     keynext                    ;look beyond the key1 bit
keyfet_c
        mov      key2,keycnt                ;save the "new" key 2 code
        jmp      keyfet_x
;
;processing section when no key so look for new one
keyfet_d
        call     keycode
        mov      key1,keycnt                ;save the "new" key 1 code
;
keyfet_x
        ret
</b>