Stack, Hexazahl pushen?

1 Antwort

if(StackAddressSize == 32) {
	if(OperandSize == 32) {
		ESP = ESP - 4;
		SS:ESP = Source //push doubleword
	}
	else { //OperandSize == 16
		ESP = ESP - 2;
		SS:ESP = Source; //push word
	}
}
else { //StackAddressSize == 16
	if(OperandSize == 16) {
		SP = SP - 2;
		SS:ESP = Source //push word
	}
	else { //OperandSize == 32
		SP = SP - 4;
		SS:ESP = Source; //push doubleword
	}
}

Das ist die Push-Operation des x86.