I'm completely confused now
Longer ago i wrote a small program to simply download the avaiable amount of files from a given ftp server
i compiled it with the option "all Cpus" and tested it on three PC's and it worked fine.
I sent it to my friends and most of them had no problems cause it worked fine. Only 2 had troubles but i skipped it that time.
Now i wrote a small program and compiled it the same way which simply sends a short data sequence over a serial port is provided by the user.
I tested it and it worked fine and sent it to a colleague of mine.
It didn't work as it should on his computer using the same Windows version.
I rechecked it on all my avaiable computers: Old Laptop with Windows 7 , VM with Windows 7, newer laptop with Windows 10 , Intel XEON 8C with Windows 10 and Intel XEON 12C with Windows 10 and it worked fine.
At least the only difference is: ALL of my computers use INTEL CPU's but his an AMD CPU.
Remembering the problem with the ftp program i asked the two about their computer and the told me that both have AMD CPU's.
so for me the question is: is there a problem with PureBasic and AMD CPU or compiling on INTEL and running on AMD ?
i would be glad abou a response to solve that problem:
Compiler: PureBasic 6.0 x64
code:
Code: Select all
OpenConsole()
EnableGraphicalConsole(1)
Dim Databytes.a(150)
Databytes.a(0) = 126
Databytes.a(1) = 0
Databytes.a(2) = 161
Databytes.a(3) = 80
Databytes.a(4) = 159
Databytes.a(5) = 15
Databytes.a(6) = 1
Databytes.a(7) = 0
Databytes.a(8) = 252
Databytes.a(9) = 8
Databytes.a(10) = 1
Databytes.a(11) = 0
Databytes.a(12) = 212
Databytes.a(13) = 0
Databytes.a(14) = 3
Databytes.a(15) = 0
Databytes.a(16) = 0
Databytes.a(17) = 0
Databytes.a(18) = 0
Databytes.a(19) = 0
Databytes.a(20) = 0
Databytes.a(21) = 0
Databytes.a(22) = 0
Databytes.a(23) = 0
Databytes.a(24) = 0
Databytes.a(25) = 0
Databytes.a(26) = 0
Databytes.a(27) = 0
Databytes.a(28) = 159
Databytes.a(29) = 15
Databytes.a(30) = 2
Databytes.a(31) = 0
Databytes.a(32) = 0
Databytes.a(33) = 2
Databytes.a(34) = 0
Databytes.a(35) = 0
Databytes.a(36) = 0
Databytes.a(37) = 1
Databytes.a(38) = 0
Databytes.a(39) = 0
Databytes.a(40) = 0
Databytes.a(41) = 0
Databytes.a(42) = 0
Databytes.a(43) = 0
Databytes.a(44) = 0
Databytes.a(45) = 0
Databytes.a(46) = 0
Databytes.a(47) = 0
Databytes.a(48) = 0
Databytes.a(49) = 0
Databytes.a(50) = 0
Databytes.a(51) = 0
Databytes.a(52) = 0
Databytes.a(53) = 0
Databytes.a(54) = 0
Databytes.a(55) = 0
Databytes.a(56) = 0
Databytes.a(57) = 0
Databytes.a(58) = 0
Databytes.a(59) = 10
Databytes.a(60) = 0
Databytes.a(61) = 0
Databytes.a(62) = 0
Databytes.a(63) = 0
Databytes.a(64) = 0
Databytes.a(65) = 4
Databytes.a(66) = 0
Databytes.a(67) = 0
Databytes.a(68) = 11
Databytes.a(69) = 0
Databytes.a(70) = 252
Databytes.a(71) = 8
Databytes.a(72) = 8
Databytes.a(73) = 0
Databytes.a(74) = 252
Databytes.a(75) = 8
Databytes.a(76) = 6
Databytes.a(77) = 0
Databytes.a(78) = 0
Databytes.a(79) = 0
Databytes.a(80) = 0
Databytes.a(81) = 0
Databytes.a(82) = 0
Databytes.a(83) = 0
Databytes.a(84) = 0
csum.a = 0
For i = 1 To 83
csum.a = csum.a + Databytes.a(i)
Next
Databytes.a(84) = csum.a
Start:
ClearConsole()
ConsoleLocate (2,12)
Print("Bitte ComPort eingeben (z.b. com12) , eingabe mit 'ENTER' beenden : ")
Port$ = Input()
If OpenSerialPort(100, Port$, 9600, #PB_SerialPort_NoParity, 8, 1, #PB_SerialPort_NoHandshake , 1024, 1024)
ClearConsole()
ConsoleLocate (0,12)
PrintN (" Information: " + "Port erfolgreich geoeffnet !")
Else
ClearConsole()
ConsoleLocate (0,12)
PrintN(" Error , Port konnte nicht geoeffnet werden: " + Port$)
Print (" Bitte Enter-Taste druecken ")
Input()
Goto Start
EndIf
WriteSerialPortData(100, @Databytes(), 85)
CloseSerialPort(100)
ClearConsole()
ConsoleLocate (10,12)
Print("Die Beispiel-Daten wurden gesendet, bitte 'ENTER' druecken")
Port$ = Input()
End
// Code-Tags added (Kiffi)