assemblydisassemblymnemonics

Interpreting assembly listing for a toy ISA in the Dhamdhere textbook


Consider the following assembler output listing:

START 100
MOVER BREG, ONE                                101) + 04 2 105 
MOVEM BREG, RESULT                             102) + 05 2 106
PRINT RESULT                                   103) + 10 0 106
STOP                                           104) + 00 0 000
ONE DC '1'                                     105) + 00 0 001
RESULT DS 1                                    106) 
  1. What does the + sign before code signifies?
  2. Why is the address of ONE given 001?
  3. Why is the entry after the last RESULT DS 1 statement left blank?

This listing appears in Systems Programming and Operating Systems by Dhamdhere (editor's note: as discovered by an answerer).


Solution

  • I don't know which assembler you are using (it might have beem sensible to give that information in your question) so these are not particularly well-informed answers:

    1. Don't know - what does your assembler's manual say
    2. It isn't - that's the value
    3. DS just reserves some space

    Edit: An assembler is a computer program that takes text containing assembly language and turns it into machine code. It can also produce output in human readble form, which is what the code you posted appears to be. The format of the human readble form is specific to the particular assembler (i.e. program) that you are using - it is not specific to the machine architecture the assembler emits machine code for.