Hi,
I am writing some code in 16bit mode, using .code16gcc directive, and
compile with gcc 4.1. In the below code, I expect that (1) and (2) are
doing the same thing, that is executing "func). But actually while (1)
works OK, (2) crashs. So confused!!
Perhaps because "pushw" pushs 4 bytes into stack instead of 2 bytes
with .code16gcc??? (sorry I only guess after reading the Intel manual,
but cannot verify it)
Many thanks,
Jun
------
..code16gcc
call func // (1)
pushw $1f
jmp func // (2)
1:
.....
func:
ret


|