lurkio wrote:I think that'll delay the program indefinitely in BeebEm
But I thought you wanted
the program delayed indefinitely? (-8
OKOK, just not at that point in the code.
If you really can't get the emulators fixed, an alternative would be to write a small assembly shim which sits on KEYV. I've not tested this, but...
Code: Select all
LDA KEYV : STA previous+1
LDA KEYV+1 : STA previous+2
LDA #our_handler DIV 256 : STA KEYV
LDA #our_handler MOD 256 : STA KEYV+1
\ C=0,V=0: enquiry for state of shift and ctrl keys
\ Shift has been released, so detach ourselves
PHA : PHP
LDA previous+1 : STA KEYV
LDA previous+2 : STA KEYV+1
PLP : PLA
CLV \ Pretend shift is not pressed
JMP &0000 \ Will contain the previous KEYV claimant
That would behave as though shift wasn't pressed, until the next time the OS observed the shift key had been released. Then the routine would vanish without trace, leaving the shift key operating normally.