DOS dead guest star can break the endless loop of the program. Press Ctrl + ESC to immediately return the dead program to the DOS shell.

Source: Internet
Author: User

// -- DOS dead guest star, which can break the endless loop of the program. Press Ctrl + ESC to immediately return the dead program to the DOS shell.

Code segment
Assume Cs: code, DS: Code
Org 100 h
Start: JMP install
Oldint dd 100 h DUP (?)
Oldmcb dd 10 h DUP (?)
Oldint2f dd?
Oldint09 dd?
Oldint21 dd?
Sign db 0
Newint21: CMP ah, 0ah
Jnz newint21end
MoV Cs: byte PTR sign, 0ffh
Pushf
Call Cs: oldint21
MoV Cs: byte PTR sign, 0
Retf 2
Newint21end: JMP Cs: oldint21
Newint2f: CMP ah, 98 h
JZ lop1
JMP Cs: oldint2f
Lop1: mov Al, 98 h
Iret
Newint09: PUSH AX
In Al, 60 h
CMP Al, 01
JZ lop2
Exit: Pop ax
JMP Cs: oldint09
Lop2: mov ah, 02 h
Int 16 h
And Al, 0100b
JZ exit
MoV Al, CS: byte PTR sign
CMP Al, 0ffh
JZ exit
Lop4: in Al, 61 H
Or Al, 80 h
Out 61 H, Al
And Al, 7fh
Out 61 H, Al
MoV Al, 20 h
Out 20 h, Al
MoV ax, CS
MoV ds, ax
Dec ax
MoV es, ax
XOR Di, Di
MoV Si, offset oldmcb
MoV CX, 10 h
ClD
Rep movsb
MoV Si, offset oldint
XOR ax, ax
MoV es, ax
XOR Di, Di
MoV CX, 200 h
CLI
ClD
Rep movsw
STI
Push CS
Pop BX
MoV ah, 50 h
Int 21 h
MoV dx, offset word1
MoV ah, 09 h
Int 21 h
MoV dx, offset install
MoV ah, 31 H
Int 21 h
Word1: DB 10, 13, 7, 'goback has let your computer come to life! $'
Word2: DB 10, 13, 7, 'goback has installed! Only press Ctrl + ESC, when the computer is dead! $'
Word3: DB 10, 13, 'goback installed OK! '
DB 1.0, 13, 7, 'ver Author: Zhao Jibin 1998.7.29'
DB, 'When your computer is dead ....'
DB, 'You need to press Ctrl + ESC come to life... ',' $'
Install: mov ah, 98 h
Int 2fh
CMP Al, 98 h
Jnz lop3
MoV dx, offset word2
MoV ah, 09 h
Int 21 h
MoV ah, 04ch
Int 21 h
Lop3: Push CS
Pop DS
MoV ax, 352fh
Int 21 h
MoV word PTR oldint2f, BX
MoV word PTR oldint2f + 2, es
MoV ax, 3509 H
Int 21 h
MoV word PTR oldint09, BX
MoV word PTR oldint09 + 2, es
MoV ax, 3521 H
Int 21 h
MoV word PTR oldint21, BX
MoV word PTR oldint21 + 2, es
MoV ax, 252fh
MoV dx, offset newint2f
Int 21 h
MoV ax, 2509 H
MoV dx, offset newint09
Int 21 h
MoV ax, 2521 H
MoV dx, offset newint21
Int 21 h
Push CS
Pop es
XOR ax, ax
MoV ds, ax
XOR si, si
MoV Di, offset oldint
MoV CX, 200 h
ClD
Rep movsw
MoV ax, CS
Dec ax
MoV ds, ax
XOR si, si
MoV Di, offset oldmcb
MoV CX, 10 h
ClD
Rep movsb
Push CS
Pop DS
MoV dx, offset word3
MoV ah, 09 h
Int 21 h
MoV dx, offset install + 120 h
MoV Cl, 04 H
SHR dx, Cl
MoV ah, 31 H
Int 21 h

Code ends
End start

Related Article

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.