flat assembler
Message board for the users of flat assembler.
![]() Goto page 1, 2 Next |
Author |
|
milind
I found this code from one of the posts, it disables the NMI. Would this really work??
in AL,070h ; or AL,080h ; Turn NMI off out 070h,AL ; |
|||
![]() |
|
Ralph
Yes.
|
|||
![]() |
|
Adam Kachwalla
Hang on... Isn't NMI Non-Maskable Interrupt? I think that is a CPU bug, which has most likely been fixed.
|
|||
![]() |
|
LocoDelAssembly
NMI means that CLI instruction doesn't prevent the processor to handle it. However, if some other chip prevents the processor's NMI pin to be asserted then you have the NMI interrupt masked
![]() |
|||
![]() |
|
Japheth
> NMI means that CLI instruction doesn't prevent the processor to handle it.
That was absolutely new to me. ![]() (the "CLI" was to mask IRQs, not NMIs, in case the RTC timer /alarm has been enabled.) |
|||
![]() |
|
mikegonta
[ Post removed by author. ]
Last edited by mikegonta on 28 Jan 2009, 09:15; edited 2 times in total |
|||
![]() |
|
Japheth
> Keep in mind that this caveat was designed for the original chip and like
> many other "urban" legends is not applicable to a modern PC. This might be true, but the OP did not indicate that the code must run on a new PC only. > I ran the following code in Protected Mode from a boot sector on a Pentium > for 5 minutes and it had no noticeable effect on the time. Hm, what did you expect from this code? It loops. What effect should have been seen? |
|||
![]() |
|
LocoDelAssembly
Sorry for bumping this thread. The code shown on this thread is the correct to disable NMI even on modern computers or not?
I would like to write my switch-to-protected-mode code, and Intel says NMIs must be disabled during the transition. |
|||
![]() |
|
DJ Mauretto
Unfortunately this is Chipset specific, on Intel Chipset
you cannot read anymore Port 70h , but you can set bit 7 and Disable All NMI sources, that is the Port 70h is Write Only, unless you enable Alt Access Mode or use alias Port 74h ( Intel chipset specific) anyway that bit is still valid for write operation and disable NMI ![]() Code: ; Disable NMI mov al,80h out 70h,al ; Enable NMI xor al,al out 70h,al _________________ Nil Volentibus Arduum ![]() |
|||
![]() |
|
mikegonta
[ Post removed by author. ]
Last edited by mikegonta on 28 Jan 2009, 09:15; edited 2 times in total |
|||
![]() |
|
revolution
mikegonta wrote: The chances of an NMI triggered event are slim and by definition they are non recoverable. So the simple thing is to ignore it. |
|||
![]() |
|
mikegonta
[ Post removed by author. ]
Last edited by mikegonta on 28 Jan 2009, 09:15; edited 1 time in total |
|||
![]() |
|
revolution
mikegonta wrote:
BTW, I am using the second to last meaning of Out to lunch in my location. |
|||
![]() |
|
LocoDelAssembly
In general, operating systems (both, hobby and professional) do care about NMI while switching?
Thanks for the answers! |
|||
![]() |
|
mikegonta
[ Post removed by author. ]
Last edited by mikegonta on 28 Jan 2009, 09:16; edited 2 times in total |
|||
![]() |
|
Coddy41
So jmp $ wont pause the system on my new computer?
|
|||
![]() |
|
mikegonta
[ Post removed by author. ]
Last edited by mikegonta on 28 Jan 2009, 09:16; edited 3 times in total |
|||
![]() |
|
baldr
Coddy41,
jmp $ makes CPU busy, not uninterruptable. |
|||
![]() |
|
Coddy41
Busy, hmm... --takes notes-- busy doing what?
Mike "hlt" stands for stall in +==========+ |@@: | sti | hlt | jmp @B +==========+ And then it jumps back to @, Right???? |
|||
![]() |
|
Goto page 1, 2 Next < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.