⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 reboot.faq

📁 汇编源代码大全
💻 FAQ
字号:
Fri 29 Jan 93  8:34
By: Yousuf Khan
To: All
Re: FAQ: How to Reboot
------------------------------------------------------------------------

Q3) How do I reboot my computer in software?

                                  ***

A3) Although there are many variations to this program, they all
do basically the same thing. There are two forms of rebooting.
First one is a "warm boot", which is like what happens when you
hit the ctlr-alt-del keyboard combination, this bypasses the
memory counter. Second form is a "cold boot", which is like what
happens when you hit the reset button or turn the power off and
on, this does not bypass the memory counter. Let's demonstrate
through a sample program.

BDSeg   segment at 40h          ;-this is the location of the
                                ;Bios Data Segment (BDSeg).
        org     72h             ;-take us to an offset 72h
                                ;from the beginning of BDSeg
FLAG    dw      ?               ;-we set this memory location
                                ;to 1234h if we want a warm
                                ;boot. Any other value for a
                                ;cold boot.
BDSeg   ends                    ;-signifies end of this segment

BOOTSeg segment at 0FFFFh       ;-segment close to end of physical
                                ;memory
BOOTLOC:                        ;-this is where to jump to
BOOTSeg ends

CSeg    segment 'code'          ;-beginning of our code segment
        org     100h            ;-required for *.com file
start:
        mov     ax, BDSeg
        mov     ds, ax          ;-set DS to segment of BDSeg
        assume CS:CSeg, DS:BDSeg
        mov     [FLAG], 1234h   ;-put the value of 1234h into
                                ;memory location occupied by
                                ;FLAG for a warm boot. For
                                ;cold boot put any other value in
                                ;suggested value is 0000h
        jmp far ptr BOOTLOC     ;-now jump to this memory location
CSeg    ends
        end     start

Note this program is only guaranteed to work while in plain Dos.
It may or may not work in Dos multitaskers and other operating
systems.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -