Вы находитесь на странице: 1из 4

4

. / 3Fh 40h
21h.

:
: .

2015

,
, 3Fh 40h
.
PUSH POP.
TD. ,
.
SP, IP
.

: s1 10 .
s1 s2 ,
. s1 s2.

:
sstack
DB
sstack

SEGMENT para stack "stack"


100 dup (?)
ENDS

sdata SEGMENT
strk db
newlndb
s1
s2

para "data"

"vvedite stroku"
10,13

db
15 dup(?)
db 8 dup(?)

sdata ENDS
scode
ASSUME

SEGMENT para "code"


CS:scode, DS:sdata

start:
push sdata
pop ds
mov
mov
mov
mov
int
21h

ah, 40h
bx, 1
cx, 16
dx, offset strk

mov ah, 3fh


mov dx, offset s1

;print strk
;! +2 newln

; s1

mov bx, 0
mov cx, 14
int 21h
push word ptr s1+1 ; )
push word ptr s1+1
;( )
push word ptr s1+8 ; )
push word ptr s1+8
;( )
push word ptr s1+8

pop
pop
pop
pop
pop

word
word
word
word
word

ptr
ptr
ptr
ptr
ptr

s2
s2+1
s2+2
s2+3
s2+4

mov ah, 40h ;


mov dx, offset s1
mov bx, 1
mov cx, 10
int 21h
mov ah, 40h
;
mov dx, offset newln
mov bx, 1
mov cx, 2
int 21h
mov ah, 40h ;
mov dx, offset s2
mov bx, 1
mov cx, 5
int 21h
mov ah, 4ch
int 21h
scodeENDS
END start