给出宏定义如下: DIF MACRO X,Y MOV AX,X SUB AX,Y ENDM ABSDIF MACRO V1,V2,V3 LOCAL CONT PUSH AX DIF V1,V2 CMP AX,0 JGE CONT NEG AX CONT: MOV V3,AX POP AX ENDM 试展开以下宏调用: ① ABSDIF P1,P2,DISTANCE ② ABSDIF [BX],[SI],[DI]
时间: 2023-11-28 15:50:41 浏览: 144
①展开后的代码如下:
```
PUSH AX
MOV AX,P1
SUB AX,P2
CMP AX,0
JGE CONT
NEG AX
CONT: MOV DISTANCE,AX
POP AX
```
②展开后的代码如下:
```
PUSH AX
MOV AX,[BX]
SUB AX,[SI]
CMP AX,0
JGE CONT
NEG AX
CONT: MOV [DI],AX
POP AX
```
阅读全文