turbo pascal
Hejsa jeg har lavet en converter som skal bruge flg. softawere, men jeg kan ikke finde ud af at compile koden til en exe fil er der en der har tid og forstand på dette og kan hjeælpe mig og maile en compilet version :O)dette er koden jeg skal execute
Program serial_adc;
Uses Crt;
Const
combase=$2f8; { I/O address of the COM port you are using }
MCR=combase+4;
LCR=combase+3;
MSR=combase+6;
Procedure Initialize_converter;
Begin
Port[MCR]:=3; { make DTR line to supply power and set CS input of chip to 1 }
Port[LCR]:=0; { set clock line of the chip to 0 }
End;
Function Read_value:byte;
Var
value:byte;
count:byte;
Begin
value:=0;
Port[MCR]:=1; { set CS down }
For count:=0 to 7 Do Begin { do the bit value eading 7 times }
value:=value SHL 1; { value=2*value }
Port[LCR]:=64; { clock line up }
If (port[MSR] and $10)=$10 Then Inc(value); { read the input data and update value }
Port[LCR]:=0; { clock line down }
End;
Port[MCR]:=3; { set CS up again }
Read_value:=value; { return the value }
End;
Begin
Initialize_converter; { call initialization routine }
Repeat
Writeln(Read_value); { call reading routine and print the value }
Until KeyPressed; { repeat until any key is pressed }
End.
