IUP Computer Science
CO 300 Spring 1998
Make a MACRO library that will allow a program written in modified BASIC, such as the one in PROJECT:AVERAGE.BAS, to be assembled, linked, and run on the VAX.
The accompaning handout describes how the BASIC statements are supposed to work. One macro is needed for each different BASIC statement, a macro that will expand into appropriate VAX assembly language instructions, directives, and which do the equivalent of the BASIC code. To help you get started and to avoid the macros that are trivial or messy, I am providing a file containing macros for the statements: PROGRAM, INTEGER, CHARACTER, BEGIN, OPEN, CLOSE, GO, and END. That leaves you to write macros for the statements: LET, IF, READ, and WRITE. My macros are in the file PROJECT:P6MACROS.MAR
You should copy PROJECT:P6MACROS.MAR to your own directory and add to it the macros for the other BASIC statements. Then, form a MACRO library with the completed P6MACROS.MAR file by using a command such as
$ LIBRARY/MACRO/CREATE P6MACROS P6MACROS
Copy the PROJECT:AVERAGE.BAS file and associated data file,
PROJECT:BOWLING.SCORES, to your directory. Using the library,
assemble the program in AVERAGE.BAS by using a command such as
$ MACRO AVERAGE.BAS+P6MACROS/LIBRARY
Then, link the resulting .OBJ file and run the .EXE file. After
the run, you should have a file called ABOVE.OUT in your directory
that holds the names of the people from the BOWLING.SCORES file who
have bowling scores that are above average. See the file
PROJECT:P6EXPECTED.OUT to see what should be in ABOVE.OUT.
Hand in a printout of P6MACROS.MAR (just print it) and a .LIS listing of AVERAGE.BAS. Also, copy the .EXE file you produced to the HANDIN: directory and name the file in HANDIN: after yourself (using your last name). For example, I would copy to HANDIN:WOLFE.EXE.