So schauts jetzt aus und es funktioniert.
Danke an alle die mir geholfen haben!


'///////////////////////////////////////////////////////////////////////////////
'Die Taster 0,1,2,3 abfragen
' STK200 mit AT90S8515 und LCD- Display an PortC
'///////////////////////////////////////////////////////////////////////////////
$regfile = "8515def.dat"
$crystal = 4000000
Config Lcd = 20 * 4
Config Lcdmode = Port
Config Lcdbus = 4
Config Lcdpin = Pin , Db4 = Portc.4 , Db5 = Portc.5 , Db6 = Portc.6
Config Lcdpin = Pin , Db7 = Portc.7 , E = Portc.3 , Rs = Portc.2
Baud = 9600
Config Portd = Input
Config Portb = Output
'-- Alle Leds ausschalten. Wegen pullup ist 0= eingeschaltet
Set Portb.0
Set Portb.1
Set Portb.2
Set Portb.3
Set Portb.4
Set Portb.5
Set Portb.6
Set Portb.7
Cls
'///////////////////////////////////////////////////////////////////////////////
'Achtung Eingänge mit PIND einlesen!
'Wenn keine Taste gedrückt=255 . d.h. 0 wenn keine Taste betätigt
' Das sind die Möglichkeiten bei 4 Tastern
' 0 0 0 0 = 255
' 0 0 0 1 = 254
' 0 0 1 0 = 253
' 0 0 1 1 = 252
' 0 1 0 0 = 251
' 0 1 0 1 = 250
' 0 1 1 0 = 249
' 0 1 1 1 = 248
' 1 0 0 0 = 247
' 1 0 0 1 = 246
' 1 0 1 0 = 245
' 1 0 1 1 = 244
' 1 1 0 0 = 243
' 1 1 0 1 = 242
' 1 1 1 0 = 241
' 1 1 1 1 = 240
'///// HAUPPROGRAMM /////////////////////////////////////////////////////////
Zustand_eingaenge:
Do
If Pind = 255 Then Goto Kein_eingang_angesprochen

Eingang_angesprochen:
If Pind = 254 Then Goto E0
If Pind = 253 Then Goto E1
If Pind = 251 Then Goto E2
If Pind = 247 Then Goto E3
If Pind = 252 Then Goto E0_e1
If Pind = 250 Then Goto E0_e2
If Pind = 249 Then Goto E1_e2
If Pind = 248 Then Goto E0_e1_e2
If Pind = 246 Then Goto E0_e3
If Pind = 245 Then Goto E1_e3
If Pind = 244 Then Goto E0_e1_e3
If Pind = 243 Then Goto E2_e3
If Pind = 242 Then Goto E0_e2_e3
If Pind = 241 Then Goto E1_e2_e3
If Pind = 240 Then Goto E0_e1_e2_e3

E0:
Cls
Locate 1 , 1
Lcd "Eingang 0"
Wait 2
Goto Zustand_eingaenge

E1:
Cls
Locate 1 , 1
Lcd "Eingang 1"
Wait 2
Goto Zustand_eingaenge

E2:
Cls
Locate 1 , 1
Lcd "Eingang 2"
Wait 2
Goto Zustand_eingaenge

E3:
Cls
Locate 1 , 1
Lcd "Eingang 3"
Wait 2
Goto Zustand_eingaenge

E0_e1:
Cls
Locate 1 , 1
Lcd "Eingang 0 / 1"
Wait 2
Goto Zustand_eingaenge

E0_e2:
Cls
Locate 1 , 1
Lcd "Eingang 0 / 2"
Wait 2
Goto Zustand_eingaenge

E1_e2:
Cls
Locate 1 , 1
Lcd "Eingang 1 / 2"
Wait 2
Goto Zustand_eingaenge

E0_e1_e2:
Cls
Locate 1 , 1
Lcd "Eingang 0 / 1 / 2"
Wait 2
Goto Zustand_eingaenge

E0_e3:
Cls
Locate 1 , 1
Lcd "Eingang 0 / 3"
Wait 2
Goto Zustand_eingaenge

E1_e3:
Cls
Locate 1 , 1
Lcd "Eingang 1 / 3"
Wait 2
Goto Zustand_eingaenge

E0_e1_e3:
Cls
Locate 1 , 1
Lcd "Eingang 0 / 1 / 3"
Wait 2
Goto Zustand_eingaenge

E2_e3:
Cls
Locate 1 , 1
Lcd "Eingang 2 / 3"
Wait 2
Goto Zustand_eingaenge

E0_e2_e3:
Cls
Locate 1 , 1
Lcd "Eingang 0 / 2 /3"
Wait 2
Goto Zustand_eingaenge

E1_e2_e3:
Cls
Locate 1 , 1
Lcd "Eingang 1 / 2 / 3"
Wait 2
Goto Zustand_eingaenge

E0_e1_e2_e3:
Cls
Locate 1 , 1
Lcd "Eingang 0 / 1 / 3 / 3"
Wait 2
Goto Zustand_eingaenge

'///// WENN KEIN EINGANG ANGESPROCHEN ////////////////////////////////
Kein_eingang_angesprochen:
Cls
Lcd "Alle Eingange sind 0"
Wait 1
Loop
' Weiter im Programm ......
End