Using assembly language to realize reset start and hot start

Source: Internet
Author: User
Tags reset

Program Name: RESET. Asm/boot. ASM Program Category: Complete assembly language Program

Function: Use the program to complete reset start and hot start

Usage Description: Convert to COM file run after Assembly connection

Program Description:

In the daily use of the machine process, it is often necessary to reboot the system if an exception occurs. For IBM PCs and their compatible machines, in addition to the boot cold boot, there are hot boot and r eset switch reset start, their common feature is to transfer to the BIOS entry point (that is, rom the starting cell ffff:0), Execute the jump instruction of the branch, turn to start the program, the start program in the execution process needs to detect the reset sign word (at address 0040:0072, occupy 2 byte) of value, if 1234 then start is not detect memory, if not 1234 start first detect memory, Restart the system. The difference between hot start and reset startup is that the memory is not detected when the hot boot is started, and reset is required to detect memory.

The following two programs implement reset start and hot boot respectively. After assembly, the connection is converted to a file before it can be run.

RESET. ASM (reset switch reset Start program)

CODE1 SEGMENT AT 0FFFFH
ASSUME CS:CODE1
ADDR LABEL FAR
CODE1 ENDS
CODE SEGMENT
ORG 100H
ASSUME CS:CODE,DS:CODE,ES:CODE
START:
JMP FAR PTR ADDR
CODE ENDS
END START

BOOT. ASM (hot Start program)

CODE1 SEGMENT AT 0FFFFH
ASSUME CS:CODE1
ADDR LABEL FAR
CODE1 ENDS
CODE SEGMENT
ORG 100H
ASSUME CS:CODE,DS:CODE,ES:CODE
START:
MOV AX,0040H
MOV DS,AX
MOV AX,1234H
MOV SI,0072H
MOV [SI],AX
JMP FAR PTR ADDR
CODE ENDS
END START

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.