Page 1 of 1

Intel vs AMD

Posted: Tue Feb 21, 2023 9:37 am
by PitH
Hello,
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)

Re: Intel vs AMD

Posted: Tue Feb 21, 2023 11:15 am
by Caronte3D
If I remember well... the option "all Cpus" does nothing :?

Re: Intel vs AMD

Posted: Tue Feb 21, 2023 12:23 pm
by NicTheQuick
Please use code-tags.

Re: Intel vs AMD

Posted: Tue Feb 21, 2023 3:19 pm
by PitH
Caronte3D wrote: Tue Feb 21, 2023 11:15 am If I remember well... the option "all Cpus" does nothing :?
I don't know but all CPU's within the list are Intel types

Re: Intel vs AMD

Posted: Tue Feb 21, 2023 5:22 pm
by Bisonte
PitH wrote: Tue Feb 21, 2023 9:37 am At least the only difference is: ALL of my computers use INTEL CPU's but his an AMD CPU.
What is unfortunately always forgotten. EVERY computer is an individual.

A single click can change a system. Even if the hardware is identical,
the operating system is never the same (except for the version). A click here, a click there...
and on one computer something doesn't work that works on another.

In your case, you should rather pay attention to the installed software.
The virus scanner is usually the main cause, but there are also these "system tuning tools"
that basically cause more problems than they solve....

For testing : switching off the virus scanner on the AMD computer and then try to run the program.

Re: Intel vs AMD

Posted: Tue Feb 21, 2023 5:31 pm
by PitH
You are right, i forgot that.

thanks for bringing it back to my attention, i will give it a try.