12 MACRO PRINT =a 13 LIST +1 14 ; a 15 LIST -1 16 ENDMAC 17 18 TIMES 6,4 19 PRINT PRODUCT 19 ; 24 20 TIMES PRODUCT,2 21 PRINT PRODUCT 21 ; 48 22 ENDNotice that the macros don't generate any code! TIMES only sets the value of the assembly-time symbol PRODUCT, and PRINT generates a comment containing the value of PRODUCT!
Write a bus trap handler for this environment that allows a user to call a monitor procedur (for this example, allow calls to TIMES and don't worry about the others) while treating all other memory references as errors. The call to TIMES will have to be made by the trap handler!