Make a MACRO library that will allow a program written in IBM mainframe assembly language, such as PROJECT:AVERAGE.BAL, to be assembled, linked, and run on the VAX.
The accompaning handout describes how the IBM instructions, directives, and macros are supposed to work. You must make one macro for each IBM instruction, directive, and macro that will expand into appropriate VAX assembly language instructions, directives, and macros that do the equivalent of the IBM code. To help you get started and to avoid the macros that are trivial or messy, I am providing a file containing macros for IBM instructions: B, BR, D, and MVC; for the directives: CSECT, END, DS, and PICKIT (useful for DC and DS); and for the macros: OPEN, CLOSE, and PUT. This leaves you to write macros for L, ST, A, AR, S, CR, CVB, PACK, BP, BNE, DC, and GET. My macros can be found in the file PROJECT:IBM.MAR.
You should copy PROJECT:IBMF94.MAR to your directory and add to it the macros for the other IBM instructions/directives/macros. Then, form a MACRO library with the completed IBMF94.MAR file by using a command such as
$ LIBRARY/MACRO/CREATE IBMF94 IBMF94Copy the PROJECT:AVERAGE.BAL file and associated data file, PROJECT:SCORES.FILE, to your directory. Using the library, assemble the program in AVERAGE.BAL by using a command such as
$ MACRO AVERAGE.BAL+IBMF94/LIBRARYThen, link the resulting .OBJ file and run the .EXE file. After the run, you should have a file called AVERAGE.FOLKS in your directory that holds the same records as in SCORES.FILE but in sorted order.
Hand in a listing of IBM.MAR and a .LIS listing of AVERAGE.BAL. Also, copy the .EXE file you produced to H: and name the file in H: after yourself (using your last name). For example, I would copy to H:WOLFE.EXE.
Extra Credit
Change Program #5 so that it can read the data from a file. Have the program prompt for a file name. Let the
program read from the file and process text lines until end of file is reached.