• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 487
  • Last Modified:

booting questions

Cold boot initializes everything because power is off. While warm boot does not check RAM. But, does it reset any content of RAM? Does it reset the vector tables? If so, is it reseted by BIOS or DOS or both?

In addition, I was told that INT 19h can do warm boot as well. If it is true, does it reset any content in RAM?

By the way, I've tried to write a reboot program (assembly) by using INT19h. But it did not work. The PC hung up. Any trick for using INT19h?
0
charleswong
Asked:
charleswong
  • 3
3 Solutions
 
SteveGTRCommented:
Here is what my old Norton Guides say about INT 19h (forgive me Peter):

INT 19h (25)             Bootstrap Loader Service

    Attempts to load the sector at head 0, cylinder 0, sector 1, of a
    diskette or fixed disk into memory at 0:7C00h, and transfer control
    there. This sector usually has an operating system bootstrap loader.

  ──────────────────────────────────────────────────────────────────────────

    This interrupt attempts to load the sector at head 0, track 0, sector
    1, on the first diskette into memory at 0:7C00h. If unable, it then
    attempts to load the sector at head 0, track 0, sector 1 of the first
    hard disk. If it is unable to load from either the diskette or the
    fixed disk, it calls INT 18h, which calls the ROM BASIC.

    If INT 19h is successful, control is transferred to the first byte of
    the sector, which has been read in at memory location 0:7C00h. That
    is, CS is set to 0 and IP is set to 7C00h.

       Notes:     This interrupt is not a substitute for a Ctrl-Alt-
                      Del warm boot. This interrupt is the last action
                      performed by the Power-On Self Test (POST), which is
                      activated by Ctrl-Alt-Del. If a user program
                      attempts to execute this interrupt directly, the
                      machine may lock up.

                      To correctly reboot within an application program,
                      jump to FFFF:0h in memory. That is, set CS to FFFF
                      and IP to 0. This is the same process that occurs
                      when the machine is first powered on. Following
                      these steps will perform a "cold" boot. To perform a
                      "warm" boot using this method, first set the word at
                      location 0:472h to 1234h. This will simulate the
                      pressing of the Ctrl-Alt-Del.

                      A cold boot initializes all hardware, tests all
                      hardware, tests RAM, then calls INT 19h to load the
                      bootstrap loader. This process is performed when the
                      computer is turned on or a hardware reset button is
                      pressed.

                      A warm boot initializes and tests all hardware but
                      does not test RAM. It then calls INT 19h to load the
                      bootstrap loader. This process is performed when
                      Ctrl-Alt-Del is typed.

                      The sector read from the diskette will in turn read
                      in the rest of the operating system. A fixed disk
                      will read in a Partition Table, which will then read
                      in the correct operating system.
0
 
SteveGTRCommented:
Here is INT 18H for your reference:

INT 18h (24)             BASIC Loader Service

    Activates Cassette BASIC.
_______________________________________________________________

       Notes:      This service transfers control to F600:0, which is
                      the location in ROM of the standard BASIC
                      interpreter. This interrupt works only on IBM
                      computers. Compatibles do not have BASIC in ROM but
                      must instead run a disk-based version of BASIC,
                      usually known as GW-BASIC.

                      This interrupt is executed if the Power-On Self Test
                      (POST) is unable to read the operating system off a
                      floppy or fixed disk.
0
 
gtkfreakCommented:
U may like to refer to:
http://www.clipx.net/ng/bios/ng1fe5.php
0
 
dimitryCommented:
If you want to reboot computer in DOS (from real mode), you need to jump to reset vector and not to
call to INT 19h. INT 19h loads OS from HD or floppy and is called at the end of BIOS boot sequence.

To jump to reset vector you need to do the next:
  mov ax, 40h
  mov ds, ax
  mov word ptr ds:[72h], 1234h   ; to "tell" BIOS that you are rebooting
  DB  0EAh    ; far jump to [FFFF:0000] - reset vector
  DW 0
  DW 0FFFFh

Note: it will not work under Windows 2000
0
 
SteveGTRCommented:
All three of us, myself, gtkfreak, dimitry, have provided information that answered the question. I believe that the points should be split three ways. Thanks :)
0

Featured Post

Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now