Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

82 lines (72 sloc) 1.292 kB
.model small
.stack
EXTRN inum:BYTE
EXTRN num:BYTE
EXTRN inum2:BYTE
Public display1
.data
m1 db 10,13,"first number is $",10,13,'$'
m2 db 10,13,"second number is $",10,13,'$'
.code
mov ax,@data
mov ds,ax
mov bh,0
DISPLAY1 proc FAR
push ax
push bx
push cx
push dx
mov ah,2
mov bh,0
mov dh,00
mov dl,00
int 10h
mov al,0
mov ah,6
mov ch,0
mov cl,0
mov dh,89
mov dl,247
mov bh,7
int 10h
pop dx
pop cx
pop bx
pop ax
lea dx,m1
mov ah,09
int 21h
in1:
mov cx, 10
mov si, 0
mov ah, 02H
mov dl, 0AH
int 21H
disp1:
mov ah, 02H
cmp bh,0
je a
jg b
a:
mov dl, byte ptr[inum+si]
jmp c
b:
mov dl,byte ptr[inum2+si]
c:
int 21H
inc si
dec cx
jnz disp1
inc bh
cmp bh,1
je d
jg e
d:
lea dx,m2
mov ah,09
int 21h
jmp in1
e:
ret
display1 endp
end
Jump to Line
Something went wrong with that request. Please try again.