Displaying 1 result from an estimated 1 matches for "err_cpu".
Did you mean:
err_clk
2002 Feb 28
2
isolinux source, detecting 8086 cpu
...ting
the 386. Basically I just attempt a 32-bit instruction and hook the
invalid opcode exception. Hope this helps. :)
Mike
push sp
; save sp
pop ax
; ax = saved sp
cmp ax, sp
; 8086 modifies sp before pushing
je .not_8086
; processor is not an 8086
;
.invalid_cpu: ;
mov si, .err_cpu ; si
points to error message
jmp .error_handler ;
display message and reboot
;
.not_8086:
;
mov W [6 << 2], .invalid_cpu ; store offset of
invalid opcode handler
mov [(6 << 2) + 2], cs ; store
segment of handler
xor eax, eax
; test a 32-bit instruction