DOS死機客星,能打破程式死迴圈,按住Ctrl +Esc即可使死掉的程式立即返回到Dos Shell

來源:互聯網
上載者:User

//--DOS死機客星,能打破程式死迴圈,按住Ctrl +Esc即可使死掉的程式立即返回到Dos Shell

code segment
assume cs:code,ds:code
org 100h
  start:  jmp install
 oldint dd 100h dup(?)
 oldmcb dd 10h 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,98h
    jz lop1
    jmp cs:oldint2f
   lop1:   mov al,98h
    iret
 newint09: push ax
    in al,60h
    cmp al,01
    jz lop2
    exit:  pop ax
    jmp cs:oldint09
    lop2:  mov ah,02h
    int 16h
    and al,0100b
    jz exit
    mov al,cs:byte ptr sign
    cmp al,0ffh
    jz exit
    lop4:  in al,61h
    or al,80h
    out 61h,al
    and al,7fh
    out 61h,al
    mov al,20h
    out 20h,al
    mov ax,cs
    mov ds,ax
    dec ax
    mov es,ax
    xor di,di
    mov si,offset oldmcb
    mov cx,10h
    cld
    rep movsb
    mov si,offset oldint
    xor ax,ax
    mov es,ax
    xor di,di
    mov cx,200h
    cli
    cld
    rep movsw
    sti
    push cs
    pop bx
    mov ah,50h
    int 21h
    mov dx,offset word1
    mov ah,09h
    int 21h
    mov dx,offset install
    mov ah,31h
    int 21h
    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 10,13,7,'         Ver 1.0  Author: Zhao jibin   1998.7.29 '
    DB 10,13,'              When  your computer is dead....'
    db 10,13,'      You need to press Ctrl+Esc come to life....',10,13,'$'
 install:  mov ah,98h
    int 2fh
    cmp al,98h
    jnz lop3
    mov dx,offset word2
    mov ah,09h
    int 21h
    mov ah,04ch
    int 21h
    lop3:  push cs
    pop ds
    mov ax,352fh
    int 21h
    mov word ptr oldint2f,bx
    mov word ptr oldint2f+2,es
    mov ax,3509h
    int 21h
    mov word ptr oldint09,bx
    mov word ptr oldint09+2,es
    mov ax,3521h
    int 21h
    mov word ptr oldint21,bx
    mov word ptr oldint21+2,es
    mov ax,252fh
    mov dx,offset newint2f
    int 21h
    mov ax,2509h
    mov dx,offset newint09
    int 21h
    mov ax,2521h
    mov dx,offset newint21
    int 21h
    push cs
    pop es
    xor ax,ax
    mov ds,ax
    xor si,si
    mov di,offset oldint
    mov cx,200h
    cld
    rep movsw
    mov ax,cs
    dec ax
    mov ds,ax
    xor si,si
    mov di,offset oldmcb
    mov cx,10h
    cld
    rep movsb
    push cs
    pop ds
    mov dx,offset word3
    mov ah,09h
    int 21h
           mov dx,offset install+120h
           mov cl,04h
           shr dx,cl
    mov ah,31h
    int 21h
   
    code ends
    end start

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.