> jmp short $+2
> mov ax,08
>
>; jmp $ ; uncomment this, then can stop
> mov cs, ax ;this line cause the computer reboot
Yep, sure would
I'm surprised that even assembled...
didn't think you could set the code segment
explicitly.
Well, assuming that instruction works and doesn't
produce an invalid opcode... it doesn't change
the instruction pointer (ip), and no doubt
jumps to unknown code.
That's a guess, anyway... I didn't decode
your descriptors to see where they're pointing, but
that's probably what's wrong.
I'd use a jmp, with both segment and offset:
jmp 0x10:offset
offset:
; 32 bit code starts here
Either that, or:
db 0x66
db 0xea
dd offset
dw 0x10
offset:
; 32 bit code starts here
; the above both assume your code segment is
; 0x10... sorry, force of habit... that's what
; my code segment is
j.weeks