home *** CD-ROM | disk | FTP | other *** search
/ POINT Software Programming / PPROG1.ISO / basic / bmag / blinkey.bas < prev    next >
Encoding:
BASIC Source File  |  1994-04-15  |  1.8 KB  |  52 lines

  1. '─ Area: F-QUICKBASIC ─────────────────────────────────────────────────────────
  2. '  Msg#: 427                                          Date: 13 Apr 94  15:37:06
  3. '  From: Jeff Root                                    Read: Yes    Replied: No 
  4. '    To: Eric Nadeau                                  Mark:                     
  5. '  Subj: Keyboard Lights
  6. '──────────────────────────────────────────────────────────────────────────────
  7. 'Eric Nadeau asked for help in making his keyboard lights
  8. 'flash on and off.  The following two little routines work
  9. 'on my 84-key keyboard.  I think that adding "POKE 151, n"
  10. 'wherever "POKE 23, n" appears will enable them to work on
  11. '101-key keyboards.  Poke the same value into both locations.
  12. 'Please let me know whether it actually works.  If it doesn't,
  13. 'it will be necessary to send the command byte ED followed by
  14. 'a data byte (value 0-7) to I/O port 64 hex.
  15. 'Warning: 101-keyboard lights will get out of synch with the
  16. 'lock status if you only do one poke and not both.
  17. 'The keyboard needs to be reset before the POKEs take effect.
  18. 'Just POKEing is not enough.  Doing an INKEY$ causes it to be
  19. 'reset, and that's what I do here.  Try pressing the lock
  20. 'keys while CYLON is running, and see what happens.
  21.  ' BLINKEY.BAS   Jeff Root   4-12-94
  22.  DEFINT A-Z
  23.  DEF SEG = 64
  24.  DO
  25.    FOR c = 0 TO 1
  26.      FOR b = 0 TO 1
  27.        FOR a = 0 TO 1
  28.          POKE 23, a * 16 + b * 32 + c * 64
  29.          IF INKEY$ > "" THEN POKE 23, 0: END
  30.          FOR delay = 1 TO 12000: NEXT
  31.        NEXT
  32.      NEXT
  33.    NEXT
  34.  LOOP
  35.  
  36.  ' CYLON.BAS   Jeff Root   4-12-94
  37.  DEFINT A-Z
  38.  DEF SEG = 64
  39.  POKE 23, 32
  40.  DO
  41.    a = (a MOD 96) + 48
  42.    FOR i = 1 TO 2
  43.      POKE 23, PEEK(23) XOR a
  44.      IF INKEY$ > "" THEN EXIT DO
  45.      FOR delay = 1 TO 6500: NEXT
  46.    NEXT
  47.  LOOP
  48.  POKE 23, 0
  49.