Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Keyboard code

Status
Not open for further replies.

qbasicking

Programmer
Aug 19, 2001
628
0
0
US
I am using a machine line in Qbasic. It is for a multiple key handler (Qbasic only supports one key at a time), but sometimes when I run it the Shift key is switched on and not turned off until it it pressed. Does anybody know why this is happening or how to fix it?

JMP 00020h
JMP 0042h
ADD [BX + SI], AL
ADD [BX + SI], AL
ADD [BX + SI], AL
ADD [BX + SI], AL
ADD [BX + SI], AL
ADD [BX + SI], AL
ADD [BX + SI], AL
ADD [BX + SI], AL
ADD [BX + SI], AL
ADD [BX + SI], AL
ADD [BX + SI], AL
ADD [BX + SI], AL
ADD [BX + SI], AL
PUSH DS
XOR AX, AX
MOV DS, AX
MOV SI, 00024h
PUSH CS
POP ES
MOV DI, 00014h
CLD
MOVSW
MOVSW
MOV BX, ES
MOV ES, AX
MOV DI, 00024h
MOV AX, 00056h
CLI
STOSW
MOV AX, BX
STOSW
STI
POP DS
RETF
PUSH DS
XOR AX, AX
MOV ES, AX
MOV DI, 00024h
MOV SI OOO14h
PUSH CS
POP DS
CLD
CLI
MOVSW
MOVSW
STI
POP DS
RETF
STI
PUSHF
PUSH AX
PUSH BX
PUSH CX
PUSH DX
PUSH DS
PUSH SI
PUSH ES
PUSH DI
IN AL, 060h
MOV AH, 01h
TEST AL, 00h
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top