At this point, we are at the end of chapter 3. However now is a good time for a word or two about the project mentioned back in chapter 1 of this series.
Now that we are starting to understand a few more instructions and we are seeing small snippets of code. This is fine for as long as we need it, but it does not allow you to become confident in writing and understanding a fairly large program. I know, I had to learn as well even if it was a long time ago.
The project is what we shall be developing as this series progresses. We are going to write a program that is very useful for assembly language programmers - a disassembler !
The project will develop QLTdis and this will be a simple and hopefully easy to understand disassembler which will be developed of a number of issues and will be a very useful addition to your arsenal of assembler programming tools.
What tools are actually required for assembly programming ? I have written, in the past, a few articles for QL Today magazine giving a brief overview of assemblers, editors, disassemblers and monitors. These are the tools that you will need.
While it would be nice to be able to write an assembler, how would we manage to assemble it ? Hand coding in hex or binary is not easy and prone to errors. Of course, I could (?) write it and give you the hex code to feed into a hex loader, but what would you learn ? How to type hex numbers into a program is all, I suspect.
Ok, a disassembler is quite a big undertaking, how do we assemble it ? If you remember back to chapter 1, I mentioned that I had hoped to use George Gwilt's GWASS assembler for the series only to find that it will not run on a 68008. I lamented this fact and asked if anyone had a 'free' assembler that would run on the standard Ql's 68008 processor.
I then received an email from George Gwilt who offered his unpublished GWASSL assembler which will run on the 68008, so thanks to George, we can all have the same assembler. QLToday will be issuing the assembler on a future cover disc. If you cannot wait to get hold of a copy, it will soon be in the Quanta library.
In this series, I have not specified which of the many addressing modes are valid for each instruction, not have I specified the 'bit pattern' of the actual instruction (its hex code) there is a reason for this. It takes a lot of typing, is very boring and prone to error. George Gwilt, once again, comes to the rescue. Part of his GWDIS (a disassembler) package includes a file holding all the instructions, their op codes, the flags affected etc etc and George has also made this available to QLToday readers. Hopefully this file will also be on the cover disc.
So now we are armed with almost all we need to get the project underway - except an editor. Maybe Dilwyn will find room to put QED on the cover disc as well. (Over to you Dilwyn and company !!!!!)