TITLE "Demo of a complex macro" USE "hawk.h" ; a smart macro for loading a constant -- uses either LIS, LIL, or LIL/ORIS MACRO LOADI =r,=c IF ((c < #7F) & (c > -#80)) LIS r, c ELSEIF((c < #7FFFFF) & (c > -#800000)) LIL r, c ELSE LIL r, c >> 8 ORIS r, c & #FF ENDIF ENDMAC ; demo of the use of the macro. play with the constants to see what it does ; goal R3 = C1 + C2 LOADI R4, #0123 LOADI R3, #76 ADD R3,R3,R4 END