Red de conocimiento informático - Conocimiento sistemático - Solicitud: programación ensambladora, ingrese dos números, solicite generar el número más grande y genere su código fuente.

Solicitud: programación ensambladora, ingrese dos números, solicite generar el número más grande y genere su código fuente.

segmento de datos

a db 13, 10, 'ingrese el primer número:', '$'

b db 13, 10, 'ingrese el segundo número: ', '$'

c1 db 13, 10, 'su yuanma muestra: ', '$'

x db

y db ?

los datos terminan

segmento de código

supongamos cs: código, ds: datos

inicio: mov ax, datos

mov ds, hacha

mov ah, 09h

mov dx, desplazamiento a

int 21h

mov ah, 01h

int 21h

sub al, 30h

mov X, al

mov ah, 09h

mov dx, desplazamiento b

int 21h

mov ah, 01h

int 21h

sub al, 30h

mov y, al

lea dx, c1

mov ah, 09h

int 21h

mov dl, y

mov bl, x

cmp bl, dl

mov al, y; asume temporalmente que y es grande

jb l1

mov al, x

l1:

MOV BL, AL

; la siguiente salida bl

MOV AX, 8

KK2:

PUSH AX

MOV CX, 1

MOV DL, 31H

RCL BL, CL

p>

JC DISP

MOV DL, 30H

DISP:

mov ah, 02h

INT 21H

POP AX

DEC AX

JNZ KK2

MOV AH, 4CH

INT 21H

CÓDIGO FINALIZA

FIN INICIO