Page 2 of 5
Re: A noob's guide to QL machine code
Posted: Sun Dec 29, 2024 7:59 am
by NormanDunbar
I have a somewhat irregular Assembly Language eMagazine over at:
https://github.com/NormanDunbar/QLAssem ... e/releases
where there are 11 or 12 issues ready to download for free.
The later issues include a Beginners' Corner where there are always details of how to assemble the code with QMAC and GWASS.
If executing GWASL gives you errors, I suspect you might have uncompressed it on a PC rather than in QDOS/SMSQ?
HTH
Cheers,
Norm.
Re: A noob's guide to QL machine code
Posted: Sun Dec 29, 2024 3:53 pm
by Derek_Stewart
Hi
Reading the QMAC assembler manual, section B 5.3 page 40, allows the use of ADD<length> <ea> <ea>
If <length> omitted .w assumed
How does rmac handle QDOS executable headers?
Note: rmac being an Atari assembler.
Re: A noob's guide to QL machine code
Posted: Sun Dec 29, 2024 4:33 pm
by spkr
Just assemble to binary and load the binary. The assembler has no need to care about headers per se.
Re: A noob's guide to QL machine code
Posted: Sun Dec 29, 2024 5:52 pm
by Derek_Stewart
spkr wrote: Sun Dec 29, 2024 4:33 pm
Just assemble to binary and load the binary. The assembler has no need to care about headers per se.
what filetype does the assembler produce?
Re: A noob's guide to QL machine code
Posted: Sun Dec 29, 2024 10:25 pm
by spkr
Binary m68k.
Re: A noob's guide to QL machine code
Posted: Sun Dec 29, 2024 11:12 pm
by pjw
@TMD2003, if you want to learn about assembler coding for QL systems from someone who knows, stick with Norm's ezine.
Re: A noob's guide to QL machine code
Posted: Mon Dec 30, 2024 6:43 pm
by Derek_Stewart
This topic also dicussed on the QL Discord channel.
It seems that adding an XTcc trailer at the end of the ctoss compliled program, and a QL emulator or QLTools will restore the executable header.
Is the XTcc trailer data the best way to restore executable header in QDOS/SMSQ/E?
Re: A noob's guide to QL machine code
Posted: Mon Dec 30, 2024 7:17 pm
by XorA
As the last thing in your asm program.
Code: Select all
trailer:
dc.b 'X','T','c','c', 0, 0, 0, 0
Or set an actual dataspace if you need it!
qlzip, qltools, mdvtool (I think), sQLux, Q-Emulator, QPC2 all support that to recreate the exe info inside QDOS.
Re: A noob's guide to QL machine code
Posted: Mon Dec 30, 2024 7:19 pm
by Peter
Derek_Stewart wrote: Mon Dec 30, 2024 6:43 pm
Is the XTcc trailer data the best way to restore executable header in QDOS/SMSQ/E?
In my opinion, yes it is. Extra data at the end of an executable hurts much less than at the beginning.
Re: A noob's guide to QL machine code
Posted: Mon Dec 30, 2024 8:24 pm
by tofro
Peter wrote: Mon Dec 30, 2024 7:19 pm
Derek_Stewart wrote: Mon Dec 30, 2024 6:43 pm
Is the XTcc trailer data the best way to restore executable header in QDOS/SMSQ/E?
In my opinion, yes it is. Extra data at the end of an executable hurts much less than at the beginning.
Well, the
best method is not to loose them headers at all in the first place. I think every halfway decent QL user should be aware that unzipping on everything else but a QDOSSMSQ system is a big no-no. In my opinion, any method to make them forget this awareness is somewhat counter-productive and not much more than a kludge.
But XTcc is at least a method to potentially fix such accidents.