[comp.sys.ibm.pc] Using Int 19h?

J0S@psuvm.psu.edu (07/04/90)

I'd like to use Int 19h to perform a quick reboot of DOS to establish
a different configuration on my Compaq 386.  The Int 19h hangs the
machine, and I must power off/on to recover.  What do I need to do
to get Int 19h to function?

palm@admin.kth.se (Christer Palm) (07/04/90)

In article <90184.155514J0S@psuvm.psu.edu> J0S@psuvm.psu.edu writes:
>I'd like to use Int 19h to perform a quick reboot of DOS to establish
>a different configuration on my Compaq 386.  The Int 19h hangs the
>machine, and I must power off/on to recover.  What do I need to do
>to get Int 19h to function?

Try this It will Reboot your system 
Use debug

-n reboot.com
-a 100
mow ax,0040
push ax
pop es
es:
mov word ptr [0072], 1234
jmp ffff:0000
-rcx
11
w
q

RGDS
/Christer

fisher@sc2a.unige.ch (Markus Fischer) (07/04/90)

In article <90184.155514J0S@psuvm.psu.edu>, J0S@psuvm.psu.edu writes:
> I'd like to use Int 19h to perform a quick reboot of DOS to establish
> a different configuration on my Compaq 386.  The Int 19h hangs the
> machine, and I must power off/on to recover.  What do I need to do
> to get Int 19h to function?

I can't tell you why Int 19h doesn't work (or, for that matter, whether it
should work), but if you simply want to reboot your computer from software,
here are the extracts of two typical postings on the subject:

(`debug' script to create `reboot.com')
______________________________________________________________________

  Date: Mon, 16 Feb 87 15:27:48 EST
  From: John.Brennen@VI.RI.CMU.EDU
  Subject: Reboot
----
  a100
  xor ax,ax
  mov ds,ax
  mov [472],wo 1234
  jmp ffff:0

  nreboot.com
  rcx
  f
  w
  q
----------------------------------------

  The storage of 1234 in absolute memory location 00472 avoids the
  memory check.

[...]

          John Brennen            CMU Visual Inspection Lab
          jfb@vi.ri.cmu.edu       Pittsburgh, PA
-------------------------------------------------------------------

(an example in `c')
-------------------------------------------------------------------
Newsgroups: comp.sys.ibm.pc
Subject: System boot
From: jeffs@ka.excelan.com (Jeff Seideman)
Date: 11 Jan 90 21:52:13 GMT
Organization: Novell, San Jose CA.
Keywords: warm boot cold boot

For all you who requested the magic code for warm/cold booting your PC
from software, here it be:

int (far *reboot)() = (int(far *)())0xFFFF0000;
void main()
{
	unsigned far *warm;

	warm = 0x472;
	*warm = 0x1234;
	(*reboot)();
}

Note that if you set *warm to any other value it should do a cold boot.
 __________________________________________________________________________
|  ...these clouds stick to the sky      |                                 |
|  like a floating question why.         |                                 |
|  and they linger there to die.         |       Jeff Seideman             |
|  They don't know where they're going   |                                 |
|  and my friend neither do I...         |                                 |
 --------------------------------------------------------------------------


Hope this helps...

Markus Fischer, Dpt of Anthropology, Geneva

poffen@sj.ate.slb.com (Russ Poffenberger) (07/05/90)

In article <199@sc2a.unige.ch> fisher@sc2a.unige.ch (Markus Fischer) writes:
>In article <90184.155514J0S@psuvm.psu.edu>, J0S@psuvm.psu.edu writes:
>> I'd like to use Int 19h to perform a quick reboot of DOS to establish
>> a different configuration on my Compaq 386.  The Int 19h hangs the
>> machine, and I must power off/on to recover.  What do I need to do
>> to get Int 19h to function?
>
>I can't tell you why Int 19h doesn't work (or, for that matter, whether it
>should work), but if you simply want to reboot your computer from software,
>here are the extracts of two typical postings on the subject:
>
>(`debug' script to create `reboot.com')
>______________________________________________________________________

[code for reboot deleted]

I have difficulty using this method. Whenever I have emm386 loaded (this is
microsofts expanded memory manger for 386), it clears the screen and garbles a
message, something about "EMM386: DMA mode not supported" then hangs forcing
a hard reset. It works OK if EMM386 is not loaded.

CTRL-ALT-DEL always works for me. I need to know how this accomplishes a warm
boot and duplicate that since the "standard" method described in this newsgroup
doesn't work.

BTW, it is a 25Mhz 386 clone, ECS motherboard, C&T neat chipset with AMI bios.


Russ Poffenberger               DOMAIN: poffen@sj.ate.slb.com
Schlumberger Technologies       UUCP:   {uunet,decwrl,amdahl}!sjsca4!poffen
1601 Technology Drive		CIS:	72401,276
San Jose, Ca. 95110             (408)437-5254

mike@everexn.uucp (Mike Higgins) (07/06/90)

In <1990Jul3.221200.3894@kth.se> palm@admin.kth.se (Christer Palm) writes:

>In article <90184.155514J0S@psuvm.psu.edu> J0S@psuvm.psu.edu writes:
>>I'd like to use Int 19h to perform a quick reboot of DOS to establish
  J0S@psuvm.psu.edu replies:
>Try this It will Reboot your system 
>Use debug

>-n reboot.com
>-a 100
>mow ax,0040
>push ax
>pop es
>es:
>mov word ptr [0072], 1234
>jmp ffff:0000
>-rcx
>11
>w
>q
	I have used this trick sucessfully for years, but it stopped working
when I moved up to a 386.  I've tried reboot.com on many AT's and find that
it doesn't work on some, does on others.  Never works on my Everex Step/20.
I'd be VERY interested in a version that does work on newer 386's.  By the
way, reboot.com does 'work' on my system, but the 1234 flag in the BIOS RAM
area no longer supresses a memory test, it's just a lot slower than it used
to be!
	I investigated using int 19h instead, and discovered that it is
useless!  It requires that you remove all of your TSR's, EMS drivers, 
mouse drivers, etc. before you call int19h!  That's probably why the original
poster had his system crash.

david@csource.oz.au (david nugent) (07/08/90)

In <1990Jul6.031331.13561@everexn.uucp> mike@everexn.uucp (Mike Higgins) writes:

>>Try this It will Reboot your system 
>>Use debug
>>
>>-n reboot.com
>>-a 100
>>mow ax,0040
>>push ax
>>pop es
>>es:
>>mov word ptr [0072], 1234
>>jmp ffff:0000
>>-rcx
>>11
>>w
>>q
>	I have used this trick sucessfully for years, but it stopped working
>when I moved up to a 386.  I've tried reboot.com on many AT's and find that
>it doesn't work on some, does on others.  Never works on my Everex Step/20.
>I'd be VERY interested in a version that does work on newer 386's.


The problem there is memory management.  In some situations it works; in
others it doesn't.  What you need to do is better simulate a reboot.

I use the following code with great success, with only two exceptions; it
doesn't work under either PC-MOS/386 or Windows 3.0.  It does work fine
with QEMM or 386^MAX, and also under DESQview.

	xor	ax,ax
	mov	es,ax
	mov	bx,1234
	mov	es:[0472],bx		<- for warm boot
	cli
	mov	ds,ax
	mov	es,ax
	mov	ss,ax
	mov	sp,ax
	mov	ax,2
	push	ax
	mov	ax,f000
	push	ax
	mov	ax,fff0
	push	ax
	iret

	
-- 
_______________________________________________________________________________
 Unique Computing Pty Ltd  Melbourne  Australia  -  Communications Specialists 
        david@csource.oz.au    3:632/348@fidonet    28:4100/1@signet           

cgordon@vpnet.chi.il.us (Gordon Hlavenka) (07/09/90)

INT19 will work if you have not messed with interrupts.  In other words, NO
TSRs, NO *.SYS drivers, etc.

I was never able to get INT19 to work.  I heard (somewhere) that INT19 does
not rebuild the interrupt vector table.  I tried booting vanilla DOS and
then running a COM file which consisted of the two bytes 'CD 19' (INT 19),
and it _works_!  It's just not real useful.  (Some copy protection schemes
call INT19 on a protection failure: the machine just keeps rebooting)

