compJUNKIE
April 8th, 2009, 12:18 AM
Hello, I'm new to the forums and would like some help with the following JCL questions. The questions don't involve writing extensive code, but simple coding (basically a single line).
NOTE: I'm working with Assembly language with assist if that helps
Write code that: (you can assume EQU regs are in place and use literals, but write the MOST efficient code)
a) checks to see if the string STR contains the word CAT
b) checks to see if 0(R4) is a “G”
c) sets F1 (5 bytes) to packed decimal zero
d) adds 22 to R7
e) moves blanks to PLINE (80 characters)
f) calls an internal subroutine BUILD
g) compares a 4 byte packed number (PNUM) to see if is equal to 55
---------------------------------------------------------------------------------------
What I have so far (not entirely sure if my answers are correct)
a) C STR,=F’CAT’
b) C 0(R4),=F'G'
c) PACK F1(5),F2(0)
d) A R7,=F’22’
e) MVC PLINE,=CL80' '
f) BAL R10,BUILD
g) C PNUM(4),=F'55'
NOTE: I'm working with Assembly language with assist if that helps
Write code that: (you can assume EQU regs are in place and use literals, but write the MOST efficient code)
a) checks to see if the string STR contains the word CAT
b) checks to see if 0(R4) is a “G”
c) sets F1 (5 bytes) to packed decimal zero
d) adds 22 to R7
e) moves blanks to PLINE (80 characters)
f) calls an internal subroutine BUILD
g) compares a 4 byte packed number (PNUM) to see if is equal to 55
---------------------------------------------------------------------------------------
What I have so far (not entirely sure if my answers are correct)
a) C STR,=F’CAT’
b) C 0(R4),=F'G'
c) PACK F1(5),F2(0)
d) A R7,=F’22’
e) MVC PLINE,=CL80' '
f) BAL R10,BUILD
g) C PNUM(4),=F'55'