BBS: Inland Empire Archive Date: 03-28-92 (10:49) Number: 115 From: MIKE LININGER Refer#: 105 To: STEVE CRAVER Recvd: NO Subj: RE: Shareware Time Lock Conf: (2) Quik_Bas
Steve Craver writes in a message on 24 Mar 92 to Richard Vannoy in QUIK_BAS: S. Craver> DEF SEG = 0 : Z& = PEEK(&H0417)*256& + PEEK(&H0418) : DEF SEG S. Craver> S. Craver> Bit Meaning (if set) S. Craver> 0 Right SHIFT S. Craver> Steve, I tried the code segment, but came up with different bits. could this be a BIOS related thing? --------------- Here is my sample test loop. This produces the same result on DTK 286/12 and Laser 486/20 and Laser 386/20 machines. CLS lp: DEF SEG = 0 z& = PEEK(&H417) * 256& + PEEK(&H418) DEF SEG LOCATE 1, 1 IF z& AND 1 THEN PRINT z& AND 1, "Ctrl Key Down" ELSE PRINT SPACE$(40) IF z& AND 2 THEN PRINT z& AND 2, "Alt Key Down" ELSE PRINT SPACE$(40) IF z& AND 4 THEN PRINT z& AND 4, "-------- 4 ????" ELSE PRINT SPACE$(40) IF z& AND 8 THEN PRINT z& AND 8, "-------- 8 ???? " ELSE PRINT SPACE$(40) IF z& AND 16 THEN PRINT z& AND 16, "Scroll Lock Key Pressed" ELSE PRINT SPACE$(40) IF z& AND 32 THEN PRINT z& AND 32, "Num Lock Pressed" ELSE PRINT SPACE$(40) IF z& AND 64 THEN PRINT z& AND 64, "Caps Lock Pressed" ELSE PRINT SPACE$(40) IF z& AND 128 THEN PRINT z& AND 128, "Insert Key Pressed" ELSE PRINT SPACE$(40) IF z& AND 256 THEN PRINT z& AND 256, "Right Shift Key Down" ELSE PRINT SPACE$(40) IF z& AND 512 THEN PRINT z& AND 512, "Left Shift Key Down" ELSE PRINT SPACE$(40) IF z& AND 1024 THEN PRINT z& AND 1024, "Right Ctrl Key Down" ELSE PRINT SPACE$(40) IF z& AND 2048 THEN PRINT z& AND 2048, "Left Alt Key Down" ELSE PRINT SPACE$(40) IF z& AND 4096 THEN PRINT z& AND 4096, "Scroll Lock Active" ELSE PRINT SPACE$(40) IF z& AND 8192 THEN PRINT z& AND 8192, "Num Lock Active" ELSE PRINT SPACE$(40) IF z& AND 16384 THEN PRINT z& AND 16384, "Caps Lock Active" ELSE PRINT SPACE$(40) IF z& AND 32768 THEN PRINT z& AND 32768, "Insert Active" ELSE PRINT SPACE$(40) IF z& AND 65536 THEN PRINT z& AND 65536, "------- 17 ???" ELSE PRINT SPACE$(40) IF LEN(INKEY$) THEN END GOTO lp --- COUNTERPoint 2.0 * Origin: Pointing from the Inner Sphere (1:226/20.21)
Books at Amazon:
Back to BASIC: The History, Corruption, and Future of the Language
Hackers: Heroes of the Computer Revolution (including Tiny BASIC)
Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution
The Advent of the Algorithm: The Idea that Rules the World
Moths in the Machine: The Power and Perils of Programming
Mastering Visual Basic .NET