Подскажите, пожалуйста - где ошибка в коде?
$regfile = "m32def.dat" ' specify the used micro
$crystal = 8000000 ' used crystal frequency
$baud = 19200 ' use baud rate
$hwstack = 32 ' default use 32 for the hardware stack
$swstack = 10 ' default use 10 for the SW stack
$framesize = 40 ' default use 40 for the frame space
'$sim
'=================================
Config Lcdpin = Pin , Db4 = Portb.4 , Db5 = Portb.5 , Db6 = Portb.6 , Db7 = Portb.7 , E = Portb.1 , Rs = Portb.0
Config Lcd = 20 * 4
Config Debounce = 75
Config Int2 = Falling
Config Portc.2 = Input
Config Portc.3 = Input
Config Portc.4 = Input
Config Portc.5 = Input
Config Portc.6 = Input
Config Portb.2 = Input
'====ïåðåìåííûå äëÿ îïðîñà êëàâèàòóðû
Dim Keycode As Byte
'====îñíîâíîé öèêë================
On Int2 Button
Enable Interrupts
Enable Int2
Cursor Off
Do
Locate 1 , 1
Lcd Keycode
Keycode = 0
Loop
Button:
Do
If Pinc.2 = 0 Then
Keycode = 1
End If
If Pinc.3 = 0 Then
Keycode = 2
End If
If Pinc.4 = 0 Then
Keycode = 3
End If
If Pinc.5 = 0 Then
Keycode = 4
End If
If Pinc.6 = 0 Then
Keycode = 5
End If
Loop Until Keycode <> 0
Waitms 10
Gifr = 64
Return
End

сам.