$regfile = "m32def.dat" $crystal = 8000000 Config Lcdpin = Pin , Db4 = Pinb.1 , Db5 = Pinb.2 , Db6 = Pinb.3 , Db7 = _ Pinb.4 , Rs = Pinb.6 , E = Pinb.5 Config Lcd = 16 * 2 Config Keyboard = Pind.2 , Data = Pind.3 , Keydata = Keydata 'clock=pind.2 , data=pind.3 Dim K As Byte , C1 As Byte Declare Sub Keyp Declare Sub Rep16 'K = 1 Waitms 100 Cls L1: Home Upper Lcd " " Locate 1 , 1 Call Rep16 Lowerline Lcd " " Locate 2 , 1 Call Rep16 jmp l1 End 'end program Sub Rep16 For C1 = 1 To 16 Call Keyp Next C1 End Sub Rep16 Sub Keyp K = Getatkbd() Select Case K: Case 50: Lowerline Case 56: Home Case 44: Cls Home Case 52: Shiftcursor Left Case 54: Shiftcursor Right Case 13: Lowerline Case 9: Shiftcursor Right , 4 Case 8: Shiftcursor Left Lcd " "; Shiftcursor Left Case Else Lcd String(1 , K) End Select End Sub Keyp Keydata: 'normal keys lower case Data 0 , 0 , 0 , 0 , 0 , 0 , 0 , 27 , 0 , 0 , 0 , 0 , 9 , 9 , &H5E , 0 Data 0 , 0 , 0 , 0 , 0 , 113 , 49 , 0 , 0 , 0 , 122 , 115 , 97 , 119 , 50 , 0 Data 0 , 99 , 120 , 100 , 101 , 52 , 51 , 0 , 0 , 32 , 118 , 102 , 116 , 114 , 53 , 0 Data 0 , 110 , 98 , 104 , 103 , 121 , 54 , 7 , 8 , 44 , 109 , 106 , 117 , 55 , 56 , 0 Data 0 , 44 , 107 , 105 , 111 , 48 , 57 , 0 , 0 , 46 , 45 , 108 , 48 , 112 , 43 , 0 Data 0 , 0 , 0 , 0 , 0 , 92 , 0 , 0 , 0 , 0 , 13 , 0 , 0 , 92 , 0 , 0 Data 0 , 60 , 0 , 0 , 0 , 0 , 8 , 0 , 0 , 49 , 0 , 52 , 55 , 0 , 0 , 0 Data 48 , 44 , 50 , 53 , 54 , 56 , 0 , 0 , 0 , 43 , 51 , 45 , 42 , 57 , 0 , 0 'shifted keys upper case Data 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 Data 0 , 0 , 0 , 0 , 0 , 81 , 33 , 0 , 0 , 0 , 90 , 83 , 65 , 87 , 34 , 0 Data 0 , 67 , 88 , 68 , 69 , 0 , 35 , 0 , 0 , 32 , 86 , 70 , 84 , 82 , 37 , 0 Data 0 , 78 , 66 , 72 , 71 , 89 , 38 , 0 , 0 , 76 , 77 , 74 , 85 , 47 , 40 , 0 Data 0 , 59 , 75 , 73 , 79 , 61 , 41 , 0 , 0 , 58 , 95 , 76 , 48 , 80 , 63 , 0 Data 0 , 0 , 0 , 0 , 0 , 96 , 0 , 0 , 0 , 0 , 13 , 94 , 0 , 42 , 0 , 0 Data 0 , 62 , 0 , 0 , 0 , 8 , 0 , 0 , 49 , 0 , 52 , 55 , 0 , 0 , 0 , 0 Data 48 , 44 , 50 , 53 , 54 , 56 , 0 , 0 , 0 , 43 , 51 , 45 , 42 , 57 , 0 , 0