Also Danke Sauerbruch für die hilfe
i wie hab ich das ganz durch probieren alleine hinbekommen die zipps waren trotzdem gut

hier jetzt mein endcode vill kannst du ja dann verstehen was ich vorhatte

PHP-Code:
$regfile "m168def.dat"
$crystal 8000000


Config Pinc.0 
Input
Config Pinc.1 
Input
Config Pinc.2 
Input
Config Pinc.3 
Input
Config Pinc.4 
Input
Config Pinc.5 
Input
Config Pind.2 
Input


Config Pinb.1 
Output
Config Pinb.2 
Output
Config Pind.5 
Output
Config Pind.6 
Output

Motor1 Alias Portb.1
Motor2 Alias Portb.2
Motor3 Alias Portd.5
Motor4 Alias Portd.6
Freischalten Alias Portd.7

Pind.2 
1


Enable Interrupts

Enable Pcint1
Enable Int0

On Pcint1 Pwm1
On Int0 Pwm2

Config Int0 
Falling
Pcmsk1 
= &B11111111

Config Timer1 
Pwm Pwm Compare A Pwm Clear Up Compare B Pwm Clear Up Prescale 8
'Config Timer0 = Pwm , Prescale = 1 , Compare A Pwm = Clear Up , Compare B Pwm = Clear Up

$eeprom                                                     '
EEprom beschreiben

Label1
:
Data 128 192 64
$data

Dim M 
As Byte
Dim N 
As Byte
Dim X 
As Byte
Dim Y 
As Byte
Dim A 
As Byte
Dim B 
As Byte
Dim C 
As Byte
Dim D 
As Byte
Dim E 
As Byte



0
0
0
0
0



Do


   
Readeeprom A M                                         'Auslesen der Daten aus dem EEprom und anschließende Ausgabe
   Compare1b = A



   Freischalten = 1

Loop

Pwm1:


   If Pinc.0 = 0 Then

      M = 2
      N = 2
      E = 1

   End If

   If Pinc.1 = 0 Then

      M = 1
      N = 1
      E = 1

   End If

   If Pinc.2 = 0 Then

      X = 2
      Y = 1
      E = 1

   End If

   If Pinc.3 = 0 Then

      M = 2
      N = 1
      E = 1

   End If

   If Pinc.4 = 0 Then

      M = 1
      N = 2
      E = 1

   End If

   If Pinc.5 = 0 Then

      X = 1
      Y = 2
      E = 1

   End If

Return

Pwm2:

   M = 0
   N = 0
   X = 0
   Y = 0

Return

End 
Lg der Balu