A noob's guide to QL machine code
- NormanDunbar
- Forum Moderator
- Posts: 2436
- Joined: Tue Dec 14, 2010 9:04 am
- Location: Leeds, West Yorkshire, UK
- Contact:
Re: A noob's guide to QL machine code
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.
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.
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.
Author of Arduino Software Internals
Author of Arduino Interrupts
No longer on Twitter, find me on https://mastodon.scot/@NormanDunbar.
-
- Font of All Knowledge
- Posts: 4634
- Joined: Mon Dec 20, 2010 11:40 am
- Location: Sunny Runcorn, Cheshire, UK
Re: A noob's guide to QL machine code
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.
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.
Regards,
Derek
Derek
Re: A noob's guide to QL machine code
Just assemble to binary and load the binary. The assembler has no need to care about headers per se.
-
- Font of All Knowledge
- Posts: 4634
- Joined: Mon Dec 20, 2010 11:40 am
- Location: Sunny Runcorn, Cheshire, UK
Re: A noob's guide to QL machine code
what filetype does the assembler produce?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.
Regards,
Derek
Derek
Re: A noob's guide to QL machine code
@TMD2003, if you want to learn about assembler coding for QL systems from someone who knows, stick with Norm's ezine.
Per
I love long walks, especially when they are taken by people who annoy me.
- Fred Allen
I love long walks, especially when they are taken by people who annoy me.
- Fred Allen
-
- Font of All Knowledge
- Posts: 4634
- Joined: Mon Dec 20, 2010 11:40 am
- Location: Sunny Runcorn, Cheshire, UK
Re: A noob's guide to QL machine code
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?
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?
Regards,
Derek
Derek
- XorA
- Site Admin
- Posts: 1596
- Joined: Thu Jun 02, 2011 11:31 am
- Location: Shotts, North Lanarkshire, Scotland, UK
Re: A noob's guide to QL machine code
As the last thing in your asm program.
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.
Code: Select all
trailer:
dc.b 'X','T','c','c', 0, 0, 0, 0
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
In my opinion, yes it is. Extra data at the end of an executable hurts much less than at the beginning.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?
Re: A noob's guide to QL machine code
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.Peter wrote: Mon Dec 30, 2024 7:19 pmIn my opinion, yes it is. Extra data at the end of an executable hurts much less than at the beginning.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?
But XTcc is at least a method to potentially fix such accidents.
ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO