Re: LSS and MOV SS



"Mark Whitlock" <spamtrap@xxxxxxxxxx> wrote:

Spamt ,
Don't you use cli to stop interrupts before the
move and sti to restart them afterwards ?

It's not necessary. The MOV SS,xx instruction automatically disables
interrupts for one instruction, to allow SP and SS to be loaded atomically.
Try using debug to single step through a MOV SS/MOV SP pair; it doesn't
stop in between them.

What the original poster asked about is a slightly different situation, in
which the code (perhaps intentionally) does something stupid and causes an
exception in the first instruction. As he says, this will usually cause a
triple fault which halts the CPU, regardless of whether interrupts are
disabled or not.
--
- Tim Roberts, timr@xxxxxxxxx
Providenza & Boekelheide, Inc.

.



Relevant Pages

  • Re: LSS and MOV SS
    ... move and sti to restart them afterwards? ... interrupts for one instruction, to allow SP and SS to be loaded atomically. ... Try using debug to single step through a MOV SS/MOV SP pair; ...
    (comp.lang.asm.x86)
  • Re: This 8088 code shouldnt work, yet does?
    ... interrupts for the next instruction, not just a move to SS! ... MOV ES, AX ... singlestep the MOV ES,AX instruction, but on a working cpu, the trace will include the INC AX as well, before the cpu stops os that you can check the result. ...
    (comp.lang.asm.x86)
  • [PATCH -tip -v13 01/11] x86: instruction decoder API
    ... This version introduces instruction attributes for decoding instructions. ... The instruction attribute tables are generated from the opcode map file ... +88: MOV Eb,Gb ... +e0: LOOPNE/LOOPNZ Jb (f64) ...
    (Linux-Kernel)
  • [PATCH -tip v14 01/12] x86: instruction decoder API
    ... This version introduces instruction attributes for decoding instructions. ... The instruction attribute tables are generated from the opcode map file ... +88: MOV Eb,Gb ... +e0: LOOPNE/LOOPNZ Jb (f64) ...
    (Linux-Kernel)
  • [PATCH 01/18] x86: Instruction decoder API
    ... Add x86 instruction decoder to arch-specific libraries. ... The instruction attribute tables are generated from the opcode map file ... +88: MOV Eb,Gb ... +e0: LOOPNE/LOOPNZ Jb (f64) ...
    (Linux-Kernel)