Alsoo.. ich versteh nicht wirklich wieso das nicht funktioniert..  Der letzte eingelesene eintrag spuckt wirre zaheln aus.. wo sitzt der fehler ?? ^^'
#include <iostream>
using namespace std;
//GLOBALS 
int stack_in;
int stack_out;
int SP;
int SS;
int main()
{
    //Eingabe
    cout << "stack1: ";
    cin >> stack_in; 
    
    //Im Stack Speichern
    __asm("mov _stack_in, %eax");
    __asm("push %eax"); 
    
    
    //Eingabe
    cout << "stack2: ";
    cin >> stack_in;
    
    //Im Stack Speichern
    __asm("mov _stack_in, %eax");
    __asm("push %eax"); 
    
    
    //Aus dem Stack holen.. und in Variable speichern
    __asm("pop %eax");
    __asm("mov %eax, _stack_out");
    
    cout << "\nstack1: " << stack_out; //Ausgabe
    
    //Aus dem Stack holen.. und in Variable speichern
    __asm("pop %eax");
    __asm("mov %eax, _stack_out");
    
    cout << "\nstack2: " << stack_out; 
    //Hier zeigt er wirre Zahlen
    
    cout << "\n\n";
    system("pause");
    
    return 0;
}
So wie ich das gelsen habe.. sollte das ganz simple funktionieren..
mov ax, 1234h
mov bx, 5678h
push ax
push bx
pop bx
pop ax
So umgefaehr hab ichs gemacht.. funcen tuts nich....
MFG
TOMEK







