IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Clarification required in ASSEMBLER Instructions


IBM Mainframe Forums -> PL/I & Assembler
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Amit Goel1

New User


Joined: 02 Apr 2007
Posts: 1
Location: India

PostPosted: Tue May 15, 2007 1:09 pm
Reply with quote

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
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Tue May 15, 2007 2:43 pm
Reply with quote

Start with High Level Assembler for MVS & VM & VSE IBM Programmer?s Guide. Refer to the Bibliography for additional pointers and download a copy of the Principles of Operation.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed May 16, 2007 12:52 am
Reply with quote

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
View user's profile Send private message
bengtpelle

New User


Joined: 28 Aug 2006
Posts: 24
Location: St. Petersburg, FL

PostPosted: Wed May 16, 2007 3:46 am
Reply with quote

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
View user's profile Send private message
UmeySan

Active Member


Joined: 22 Aug 2006
Posts: 771
Location: Germany

PostPosted: Tue May 22, 2007 5:42 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> PL/I & Assembler

 


Similar Topics
Topic Forum Replies
No new posts Build dataset list with properties us... PL/I & Assembler 4
No new posts Finding Assembler programs PL/I & Assembler 5
No new posts How Can I Recall a Migrated Data Set ... PL/I & Assembler 3
No new posts step by step trace 4 ISPF dialog call... TSO/ISPF 17
No new posts Getting SOC4 while calling a Cobol DB... PL/I & Assembler 4
Search our Forums:

Back to Top