ST486DX - ASSEMBLER MACROSFOR SGS-THOMSON INSTRUCTIONS
45
A. ASSEMBLER MACROS FOR SGS-THOMSON INSTRUCTIONS
The include file SMICAM.INCprovides a complex set of macros which generate SMM opcodes
along with the appropriate mod/rmbytes. Inorder to function, the macros require that the labels
whichare accessed correspond to the specified segment. Thus segment overrides must be passedto
the macro as an argument.
Do not specify a segment override if the default segment for an address is being used. If an address
size override is used, a final argument of ‘1’ mustbe passedto the macro as well. Address size
overrides must be presented explicitly to preventthe assembler from generating them automatically
and breaking the macros.
;SMM Instruction Macros - SMIMAC.INC
;Macros which generate mod/rm automatically
svdc MACRO segover,addr,reg,adover
domac segover,addr,reg,adover,78h
ENDM
rsdc MACRO reg,segover,addr,adover
domac segover,addr,reg,adover,79h
ENDM
svldt MACRO segover,addr,adover
domac segover,addr,es,adover,7ah
ENDM
rsldt MACRO segover,addr,adover
domac segover,addr,es,adover,7bh
ENDM
svts MACRO segover,addr,adover
domac segover,addr,es,adover,7ch
ENDM
rsts MACRO segover,addr,adover
domac segover,addr,es,adover,7dh
ENDM
rsm MACRO
db 0fh,0aah
ENDM
;Sub-Macro used by the above macro
domac MACRO segover,addr,reg,adover,op
local place1,place2,count
count = 0
ifnb < adover >
count=count+1
endif
ifnb < segover >