Page 1 of 4

NOOB QUESTION: learning machine code

Posted: Thu Nov 18, 2021 5:32 pm
by TMD2003
Yes, yes, I know, someone's going to say "Dilwyn's got everything you need to know..." But let me stop you there. When I decided to dive headlong into Z80 machine code, the first thing I did was give Spectrum Computing the inquisition on what the finest text was to aid my learning. Was it Toni Baker's book that everyone knows about, was it William Tang's that I already had a hard copy of... or was it New Generation's interactive program with a try-it-all-for-yourself-and-it-won't-crash sandpit? (Hint: it was the latter).

So while I've already found something among Dilwyn's wares that has a huge long list of 68000 opcodes, what I haven't found is a "teach yourself 68000 assembler" text that comes recommended by those who know what they're talking about. I'm assuming there is one. Am I right?

Let's just say at this stage that there's something I could do in SuperBASIC easily enough, but I'd rather hide it away in machine code so it takes a determined bit of disassembly to crack...

Re: NOOB QUESTION: learning machine code

Posted: Thu Nov 18, 2021 8:02 pm
by dilwyn
My preferred learning reference was Andrew Pennell's book "Assembly Language Programming On The QL-Programming The 68008 Microprocessor". Out of print for many years now, it was originally published by Sunshine. You occasionally get second hand copies on sites like eBay and sellmyretro.com

Not sure of its legality, you can read a scanned copy at https://sinclairql.speccy.org/archivo/d ... alpsql.pdf

Once you've got started, the same author wrote the Sinclair QDOS Companion from Sunshine, although that's more of a reference guide than a learn assembler book.

Re: NOOB QUESTION: learning machine code

Posted: Thu Nov 18, 2021 8:10 pm
by Pr0f
you'll probably need more than one book - as there's 68000 assembly programming - and then there's the specific application of programmming 68008 code on the Sinclair QL.

The book Dilwyn mentions is a good one, for more general techniques I found the cybex "Programming the 68000" a useful guide.

There was also a good site called DTACK grounded - which is still available as a downloadable archive - lot's of trips and tricks. http://www.easy68k.com/paulrsm/dg/

Re: NOOB QUESTION: learning machine code

Posted: Thu Nov 18, 2021 8:14 pm
by Derek_Stewart
HI,

Why not read Norman's Assembley Magazine, really good read for upto date QL assembley language.

Re: NOOB QUESTION: learning machine code

Posted: Thu Nov 18, 2021 8:19 pm
by Pr0f
And with some good examples too :-)

Re: NOOB QUESTION: learning machine code

Posted: Thu Nov 18, 2021 10:04 pm
by tofro
One thing that is really advisable before you start torturing the real thing is Easy68k, a CPU simulator that was originally created to help teach students 68k machine code. Obviously, you will not be able to work with QDOS, but the first steps are way easier than on the real QL (or even an emulator).

Once you made yourself a bit more familiar with 68k assembly, you can always change to the real matter.

Re: NOOB QUESTION: learning machine code

Posted: Thu Nov 18, 2021 11:09 pm
by pjw

Re: NOOB QUESTION: learning machine code

Posted: Thu Nov 18, 2021 11:50 pm
by bwinkel67
Btw, this will also be a perfect time, while learning machine code, to port David Murray's Attack of the PETSCII Robots to the QL. Their have been ports now for many 6502 platforms since his original versions with the Pet and C64, but now there is a Spectrum one (Z80), an Amiga one (68000), and a Sega Genesis one (68000/Z80). The source is available for distribution.

Re: NOOB QUESTION: learning machine code

Posted: Thu Nov 18, 2021 11:51 pm
by M68008
tofro wrote:One thing that is really advisable before you start torturing the real thing is Easy68k, a CPU simulator that was originally created to help teach students 68k machine code. Obviously, you will not be able to work with QDOS, but the first steps are way easier than on the real QL (or even an emulator).
Easy68k binary output can also be converted to run on a QL/emulator.

Re: NOOB QUESTION: learning machine code

Posted: Fri Nov 19, 2021 10:19 am
by NormanDunbar
I'll just leave this here ....
https://github.com/NormanDunbar/QLAssem ... tober-2020

Cheers,
Norm.