assembly questions

CTho9305

Elite Member
Jul 26, 2000
9,214
1
81
What does this code do?
[/i] >>


cli
cld
mov eax, cs
mov ss, ax
assume ss:seg000
mov al, 0C0h ; '?¤'
out 80h, al
mov esp, 95E9E06Bh
iret[/i] >>



the first part sets the stack segment to be the same as the code segment (or so it seems)

my problem starts at the line "out 80h, al". is I/O address 80 used to write to Port 80 debug cards?
The next instruction, "mov esp, 95e9e06b"... that makes the stack start at address 95e9e06b?
If so, the iret would pop the address to return to from the stack. Now, this code is executed as the system comes out of reset, so how does one know what is going to be there / where it will jump to?