I was testing code on old machines today (and ran into some DOS issues that I'll have to post about later), and downloaded the latest FreeBASIC to see if it made any difference...
Nothing compiled with 1.01.0 runs on my NT4 machine (Pentium MMX). Even a "hello world" program fails with an illegal instruction 0xC000001D, Address 0x004012F0
FreeBASIC 1.01.0 - illegal instruction
-
- Posts: 8641
- Joined: May 28, 2005 3:28
- Contact:
Re: FreeBASIC 1.01.0 - illegal instruction
In case of DOS (i don't have NT4 or 95,98,me anymore)
I installed fbc 1.1 on dosbox with 486 enabled and fbc
print "hello"
sleep
fbc hello.bas
hello
outputs illegal instruction
but if i overwrite the default value of -arch
fbc -v -arch 386 hello.bas
fbc -v -arch 486 hello.bas
fbc -v -arch 586 hello.bas
fbc -v -arch 686 hello.bas
fbc -v -arch pentium-mmx hello.bas
all print "hello" and wait for a key
May be it works on your NT4 also.
Joshy
I installed fbc 1.1 on dosbox with 486 enabled and fbc
print "hello"
sleep
fbc hello.bas
hello
outputs illegal instruction
but if i overwrite the default value of -arch
fbc -v -arch 386 hello.bas
fbc -v -arch 486 hello.bas
fbc -v -arch 586 hello.bas
fbc -v -arch 686 hello.bas
fbc -v -arch pentium-mmx hello.bas
all print "hello" and wait for a key
May be it works on your NT4 also.
Joshy
Re: FreeBASIC 1.01.0 - illegal instruction
With FB 1.01.0 DOS, I can compile and run stuff no problem.
With FB 1.01.0 Win32, I can't compile or run stuff on the Pentium MMX. Not in NT3.51, not in NT4, not in Win98. But OS doesn't seem to be the issue anyway, because it worked fine everywhere else:
NT3.51 on a Pentium M
XP on a Pentium M
2000 on an Athlon XP
Win 7 32-bit on a Core 2
Using the -arch switch didn't seem to make a difference.
With FB 1.01.0 Win32, I can't compile or run stuff on the Pentium MMX. Not in NT3.51, not in NT4, not in Win98. But OS doesn't seem to be the issue anyway, because it worked fine everywhere else:
NT3.51 on a Pentium M
XP on a Pentium M
2000 on an Athlon XP
Win 7 32-bit on a Core 2
Using the -arch switch didn't seem to make a difference.
Re: FreeBASIC 1.01.0 - illegal instruction
Hm, I don't remember seeing that before. I'm wondering, does the same happen with other FB releases (e.g. FreeBASIC-1.00.0-win32)?
In general, it's probably related to the precompiled gcc/mingw-w64 libraries which have shown before that they don't play well with older Windows systems. Although, I'm not sure how it relates to older processors. Maybe they use some SSE2 instructions which the Pentium MMX didn't support (I'm not sure whether that's even correct), or something like that?
Does it work with the alternative FreeBASIC-1.01.0-win32-mingworg package? (That's made with a different gcc/mingw setup and used to work on older Windows systems, so possibly it could work in your case aswell)
In general, it's probably related to the precompiled gcc/mingw-w64 libraries which have shown before that they don't play well with older Windows systems. Although, I'm not sure how it relates to older processors. Maybe they use some SSE2 instructions which the Pentium MMX didn't support (I'm not sure whether that's even correct), or something like that?
Does it work with the alternative FreeBASIC-1.01.0-win32-mingworg package? (That's made with a different gcc/mingw setup and used to work on older Windows systems, so possibly it could work in your case aswell)
Re: FreeBASIC 1.01.0 - illegal instruction
I think even more basic, Pentium MMX doesn't support Pentium Pro/II instructions like cmov/sysenter/sysexit and SSE-1 (including prefetch* and some atomic (multi processor) primitives)
Solution: keep a watch on the dumpster, and soon you will have ten better systems. Then dump the MMX.
Solution: keep a watch on the dumpster, and soon you will have ten better systems. Then dump the MMX.
Re: FreeBASIC 1.01.0 - illegal instruction
Does FreeBASIC officially require Pentium Pro or Pentium III (SSE)? I was not aware of such a requirement, but if true then I won't waste my time running tests.
Re: FreeBASIC 1.01.0 - illegal instruction
I mostly said that because many GNU (and other) tools nowadays are compiled for 686+. The reason for that is because that processor introduced handling for damage control for branching in combination with deep pipelines that are still the same in modern processors.
FB's rtlib is C compiled, so codegeneration options there matter. Same for packaged utils (on windows) like make, LD and as, and gcc in cgen's case.
IOW 686 generated code should execute much better on modern processors than 586 code with its handcoded u-v pipelining model.
Most linux distributions won't even run on such systems anymore. I found out the hard way, because some low power x86 processors from other vendors (like VIA C3) were not ppro compatible even though they were more modern and faster, in the GHz range. Newer VIA processors (like Nano) are compatible and even 64-bit (and thus SSE2) though.
FB's rtlib is C compiled, so codegeneration options there matter. Same for packaged utils (on windows) like make, LD and as, and gcc in cgen's case.
IOW 686 generated code should execute much better on modern processors than 586 code with its handcoded u-v pipelining model.
Most linux distributions won't even run on such systems anymore. I found out the hard way, because some low power x86 processors from other vendors (like VIA C3) were not ppro compatible even though they were more modern and faster, in the GHz range. Newer VIA processors (like Nano) are compatible and even 64-bit (and thus SSE2) though.
Re: FreeBASIC 1.01.0 - illegal instruction
Pentium Pro cannot handle FreeBasic graphics since about version 18.DamageX wrote:Does FreeBASIC officially require Pentium Pro or Pentium III (SSE)? I was not aware of such a requirement, but if true then I won't waste my time running tests.
I think at least mmx is required, which Pentium Pro doesn't have.
Pentium 3 works OK.
I have not tested Pentium 2.
Re: FreeBASIC 1.01.0 - illegal instruction
http://freebasic.net/forum/viewtopic.ph ... 86#p204186DamageX wrote:I was testing code on old machines today (and ran into some DOS issues that I'll have to post about later), and downloaded the latest FreeBASIC to see if it made any difference ... Nothing compiled with 1.01.0 runs on my NT4 machine (Pentium MMX). Even a "hello world" program fails with an illegal instruction 0xC000001D, Address 0x004012F0
The illegal instruction is CMOVNTQ ... maybe it would work on NT4 (it works on ME again), but it doesn't work on P1, since libraries are apparently precompiled with "March=686/P3_with_CMOVNTQ". I haven't yet tested in what version the problem came up. But 1.00.0 and it's output don't run on ME, this somewhat limits the possibilities to test on old CPU's (try HX). I don't have NT4 to test.