View previous topic :: View next topic
|
Author |
Message |
Amit Goel1
New User
Joined: 02 Apr 2007 Posts: 1 Location: India
|
|
|
|
Iam working on an asembler program. assembler is very new to me.I have strucked at some assembler instructions.Please clarify the following instructions
1. BNH -- what is the meaning of Branch on high instruction?
2 BNL
3 ANOP
4 MVC WSAFCDI,12(R2)-- what 12 signifies here?
5. USING SWAFCDST,R1 --- What does this using instruction signifies?
6. LM RE,RC,ILCSVRGR-- How does this multiple load instruction works?
7. OI TIMEKEY+L'TIMEKEY-1
8. MVC 250(250,R8),0(R8) how does this instruction works?
9. MVCL RE,R0
10. LTR R1,R1
11. S R1, R1 -- Why do we subtract registers? |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
There is a book from Murach Publishing written by Kevin McQuillen that is very good for people just starting in assembler. It begins from knowing nothing of assembler syntax and the instructions. Once you complete that book, the ibm reference manuals have more detail.
The ibm manuals are excellent for resolviing a question, but i do not believe them to be a good way to learn from scratch. |
|
Back to top |
|
|
bengtpelle
New User
Joined: 28 Aug 2006 Posts: 24 Location: St. Petersburg, FL
|
|
|
|
1. BNH -- what is the meaning of Branch on high instruction?
Branch if NOT High same as Low or Equal.
2 BNL
Branch if NOT Low same as High or Equal.
3 ANOP
A simple way to set a label on this instruction. It does nothing.
4 MVC WSAFCDI,12(R2)-- what 12 signifies here?
12 bytes after the address in R2
5. USING SWAFCDST,R1 --- What does this using instruction signifies?
It tells the assembler which base register to use.
6. LM RE,RC,ILCSVRGR-- How does this multiple load instruction works?
It wraps around, start ting with register RE-RF Then R0-RC
7. OI TIMEKEY+L'TIMEKEY-1,X'F0"
Invalid instruction. You need one byte after the -1. I added the X'F0'
Basically it it sets a numerical zone in the last byte of a field.
8. MVC 250(250,R8),0(R8) how does this instruction works?
It moves the 250 bytes pointed to by R8 to an area 250 bytes after the address in R8.
9. MVCL RE,R0
10. LTR R1,R1
Used to test if R1 is zero or not.
11. S R1, R1 -- Why do we subtract registers?
This is an invalid instruction. It should be an SR R1,R1.
It is a way to set the register to zero. |
|
Back to top |
|
|
UmeySan
Active Member
Joined: 22 Aug 2006 Posts: 771 Location: Germany
|
|
|
|
Hi !
There is only one quest open, nr. 9, MVCL RE,R0
Just to complete:
MVCL = Move Character Long
This instruction is the same as MVC. But it can be used to move fields greater than 255 bytes.
Format is MVCL R2,R4
First operand and second operand are register-pairs.
So R2 and R3, R4 and R5
Each of the specified registers in the command must be an even register that is used to designate an even-odd pair of registers. The contents of the field specified by R4 are moved to the field specified by R2.
R2 EVEN register - the last 3 bytes specify the address of the destination field. Adress in R2
R2 ODD register - the last 3 bytes specify the length of the destination field. Length in R3
R4 EVEN register - the last 3 bytes specify the address of the source field
Adress in R4
R4 ODD register - the last 3 bytes specify the length of the source field. The first byte is used as a pad character if the source field is shorter than the destination field. Length in R5
Regards , UmeySan |
|
Back to top |
|
|
|