I am wasting some time working on a new little x86 controller called Educake.
http://www.86duino.com/index.php?p=95
It has Com4; as a DB9 and can very easily be used with the following.
Firstly by putting
in the Autoexec.bat file and then in FBmode com4:9600,N,8,1,P
ctty com4
Code: Select all
PortIn = FreeFile
Open Cons For Input As #PortIn
PortOut = FreeFile
Open Cons For Output As #PortOut
Print #PortOut,"Please write something and press ENTER"
Line Input #PortIn,a
Print #PortOut, "You wrote : ";a
Close
Code: Select all
OPEN Com "COM4:9600,n,8,1,cs0,ds0,cd0,rs" FOR BINARY AS #4
As I have lots of Asm code going back 30+ Years, I converted some port config statements to FB
Dont ask me to explain the values.
Code: Select all
Out PortAddr+3,&H80
Out PortAddr,&H0C
Out PortAddr+1,0
Out PortAddr+3,0
Out PortAddr+3,&H3
Out PortAddr+1,0
Naam = "Com4: Open"
For Xq = 1 To Len(Naam)
Out PortAddr,Asc(Naam,Xq)
Next
If I can make this work correctly in Asm, what is wrong with FBDos that I cant get a very simple Open Com to work.
I understand that the processor is a SoC Vortex86 and may have it's oddities.
Regards