Assignment 9

50 points

Overview

In this assignment, you will write a macro. This will be tested with a driver program that will be provided.

You may find it useful to examine the material on macros in the textbook, Chapter 9, and the discussion in the Notes and Examples book, Chapter 19.


The macro is called STRLEN. Its purpose is to calculate the length of a C-style string. A C-style string is a character value ending with a byte of X'00'.

For example, if the string is X'C1C2C300', the length is 3. If the string is X'00', the length is 0.

STRLEN has two symbolic parameters, both positional:

The STRLEN macro should verify that each of its mandatory symbolic parameters is present. If a parameter is missing, the macro should print an informative error message using MNOTE and then MEXIT.

The STRLEN macro should not change the value of any of its parameters, and it should not change the values of any registers.


Job Control Language

Use the following Job Control Language (JCL) to execute Assignment 9 The fields described in lower case are the same as described in Chapter 2 of your Notes and Examples book. This JCL combines your macros with the driver program.

The driver program is a complete program. It begins with CSECT and ends with END. Do not supply anything other than your two macros.

//jobname JOB ,'your name',MSGCLASS=H
//STEP1   EXEC  PGM=ASSIST,PARM='MACRO=H'
//STEPLIB   DD  DSN=KC02293.ASSIST.LOADLIB,DISP=SHR
//SYSPRINT  DD  SYSOUT=*
//SYSIN     DD  * 
  Your Macro goes here.  The Macro must begin with 
  MACRO and a Prototype statement.  Your model
  statements follow and the Macro ends with MEND.
  (You should remove these four lines.)
//          DD DSN=KC02314.SPRING20.CSCI360.HW9DRVR,DISP=SHR
//FT05F001  DD DUMMY
//FT06F001  DD SYSOUT=*
//


Other Requirements

Document your macro completely. See pp 23-24 of Notes and Examples.