INMC 80 News


May–September 1981, Issue 4

Page 52 of 71

Two more fields have appeared, the ‘address’ field and the ‘object’ field. The address field contains the address of the first byte of the instruction. The object field contains the byte or bytes which make up the particular instruction starting at the the address given, and for subsequent addresses to the start of the next instruction

Now to the assembled program itself, I’ve changed some of the label names. The main program loop has been called LOOP1, START would have been inappropriate, as the loop no longer goes back to the beginning of the program. Having called the main loop LOOP1, then it makes sense to change the label for the delay loop to LOOP2.

A ‘quirk’ of this particular assembler is that it requires a colon at the end of the label (to tell it where the label ends), except when the label is followed by an assembler directive (EQU or ORG). Some assemblers follow this convention, some don’t!! This assembler allows an assembler directive called ‘.Comment’, and this allows me to write a chunk of descriptive text about the program without having to put a semicolon at the start of each comment line. Notice that semicolons are still used to separate the mnemonics from comments though, it’s only provided for convenience. This assembler likes another assembler directive, an ‘END’ at the end of the program, some assemblers will chuck this out as an error.

See that I defined the characters I want to place on the screen as actual characters enclosed in quotes. Most assemblers will allow this, and it a nice practice to do this when you actually mean ‘Load A with a character’, as opposed to ‘Load A with a variable’. (To the casual glance, LD A,2AH could mean either). Assemblers will usually allow decimal numbers to be entered, and they will automatically convert them to HEX for you. Look where I load the B register in the DELAY subroutine. I put LD B,200, and the assembler took it as a decimal number because I left off the ‘H’ suffix. Another thing this particular assembler does (and many others don’t) is to print any two byte operands the ‘right way round’, this makes for easy reading of the assembled object code because it prints it the way you ‘think’, but remember, two byte operands are always entered low byte first, so the listed code this particular assembler prints is not exactly as it would appear when placed (or automatically assembled) in memory.

So that’s an assembler. The little counter at the top of the screen is down to 600 odd, so this is where it’s got to finish. It’s quite likely that there will be plenty of assembly listings in this issue. See if you can read them, by looking at the labels. You don’t have to think too hard about what the code is doing (will that be the next part of this never ending saga, I wonder), but given that the programmer has thought carefully about the structure of the program and chosen his labels wisely, it should make some sort of sense. The moral of this part of the story has been, think of your specifications, and think carefully about your choice of labels. You never know, you might not be the only one who will read your programs one day, so why make life difficult for the other fella?


On the following page is a chart showing the complete Nascom video memory map giving the Hex addresses. This drawing must have taken a great deal of time to prepare and many thanks to the originator. Unfortunately his name has been mislaid, but we’ll find it by the next issue.

Page 52 of 71