1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
| code segment
assume cs:code
lire_vect_it proc
push ds
push cx
push si
xor ah,ah
mov cl,2
shl ax,cl
mov si,ax
mov cx,0
mov ds,cx
mov bx,word ptr[si]
mov es,word ptr[si+2]
pop si
pop cx
pop ds
ret
endp
saisir_num_vect_it proc
xor ax,ax
mov ah,01h
int 21h
ret
endp
ecrire_vect_it proc
push ds
push cx
push si
mov di,ds
mov cl,2
shl ax,cl
mov si,ax
mov cx,0
mov ds,cx
mov [si],dx
mov [si+2],di
pop si
pop cx
pop ds
ret
endp
call saisir_num_vect_it
call lire_vect_it proc
call ecrire_vect_it proc
code ends
end |
Partager