Red de conocimiento informático - Conocimiento sistemático - Determine el valor de x de acuerdo con el rango de valores de x, y el lenguaje ensamblador genera yzhi

Determine el valor de x de acuerdo con el rango de valores de x, y el lenguaje ensamblador genera yzhi

El siguiente programa es una función simbólica basada en la entrada ?-1, 0, 1.

CÓDIGO?SEGMENTO ASSUMECS:CÓDIGO

X?DW-890

Y?DW? INICIO: PUSH?CS POPDS PUSH?POPES MOVAX,X CALL? SIGN MOVY,AX MOVAX,Y CALL?DSPAXS MOVAH,4CH INT21H

;============================= ===== =====

SIGN?PROC?NEAR CMPAX,0 JE@SIGN0 JG@SIGN1 MOVAX,-1 RET @SIGN0: MOVAX,0 RET @SIGN1: MOVAX, 1 RET

FIRMAR?ENDP

;================================= = DSPAXS?PROC?NEAR PUSH?AX TEST?AX,8000H JNS@DSPAXS1 PUSH?AX PUSH?DX MOVAH,2 MOVDL,'-' INT21H POPDX POPAX NEGAX

@DSPAXS1: CALL?DSPAX POPAX RET DSPAXS?ENDP

;==================================?

DSPAX?PROC?NEAR PUSH?AX PUSH?BX PUSH?CX PUSH?DX PUSHF XORCX,CX MOVBX,10

@DSPAX1: DSPAX1 MOVAH,2

@DISPAX2: POPDX INT21H LOOP?@DISPAX2 MOVDL,32 INT21H POPF POPDX POPCX POPBX POPAX RET

DSPAX?