The jump to the 8086 boot address is usually effective, just set the flag at
0000:0472 to 0 for cold and 1234H for warm boots.

But even that gets into trouble when you are running protected mode
applications.  I use 386MAX, and have been unable to get a software reboot
running.  MAX has that address remapped, so I need to unmap it and shut down
MAX before I do the jump.  Qualitas was somewhat helpful, but eventually I
was told I was on my own.

Anybody else?

----------------------------------------------------------
Gordon S. Hlavenka                 cgordon@vpnet.chi.il.us
Disclaimer: He's lying

mike@everexn.uucp (Mike Higgins) (07/12/90)

In <2697a1f3-20d1.4comp.sys.ibm.pc-1@vpnet.chi.il.us> cgordon@vpnet.chi.il.us (Gordon Hlavenka) writes:

>The jump to the 8086 boot address is usually effective, just set the flag at
>0000:0472 to 0 for cold and 1234H for warm boots.

>Anybody else?

	I wrote myself a re-boot.com progam based on the 40:72 warm start
flag, and have used it and loved it for years.  But recently it stopped
working! (When I switched to a new computer).
       It seems that the AMI BIOS in my Everex Step/20 doesn't keep the
warm start flag in that location any more...  Does anybody know of another
way to do a warm start?  Is there a command to send to the keyboard controller
to ask it to do a warm start?  Is there a flag in the CMOS clock non-volitile
RAM that indicates warm start?  (How is the 286 luke-warm reboot done when
getting out of protected mode?).  
	Does anybody else have experience with the 40:72 1234 flag failing
to work?  Is this a 'feature' of the AMI BIOS only, or do other systems
have this problem?