.model small
.stack 100h
.code
start:
SERVICE PROC FAR
push ax
push bx
push cx
push dx
cmp ah, 1
je INPUT
cmp ah, 2
je OUTPUT
jmp DONE
INPUT:
mov ah, 01h
int 21h
mov ax, bx
jmp DONE
OUTPUT:
mov ah, 02h
int 21h
DONE:
pop dx
pop cx
pop bx
pop ax
iret
SERVICE ENDP
lea dx,SERVICE
mov ah, 25h
mov al, 80h
int 21h
mov ah, 1
int 80h
mov bx, ax
mov ah, 2
mov bx, 123
int 80h
int 20h
.end
end start
masm的过程中显示Expected instruction or directive