2017-01-19 17:12:16 +00:00
|
|
|
.386P
|
|
|
|
|
|
|
|
NAME HLT
|
|
|
|
|
|
|
|
PROG_CODE SEGMENT ER USE32 'CODE'
|
|
|
|
ASSUME CS:PROG_CODE
|
|
|
|
|
|
|
|
PUBLIC _halt_cpu
|
|
|
|
|
|
|
|
_halt_cpu PROC NEAR
|
2017-02-04 05:30:15 +00:00
|
|
|
;HLT ; this will cause #GP(0) as CPL is set to 3 by intel dos extender.
|
2017-02-03 06:28:12 +00:00
|
|
|
;MOV AX, CS
|
|
|
|
;AND AX, 3
|
2017-01-19 17:12:16 +00:00
|
|
|
RET
|
|
|
|
_halt_cpu ENDP
|
|
|
|
|
|
|
|
PROG_CODE ENDS
|
|
|
|
|
|
|
|
END
|