Bochs output:
Code: Select all
00080492882d[CPU0 ] interrupt(): vector = 80, TYPE = 4, EXT = 0
00080492882e[CPU0 ] interrupt(): soft_int && (gate.dpl < CPL)
00080492882d[CPU0 ] exception(0x0d): error_code=0402
00080492882d[CPU0 ] interrupt(): vector = 0d, TYPE = 3, EXT = 1
00080492882d[CPU0 ] interrupt(): INTERRUPT TO INNER PRIVILEGE
Code: Select all
void syscall(syscall_parameter_block *p){
uint32_t p_addr = (uint32_t) p;
_asm {
mov eax, dword ptr [p_addr]
mov esi, eax
int 80h
}
}
Code: Select all
<bochs:14> info tss
tr:s=0x2b, base=0x00000000c0007938, valid=1
ss:esp(0): 0x0010:0xc04f4f96
ss:esp(1): 0x0000:0x00000000
ss:esp(2): 0x0000:0x00000000
cr3: 0x00000000
eip: 0x00000000
eflags: 0x00000000
cs: 0x000b ds: 0x0013 ss: 0x0013
es: 0x0013 fs: 0x0013 gs: 0x0013
eax: 0x00000000 ebx: 0x00000000 ecx: 0x00000000 edx: 0x00000000
esi: 0x00000000 edi: 0x00000000 ebp: 0x00000000 esp: 0x00000000
ldt: 0x0000
i/o map: 0x0000
<bochs:15>