views:

148

answers:

2

Consider the following assembler output:

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 the address of ONE is given 001?
  3. Why the entry after the last RESULT DS 1 statement is left blank?

Note this is not homework - the questioner appears to be asking about something from a text book.

+2  A: 

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.

anon
what if i am using 8086
paragjain
The 8086 is a CPU - an assembler is a software package. Which assembler software package are you using?
anon
i m not using any assembler software package what, i meant is thatwhat if this machine instructions set is of 8086 microprocessor?i wrote this code from my course text book machine instruction format mentioned in book is1st one for sign 2 for opcode 1 for reg operand 3 for memory operand
paragjain
sorry - I don't understand. Which book are you talking about?
anon
in above assembler output at address 101 + is for sign04 is opcode for some instruction(in above for MOVER)2 is i think a register(may be B Register)105 is memory operand so what i m asking is that what does this sign is foris it machine architecture dependent and if yes what does it signifies
paragjain
its not my homework i m just trying to learn assembly language at a elementary level
paragjain
thanks for clarifying it in the question itself
paragjain
+3  A: 

This appears to be using the simple assembly language in Chapter 4 of Systems Program and Operation.

In the description of the opcode output, it says, "The sign is not a part of the instruction." A quick perusal of the text didn't reveal what it is part of, and all of the examples have "+" in that column.

Jim Mischel
its the same text that you linked in here just wanted to know the 3 things that i asked in my question......thanks
paragjain