Newbie: Where to start to learn QL assembly language?

Anything QL Software or Programming Related.
User avatar
drdtyc
ROM Dongle
Posts: 22
Joined: Mon Oct 01, 2018 10:09 pm

Newbie: Where to start to learn QL assembly language?

Post by drdtyc »

With so much free time at home during this covid pandemic, I am thinking of learning something new to keep my brain busy.

I have previous background in high level programming languages e.g. Fortran 77 and Coral 66 during early stage of my career as a programmer/engineer in England. I also have basic knowledge of how an Intel 8080 microprocessor works from my university training. But all the these are now hazy to me after more than three decades of unuse.

I am now inclined to take up QL assemby language programming as a self challenge. Where shall I get online help?

I need some reading material on
(1) Motorola 68000 microprocessor
(2) QL assembly language
(3) Simple examples of assemby programs
(4) Beginner's projects on QL assemby langauge (hopefully with hints).
Last edited by drdtyc on Mon Jul 27, 2020 9:31 pm, edited 1 time in total.


User avatar
tofro
Font of All Knowledge
Posts: 2685
Joined: Sun Feb 13, 2011 10:53 pm
Location: SW Germany

Re: Newbie: Where to start to learn QL assembly language?

Post by tofro »

You will definitely want to start here.
And then continue there

And you definitely want to look in Norm's excellent write-ups on QL Assembler.
Next you want a book on QDOS System calls - The official one is the "QL Technical Guide"
And next you definitely want an editor/assembler/linker setup - Norman will recommend GWASL/GWASS (Which is excellent), I'd recommend the "real thing", the GST/Quanta Macro Assembler (can all be had from the above site)


ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
User avatar
NormanDunbar
Forum Moderator
Posts: 2251
Joined: Tue Dec 14, 2010 9:04 am
Location: Leeds, West Yorkshire, UK
Contact:

Re: Newbie: Where to start to learn QL assembly language?

Post by NormanDunbar »

tofro wrote:And then continue there
To be sure to get the latest version, at any time, use this URL instead, then download the pdf file.

latest


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
Sparrowhawk
Super Gold Card
Posts: 624
Joined: Wed Dec 15, 2010 12:33 pm
Location: @131072
Contact:

Re: Newbie: Where to start to learn QL assembly language?

Post by Sparrowhawk »

Assembly language is very, very simple.
- Chapter 1, Section 1.


I loved this line when I started going through this book. It's the calming equivalent of Don't Panic! on the HHGTTG :)


a.k.a. Jean-Yves
User avatar
NormanDunbar
Forum Moderator
Posts: 2251
Joined: Tue Dec 14, 2010 9:04 am
Location: Leeds, West Yorkshire, UK
Contact:

Re: Newbie: Where to start to learn QL assembly language?

Post by NormanDunbar »

Sparrowhawk wrote:
Assembly language is very, very simple.
- Chapter 1, Section 1.
I loved this line when I started going through this book. It's the calming equivalent of Don't Panic! on the HHGTTG :)
:D

When I wrote the original article in QL Today, I figured I better [mis]lead the reader in gently! ;)

Seriously, it is simple. Each instructions does one simple thing. The hard part is figuring out which combination of simple things go together to make a complicated thing!


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
Ruptor
Gold Card
Posts: 418
Joined: Fri Dec 20, 2019 2:23 pm
Location: London

Re: Newbie: Where to start to learn QL assembly language?

Post by Ruptor »

NormanDunbar wrote:Seriously, it is simple. Each instructions does one simple thing. The hard part is figuring out which combination of simple things go together to make a complicated thing!
Yes it is just a matter of moving '1' and '0' about in the right sequence and yet people don't seem to be able to write bug free software. :lol: Then the excuses come out "it was the compiler that inherited a bug from the assembler that inherited it from the microcode etc"
I wouldn't waste time on old hat architectures that you have trouble buying you would be better off learning the RPi that leads to other ARM based systems like phones or simple architectures like the 8 or 16 bit PICs, all very useful.


User avatar
NormanDunbar
Forum Moderator
Posts: 2251
Joined: Tue Dec 14, 2010 9:04 am
Location: Leeds, West Yorkshire, UK
Contact:

Re: Newbie: Where to start to learn QL assembly language?

Post by NormanDunbar »

Hi Ruptor,
Ruptor wrote:I wouldn't waste time on old hat architectures that you have trouble buying you would be better off learning the RPi that leads to other ARM based systems like phones or simple architectures like the 8 or 16 bit PICs, all very useful.
Have you seen ARM assembly code? It's all "frack to bont" (back to front). You move something from the source to the destination and that's how (I think) it should be written, not ARM! Or indeed, not AVR 8 bit microcontrollers either, they are the wrong way around too. Most confusig after years of messing about with 68000 stuff. It seriously does my head in. :(

I'm working/playing with 32 bit ARM microcontrollers at the moment..........


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
tofro
Font of All Knowledge
Posts: 2685
Joined: Sun Feb 13, 2011 10:53 pm
Location: SW Germany

Re: Newbie: Where to start to learn QL assembly language?

Post by tofro »

Ruptor wrote: I wouldn't waste time on old hat architectures that you have trouble buying you would be better off learning the RPi ...
That sentence probably entitles you to a lifetime ban from this forum ;)

Seriously: ARM assembly is definitely not something you want to learn. Even if difficult, 68k assembly is much easier to learn than ARM.
Last edited by tofro on Tue Jul 28, 2020 1:49 pm, edited 1 time in total.


ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
User avatar
Pr0f
QL Wafer Drive
Posts: 1298
Joined: Thu Oct 12, 2017 9:54 am

Re: Newbie: Where to start to learn QL assembly language?

Post by Pr0f »

Also - if you think pic assembly is easy - it is until you want to do subtraction - then it's far from intuitive :-)


User avatar
Ruptor
Gold Card
Posts: 418
Joined: Fri Dec 20, 2019 2:23 pm
Location: London

Re: Newbie: Where to start to learn QL assembly language?

Post by Ruptor »

Hi Guys
Yes as you say there is not much point in learning assembler on modern chips because the compilers are so good at optimising and they are so fast. All the assembly code I have done is on 8 or 16 bit chips starting on Z80 then 6800 then 8051 that as you say Norm swapped everything around. The last 8051 program was 48K that was all code no tables or data blocks. The PIC Hitech compiler that we moved on to was magic in terms of optimisation that you could use as an encryption machine because on disassembly you couldn't tell what the code was doing. It seemed to find bits of code that were the same and use them all over the place blowing structured code out the window. :shock: These days they write code for weight don't they? Assembler is two compact and fast for people to handle. :lol:


Post Reply