. ( ) ( ) . , .
, SS, SP BP. SS SP , . . BP. , , . . . , , . , , . , n POP . .
, , :
s_s segment stack "stack"
dw 12 dup(?)
s_s ends
d_s segment
aa dw 10
d_s ends
c_s segment
assume ss:s_s,ds:d_s,cs:c_s
begin:
mov ax,d_s
mov ds,ax
push aa;
call pr1;
pop ax; , ax
.mov ah, 4ch
int 21h;
pr1 proc near
;
Push bp
Mov bp,sp
;
mov ax,[bp+4]; aa
; ax 10
add ax,158h
mov dx,ax
;
mov sp,bp; sp
pop bp; bp
;
ret;
;
pr1 endp
c_s ens
end begin
: BP , ; BP .
BP 4 (22 , 2 - ), 6 ( ).
|
|
.
, ( ), ( ). , .
, . , . , aa , 10, .
, . , .