Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Question in assembler coding

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler
View previous topic :: :: View next topic  
Author Message
futuremsk

New User


Joined: 20 Dec 2007
Posts: 10
Location: chennai

PostPosted: Thu Dec 20, 2007 1:11 pm    Post subject: Question in assembler coding
Reply with quote

Actually i am working in assembler for the past 3 months..
i got a program to work for... i didnt understand the coding which is below...

IF(WRKIT(5),EQ,ZERO5,CLC),AND,
(WRKIT+5(4),NE,ZERO4,CLC),AND,
(WRKIT+5(4),Z,TRTNUM,TRT),THEN

AP TABSSM,=P'1'
MVI SSRTNC,C'0'
ELSE
MVI SSFORM,C'C'
L R15,SSSAVE
CALL (15),SSWORK
EIF

Can anyone explain whats happening here...

WRKIT - its given as work area - CL100
ZERO5 - 00000
TRTNUM - DC 256X'FF'
ORG TRTNUM+C'0'
DC 10X'00'
ORG TRTNUM+256 [/b]
Back to top
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10211
Location: italy

PostPosted: Thu Dec 20, 2007 1:57 pm    Post subject: Reply to: can anyone clear my doubt soon in assembler coding
Reply with quote

which part You do not understand ???
the if tests for 3 conditions

1) five bytes of wrkit ( starting at offset 0/position 1) equal to "00000"
2) four bytes of wrkit ( starting at offset 5/position 6) NOT equal to "0000"
3) four bytes of wrkit ( starting at offset 5/position 6) numerics only
( thats what a properly written Translate-And-Test does )

if all the tree conditions are satisfied exec the the then path...

else exec the .....
Back to top
View user's profile Send private message
futuremsk

New User


Joined: 20 Dec 2007
Posts: 10
Location: chennai

PostPosted: Thu Dec 20, 2007 2:10 pm    Post subject: Reply to: can anyone clear my doubt soon in assembler coding
Reply with quote

thanks for your information... i didnt understand what will happen when the if condition is true & what will be if false.... since i dont know more abt assembler commands
Back to top
View user's profile Send private message
futuremsk

New User


Joined: 20 Dec 2007
Posts: 10
Location: chennai

PostPosted: Thu Dec 20, 2007 2:17 pm    Post subject: Reply to: can anyone clear my doubt soon in assembler coding
Reply with quote

What will the foll code do ?

IF (MSOCIN+15,EQ,C'P',CLI),THEN

DOPROC SETUNPK




e
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10211
Location: italy

PostPosted: Thu Dec 20, 2007 2:24 pm    Post subject: Reply to: can anyone clear my doubt soon in assembler coding
Reply with quote

the logic is a simple if then with only one statement for the then part

if the condition is true then ...

doproc is a call to an internal subroutine/procedure

look at the hlasm toolkit docs for the description of
the structured programming assembler macros ...
Back to top
View user's profile Send private message
futuremsk

New User


Joined: 20 Dec 2007
Posts: 10
Location: chennai

PostPosted: Thu Dec 20, 2007 2:33 pm    Post subject: Reply to: can anyone clear my doubt soon in assembler coding
Reply with quote

i didnt understand what is MSOCIN+15 ....
Back to top
View user's profile Send private message
futuremsk

New User


Joined: 20 Dec 2007
Posts: 10
Location: chennai

PostPosted: Thu Dec 20, 2007 2:35 pm    Post subject: Reply to: can anyone clear my doubt soon in assembler coding
Reply with quote

AP TABSSM,=P'1'

MVI SSRTNC,C'0'

ELSE

MVI SSFORM,C'C'

L R15,SSSAVE

CALL (15),SSWORK


IF U DONT MIND CAN YOU EXPLAIN THE FUNCTION OF EACH COMMMAND IN THE ABOVE PROGRAM IN SHORT .... IT WILL BE GOOD IF U SAY.... ADVANCE THANKS FOR YOU ENRICO.....
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10211
Location: italy

PostPosted: Thu Dec 20, 2007 2:38 pm    Post subject: Reply to: can anyone clear my doubt soon in assembler coding
Reply with quote

Quote:
Actually i am working in assembler for the past 3 months..


Quote:
didnt understand what is MSOCIN+15


it should be easy it' s one of the first advanced concepts taught in assembler classes

given that MSOCIN Is pointing to some memory address,
msocin+15 will point to an address 15 bytes higher

in pseodo mathematical notation

if msocin(1) is the first byte ...
msocin+15 will be
msocin(1+15) ... the sixteenth byte

as usually do not confuse the byte number with the offset
offset 0 is the first byte :-)
[/code]
Back to top
View user's profile Send private message
futuremsk

New User


Joined: 20 Dec 2007
Posts: 10
Location: chennai

PostPosted: Thu Dec 20, 2007 2:43 pm    Post subject: Reply to: can anyone clear my doubt soon in assembler coding
Reply with quote

thanks a lot enrico... iam very much thankful for you ....
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts A not very Christmassy PL/I tale, wit... prino PL/I & Assembler 3 Mon Dec 26, 2016 1:01 am
No new posts Fault Analyzer - listings question. egrove IBM Tools 4 Thu Aug 11, 2016 5:31 pm
No new posts dataset copy question - REPRO or some... atulxp TSO/ISPF 2 Wed Aug 03, 2016 10:56 pm
No new posts Online Assembler Program Starting point Aditya.Srivastava PL/I & Assembler 4 Fri Jul 08, 2016 6:48 pm
No new posts SQL Order By related question Joseph K Thomas DB2 8 Fri Mar 18, 2016 12:53 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us