jmp F000:FFF0
or:
db 0EAh
dw 0FFF0h,0F000h
Right... "This program violated the privilege rules of the system and
will be terminated"
If the program only runs in DOS, not in V86 mode, not in a DOS box of
something, the CPU not being switched to use extended addressing, then:
go ahead. (It should be a FAR jump, btw.) More general approach would be
to do INT 19h. This should be trapped by a V86 manager (if there happens
to be one) and should take care of things for you.
AriL
--
*DO NOT* send me email unless I ask you to.
I read the answers where I ask the questions.
This may also help some other people.
Don't do a int 19h if you're in real mode! The BIOS must initialize
the interrupt vectors, etc. I tried jmp F000:FFF0 in win98 and it
exited the DOS prompt (Win98 has patched F000:FFF0 with int 19h).
The "this program violated ...." is because the BIOS uses some privileged
instructions in v86 mode.
You could also try:
mov al,0FEh
out 64h,al
jmp $
It works in win98 too and probably in most v86 monitors.
Using int 19h, you can do all sorts of fun things. You can, for example
set the word at 40h:72h to one of the following prior to issuing the
int:
0000 cold boot
0064 burn-in mode
1234 bypass memory test
4321 preserve memory
5678 system suspended
9abc manufacturing test mode
abcd POST loop mode
Or, you can set the register 0F value (shutdown status) in the CMOS to:
00-03 software reset
04 int 19h reboot
05 flush keyboard and jump via 40h:67h (*)
06 reset after succesfull vmode test
07 reset after failed vmode test
0a jump via 40h:67h (*)
0b iret via 40h:67h (*)
0c retf via 40h:67h (*)
0d-ff power-on reset
(*) put the far address of your routine (to be called at the beginning
of POST) at this address.
Anyway, isn't this one of the most FAQs?
>>--Chris-->
(In other words the original poster should probably pay a visit to
ftp://rtfm.mit.edu/pub/usenet-by-hierarchy/comp/....
)
> How do I reboot *cleanly* the system in real mode (f.e. in a .com
> program) ?
With Int 16h.
--
Bart Zonneveld.
Email: Bart.Zo...@phil.uu.nl
Cra...@yahoo.com
Your keyboard driver must be quite buggy then ;-)
Use INT 19 if you must, but this is NOT a clean way to reboot the
system. The cleaner way has been posted to this newsgroup very recently,
and involves a far jump into BIOS code.
--
Supporting CUT: http://www.unmetered.org.uk/
We are John Cage of Borg. Assimilation troubles us;
we have to take a moment. Poughkeepsie.
Bart Zonneveld wrote:
> In article <6rrn1n$m0e$1...@winter.news.erols.com>, Laurent
> <godzilla...@wanadoo.fr> wrote:
>
> > How do I reboot *cleanly* the system in real mode (f.e. in a .com
> > program) ?
>
> With Int 16h.
It's better to store 0000h (cold boot) or 1234h (warm boot) to
0040h:0072 and then make a far jump to 0F000h:0FFF0h.
--
Denning
>In article <6rrn1n$m0e$1...@winter.news.erols.com>, Laurent
><godzilla...@wanadoo.fr> wrote:
>
>> How do I reboot *cleanly* the system in real mode (f.e. in a .com
>> program) ?
>
>With Int 16h.
Assuming that you have at least an AT, you can emulate a ctl-alt-del
by out'ing an 0feh to port 064h.
mov al,0feh
out 064h,al
==========
It would probably NOT be a very good idea for a spammer to harvest
the following addresses:
<ro...@warez.phantom.com>
<postm...@warez.phantom.com>
<webm...@warez.phantom.com>
Joel Rubin wrote:
> On 25 Nov 1998 17:24:16 GMT, Bart.Zo...@phil.uu.nl (Bart
> Zonneveld) wrote:
>
> >In article <6rrn1n$m0e$1...@winter.news.erols.com>, Laurent
> ><godzilla...@wanadoo.fr> wrote:
> >
> >> How do I reboot *cleanly* the system in real mode (f.e. in a .com
> >> program) ?
> >
> >With Int 16h.
>
> Assuming that you have at least an AT, you can emulate a ctl-alt-del
> by out'ing an 0feh to port 064h.
>
> mov al,0feh
> out 064h,al
>
Unfortunately this is incorrect.
Ctrl-Alt-Del initiates a warm boot, whereas sending 0FEh to port 064h
initiates a cold boot. Two entirely different animals.
Denning
PS A correction to my previous post, the memory location is 0040h:0072h
(I left the 'h' off of the 0072).
Item 49 of TSFAQP (see Sig) implies that one should wait for the
controller to be ready ...
UNIT Reboot;
INTERFACE
procedure DoReboot;
IMPLEMENTATION
procedure DoReboot;assembler;
asm
cli
@@WaitOutReady: { Busy-wait until 8042 is ready for new command}
in al,64h { read 8042 status byte}
test al,00000010b { Bit 1 of status indicates input buffer full }
jnz @@WaitOutReady
mov al,0FEh { Pulse "reset" = 8042 pin 0 }
out 64h,al
{ The PC will reboot now }
end;
END.
--
John Stockton, Surrey, UK. j...@merlyn.demon.co.uk Turnpike v4.00 MIME.
Web <URL: http://www.merlyn.demon.co.uk/> - TP/BP/&c. FAQqish topics & links.
Timo's TurboPascal <A HREF="ftp://garbo.uwasa.fi/pc/link/tsfaqp.zip">FAQ</A>.
<A HREF="http://www.merlyn.demon.co.uk/clpb-faq.txt">Mini-FAQ</A> of c.l.p.b.
Because the KBC's usually slow, if you don't wait for it to process
the command, the next write will overwrite the previous command.
But if you need to RESET the CPU, you don't care if if the KBC has
read the last command before you send FEh to it.
No, it doesn't initate a cold or warm boot. It's the word at
40:72 that indicates to the BIOS if it should be a warm/cold boot.
Only the CPU is RESET by OUT 64,AL (AL=FE), not the memory.
The memory is still valid so the BIOS can check 40:72 after CPU RESET.
|
|Denning
|
|PS A correction to my previous post, the memory location is 0040h:0072h
|(I left the 'h' off of the 0072).
Hex is always assumed in xxxx:xxxx, it's just ugly with h's in them :)