高级汇编: 用条件控制伪指令实现判断一元二次方程根的个数
data segment
aa sbyte 4;sbyte 有符号
bb sbyte 4
cc sbyte 2
tag byte ?
data ends;
code segment
assume cs:code,ds:data
start:
mov ax,data
mov ds,ax
xor ax,ax
xor bx,bx
mov al,bb
imul ax
mov bx,ax;bx=bb
mov al,aa
imul cc;ax=ac
mov cx,4
imul cx;ax=4ac
.if sword ptr bx>ax
mov tag,32h
.elseif sword ptr bx==ax
mov tag,31h
.else
mov tag,30h
.endif
mov al,tag
mov dh,0
mov dl,al
mov ah,02h
int 21h
code ends
end start