> For the complete documentation index, see [llms.txt](https://acristea.gitbook.io/bti-suport-seminar/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://acristea.gitbook.io/bti-suport-seminar/seminar-12/operatii-cu-stiva.md).

# Operații cu stiva

Care sunt valorile registrilor dupa rularea urmatoarelor comenzi, stiind ca valorile initiale sunt cele de mai jos?

AX=0ECE       DI=0291       SI=4209

PUSH AX&#x20;

MOV AX, SI&#x20;

POP SI&#x20;

PUSH AX&#x20;

ADD AX,SI&#x20;

POP DI

```
.model small
.stack 100h
.data  
    
.code
start:
    MOV AX, 0ECEh
    MOV DI, 0291h
    MOV SI, 4209h
    
    PUSH AX
    MOV AX, SI
    POP SI
    PUSH AX
    ADD AX, SI
    POP DI
 
    
    mov ax,4C00h
    int 21h
    end start
```

Care sunt valorile registrilor dupa rularea urmatoarelor comenzi, stiind ca valorile initiale sunt cele de mai jos?

AX=0A82      BX=2618      CX=2261       DX=8226&#x20;

PUSH AX&#x20;

MOV AX,DX&#x20;

SUB AL,BL&#x20;

PUSH AX&#x20;

POP CX&#x20;

POP BX
