Pascal Crosscompiler Advice

Anything QL Software or Programming Related.
User avatar
NormanDunbar
Forum Moderator
Posts: 2251
Joined: Tue Dec 14, 2010 9:04 am
Location: Leeds, West Yorkshire, UK
Contact:

Re: Pascal Crosscompiler Advice

Post by NormanDunbar »

Chain-Q wrote:If any of the above doesn't work how I described, that's a bug, please report and it will be fixed.
It's all fine, thanks. Derek needed to upgrade QPC to version 5.x to execute files created with the -WQqhdr option.

Cheers,
Norm.


Why do they put lightning conductors on churches?
Author of Arduino Software Internals
Author of Arduino Interrupts

No longer on Twitter, find me on https://mastodon.scot/@NormanDunbar.
User avatar
NormanDunbar
Forum Moderator
Posts: 2251
Joined: Tue Dec 14, 2010 9:04 am
Location: Leeds, West Yorkshire, UK
Contact:

Re: Pascal Crosscompiler Advice

Post by NormanDunbar »

mk79 wrote:At last! Somebody who actually listens to me :-D
I did promise to try it out! ;) Works perfectly. Thanks for the hint.

Cheers,
Norm.


Why do they put lightning conductors on churches?
Author of Arduino Software Internals
Author of Arduino Interrupts

No longer on Twitter, find me on https://mastodon.scot/@NormanDunbar.
Derek_Stewart
Font of All Knowledge
Posts: 3932
Joined: Mon Dec 20, 2010 11:40 am
Location: Sunny Runcorn, Cheshire, UK

Re: Pascal Crosscompiler Advice

Post by Derek_Stewart »

Hi,

I think everything is working, I can execute a QDOS cross-compiled Pascal programme in all emulators: Qemulator, QPC2 v5, SMSQmulator using the SFA device.

I think I need to read the documentation again, especially the Free Pascal documentation.

Without the saving of the corss-compiled programme with one of the above emulators, is there an extension that can be added to Minerva so that real QL hardware could access the compiled programme from a non-QL environment?


Regards,

Derek
User avatar
Peter
QL Wafer Drive
Posts: 1953
Joined: Sat Jan 22, 2011 8:47 am

Re: Pascal Crosscompiler Advice

Post by Peter »

Not 100% sure what you mean, but if you refer to executable transfer without emulator, you could use qxltools and QLWA image on SD card. Or, in case of the Q68, ethernet and TFTP. Both support the XTcc flag.


User avatar
mk79
QL Wafer Drive
Posts: 1349
Joined: Sun Feb 02, 2014 10:54 am
Location: Esslingen/Germany
Contact:

Re: Pascal Crosscompiler Advice

Post by mk79 »

Chain-Q wrote:2., there's -WQxtcc instead, which results in an XTcc style trailer (and the QHDR omitted), which means the cross compiled executable runs in QPC2 and SMSQmulator, and allows easy transfer to real hardware, without any further Q-emuLator magic or post processing (Fix me?).
Fix: :-) XTcc format was introduced by the XTC68 compiler. It is not supported natively by any emulator. The most common way to use it was a specially compiled version of the InfoZIP zip utility, which could recognise the trailer and generate a QL-style ZIP file with it. Nowadays there are probably a few more utilities that use it, after all it's very easy to consume. A few lines of BASIC are enough.

For QPC after long deliberation I have decided to support the header style introduced by QemuLator (and also adapted by SMSQmulator, though in a somewhat weird way). XTcc is not an option for this as it's too limiting and hurts performance even more.

All the best, Marcel


Derek_Stewart
Font of All Knowledge
Posts: 3932
Joined: Mon Dec 20, 2010 11:40 am
Location: Sunny Runcorn, Cheshire, UK

Re: Pascal Crosscompiler Advice

Post by Derek_Stewart »

Hi,

I forgot about the new QL networking facilities and was thinking of transfer of compiled programmes to a QL via a floppy disk. Clearly out of date and uneducated thinking.

I am sorry for being guilty of not reading all the documentation, I see the Q68 has the XTcc trailer support, so transfer to the Q68 over the ethernet will be no problems.

If the crosscompiled programme is required to be send to a QL running QDOS or Minerva, the easiest solution is to network the QL via QLUB to QPC2 v5, where QPC2 v5 as a network file server and adds the correct QDOS executable file header.

I suppose there would have to be a filter in QPC2 v5 to add the QODS header, or does QPC2 v5 add the header when the QL connects to the QLUB Network share?


Regards,

Derek
User avatar
mk79
QL Wafer Drive
Posts: 1349
Joined: Sun Feb 02, 2014 10:54 am
Location: Esslingen/Germany
Contact:

Re: Pascal Crosscompiler Advice

Post by mk79 »

Derek_Stewart wrote:I suppose there would have to be a filter in QPC2 v5 to add the QODS header, or does QPC2 v5 add the header when the QL connects to the QLUB Network share?
Not sure what you mean here. For SMSQ/E the header ist just "there" like on any normal QL device. And if the network layer handles the header, too (once QLUB is TK2 compatible this will be the case, but not yet I think) then it will just work.


martyn_hill
Aurora
Posts: 909
Joined: Sat Oct 25, 2014 9:53 am

Re: Pascal Crosscompiler Advice

Post by martyn_hill »

Hi Derek (and Marcel)!

Just for reference, even in its current state, the QLUB adapter plus the SBasic file-transfer implementation (SendFileMQ) happily manages QDOS file-headers such as would be needed to successfully transfer from QPC (or other emulator) to a native QL with any Task headers kept intact. This assumes that the source file is already on a QDOS medium or otherwise provided by, for example, QPC's new header management on non QDOS medium.

The same will of course apply equally once the work is complete on the TK2-compatible NET/FSERVE device driver (steadily progressing...)


User avatar
Peter
QL Wafer Drive
Posts: 1953
Joined: Sat Jan 22, 2011 8:47 am

Re: Pascal Crosscompiler Advice

Post by Peter »

If an emulator ist used anyway, the crosscompiled executables can also be transferred via SERNET, keeping the header.


User avatar
Peter
QL Wafer Drive
Posts: 1953
Joined: Sat Jan 22, 2011 8:47 am

Re: Pascal Crosscompiler Advice

Post by Peter »

Derek_Stewart wrote:I see the Q68 has the XTcc trailer support, so transfer to the Q68 over the ethernet will be no problems.
To precise, the recent TFTP programs have this XTcc trailer support: http://www.wlenerz.com/qlstuff/tftp.zip
Technically those programs are not Q68 specific, it is just the first native hardware where the required UDP driver support was released.

(Which reminds me that I forget to provide an ethernet card to someone wanting to extend this to the Q40/Q60.)


Post Reply