Hi Derek,
Derek_Stewart wrote:I compiled the hello.pp file with:
fpc-ql -Tsinclairql -WQqhdr hello.pp
Which produced the output described and using Q-emulator, was abloe to execute the file 'hello.exe'
But the file 'hello.exe' would not execute in QPC2 or SMSQmulator, SMSQ/E still thinking it was a Type 0 or data file.
Back in Linux, I think you also use Mint? where the hello.exe file lives, do this:
You will get one of two responses:
- QDOS executable 'FPC_PROG' - in which case the file compiled with an XTCC trailer and will need processing to convert it from a normal type 0 file to an executable file.
- Data - in which case you should have an embedded header that QPC definitely understands and possibly Qemulator and others too.
I use QPC and when I compile with "-WQqhdr" I can execute them from my dos1_ drive, so I don't even have to copy them to a QL directory/device before executing. I'm running QPC 5.xx which is the latest from a couple of months ago.
This might give you a clue too. The header is in the first 32 or so bytes of the exe file. Try this:
You should see something like this:
Code: Select all
hexdump -C -n 48 sysvars.exe
00000000 5d 21 51 44 4f 53 20 46 69 6c 65 20 48 65 61 64 |]!QDOS File Head|
00000010 65 72 00 0f 00 01 00 00 33 c8 00 00 00 00 60 38 |er......3.....`8|
00000020 00 00 00 00 4a fb 00 08 46 50 43 5f 50 52 4f 47 |....J...FPC_PROG|
If you see this, then the file is definitely executable in QPC and was correctly compiled with the "-WQqhdr" option (which is also the default if no "-WQ" option is passed on the command line or in the config file.
The usual job header starts at address $20 in the above output. The executable header for emulators is in the first 32 bytes.
If you still have problems, can you zip up and post the hello.exe file that doesn't work for you and I'll check it out here. Thanks.
Cheers,
Norm.