So format funktioniert alles wunderbar. (Fehler in der Ausgabe der Daten )

The Final Code:
Code:
$regfile = "m128def.dat"
$crystal = 16000000
$baud = 9600

Config Timer1 = Timer , Prescale = 256
Enable Timer1
On Timer1 Tini
Enable Interrupts

Dim Tresult As String * 8
Dim Dresult As String * 8

Dim D1 As String * 2
Dim D2 As String * 2
Dim D3 As String * 2
Dim S As String * 2
Dim Year As Byte
Dim Month As Byte
Dim Day As Byte
Dim Hour As Byte
Dim Minute As Byte
Dim Second As Byte

minute = 58

Do
 '....Hauptprogramm
Loop
End

Tini:
 Timer1 = 3036
 Second = Second + 1
 If Second = 60 Then Gosub Addminute
 If Minute = 60 Then Gosub Addhour
 If Hour = 24 Then Gosub Addday
 If Day = 30 Then Gosub Addmonth
 If Month = 12 Then Gosub Addyear


 D1 = Format(str(second) , "00")
 D2 = Format(str(minute) , "00")
 D3 = Format(str(hour) , "00")

 Tresult = D3 + ":" + D2 + ":" + D1

 Print Tresult
Return

Addminute:
 Minute = Minute + 1
 Second = 0
Return

Addhour:
 Hour = Hour + 1
 Minute = 0
Return

Addday:
 Day = Day + 1
 Hour = 0
Return

Addmonth:
 Month = Month + 1
 Day = 0
Return

Addyear:
 Year = Year + 1
 Month = 0
Return


Danke @ all wirklich super forum!


Mfg
Tobi

//EDIT: Ich geh nu au ins bett :erschöpf: