/*********************************************************************/ /* SAMPLE.MAC: ICE-5100 Emulator sample macro file */ /*********************************************************************/ /* PROCEDURE STATUS: */ /* Displays emulation status information */ define proc STATUS = do define char basestr = 'HEX' /* Determin the current number base */ if base == 10y then basestr = 'BINARY' endif if base == 10t then basestr = 'DECIMAL' endif write using /* Display status information */ ('6C,"DYNASCOPE = ",0,30C,"ERROR = ",0,54C,"SYMBOLIC = ",0')& dynascope, error, symbolic write using ('6C,"SYNCSTART = ",0,30C,"TEMPCHECK = ",0,54C,"VERIFY = ",0')& syncstart, tempcheck, verify write using ('6C,"BASE = ",0') basestr end /* of STATUS */ /* PROCEDURE IESTAT: */ /* Displays the IE regiater in bit form */ /* with labels */ define proc IESTAT = do write' ' write' IE REGISTER ( interrupt enable ) ' write '' write & ' ENABLE PCA Timer2 Serial Timer1 Extrn1 Timer0 Extrn0' write & ' (EA) (EC) (ET2) (ES) (ET1) (EX1) (ET0) (EX0)' write & ' ---------------------------------------------------------------------' base = binary /* Set number dase to binary */ define char tmp = numtostr(IE) /* convert binary value to character string */ write' ', & substr(tmp,1t,1),' ',& /* Strip off individual bits in string */ substr(tmp,2t,1),' ',& /* write them with spaces between. */ substr(tmp,3t,1),' ',& substr(tmp,4t,1),' ',& substr(tmp,5t,1),' ',& substr(tmp,6t,1),' ',& substr(tmp,7t,1),' ',& substr(tmp,8t,1) write' ' base = hex /* Set number base to hex */ end /******** Helpfull LITERALLYs ********/ define literally DEF = 'define' define literally LIT = 'literally' define literally LEN = 'length' define literally ADR = 'address' define literally G0 = 'go from 0' define literally PN = 'print newest' define literally PA = 'print all' define literally BC = 'byte code' define literally BR = 'byte rdata' define literally BX = 'byte xdata' define literally REP = 'repeat' define literally INC = 'include' define literally CLS = 'curhome;cleareos' /* clear entire screen */