Answer the question
In order to leave comments, you need to log in
Why such a strange conclusion?
Given a task:
Enter 2 lines of characters and reserve space for the third line. Compare the first two and if they have different letters, then write these letters in the third line.
Here is the code:
include io.asm
Sseg segment stack
db 256 dup(?)
Sseg ends
Dseg segment
v1 db 0dh,0ah,'Vvedite stroku N1: $'
v2 db 0dh,0ah,'Vvedite stroku N2: $'
s1 db 5 dup(?)
s2 db 5 dup(?)
s3 dw 5 dup(?)
Dseg ends
Cseg segment
assume cs:Cseg,DS:Dseg,SS:Sseg,ES:Dseg
start:
mov ax,Dseg
mov ds,ax
mov es,ax
cld
lea dx,v1
outstr
mov cx,5
mov si,0
vvod1:
inch s1[si]
inc si
loop vvod1
newline
lea dx,v2
outstr
mov cx,5
mov si,0
vvod2:
inch s2[si]
inc si
loop vvod2
lea si,s2
lea di,es:s1
mov cx,5
srav:
repe cmps s1,s2
mov bx,0
dec di
mov s3[bx],di
inc di
inc bx
loop srav
mov cx,5
mov ah, 09
lea dx, s3
int 21h
finish
Cseg ends
end start
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question