This is a way to the basics of digital calculation and base-conversion....

Why don't test your mind ?

Take a digit out of the Buffer (ASCII),
subtract "0" ($30),
take your Dummy-Variable, multiply it by 10, add the result from the last action...

Loop until there is an End or so....


f.eg.: (Quick and very dirty!)

Dummy=0
I=0
TakeThem:
Digit=Dummy[I]-$30:I=I+1
If (Digit>0) and (Digit<10) Then Dummy=Dummy*10+Digit:Goto TakeThem