Advertisement
Ham62

QB Multikey

Feb 1st, 2017
534
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
QBasic 1.44 KB | None | 0 0
  1. FUNCTION iMultikey% (iKey%)
  2.   DEF SEG = &HB000
  3.   iKey2% = iKey% AND 255
  4.   iMultikey% = ((PEEK(iKey2%) AND PEEK(iKey2% + 256)) = 0)
  5. END FUNCTION
  6.  
  7. SUB InitKeyboard
  8.   DIM lKeys(172) AS LONG, I AS INTEGER
  9.   FOR I = 0 TO 127: lKeys(I) = &H80808080: NEXT I
  10.   lKeys(128) = &H60EC8B55: lKeys(129) = &H8BFA061E: lKeys(130) = &H76C5066E
  11.   lKeys(131) = &HB000B800: lKeys(132) = &HAFB9C08E: lKeys(133) = &HF3FF3302
  12.   lKeys(134) = &H33D88EA4: lKeys(135) = &H3515B8F6: lKeys(136) = &HC08C21CD
  13.   lKeys(137) = &HC23BDA8C: lKeys(138) = &H7507406A: lKeys(139) = &HA1266607
  14.   lKeys(140) = &HBEB00B5: lKeys(141) = &H10E0C166: lKeys(142) = &H2666C38B
  15.   lKeys(143) = &H6600B5A3: lKeys(144) = &H2908489: lKeys(145) = &H25C948D
  16.   lKeys(146) = &HCD2515B8: lKeys(147) = &HCD62B421: lKeys(148) = &H1E892621
  17.   lKeys(149) = &H7FB00B3: lKeys(150) = &HCB5D611F: lKeys(151) = &H4FFC809C
  18.   lKeys(152) = &H1E602C75: lKeys(153) = &HB41F406A: lKeys(154) = &H3921CD62
  19.   lKeys(155) = &HE800B31E: lKeys(156) = &H755B0000: lKeys(157) = &H3C00B426
  20.   lKeys(158) = &H2E1974E0: lKeys(159) = &H447C6: lKeys(160) = &H8025D803
  21.   lKeys(161) = &H2ED82B00: lKeys(162) = &HFD8E8788: lKeys(163) = &HEA9D611F
  22.   lKeys(164) = &HFFFFFFFF: lKeys(165) = &H447C62E: lKeys(166) = &HC6F1EB01
  23.   lKeys(167) = -&HFFFF4CFA: lKeys(168) = &H1E578B2E: lKeys(169) = &H205F8E2E
  24.   lKeys(170) = &HCD2515B8: lKeys(171) = &HDDEB21
  25.  
  26.   DEF SEG = VARSEG(lKeys(0))
  27.   CALL ABSOLUTE(lKeys(), VARPTR(lKeys(0)) + 512)
  28. END SUB
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement