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

📄 stub.asm

📁 Windows PE 文件在 DOS 下运行一般会显示:This program cannot be run in DOS mode. 这是PE文件头部的一个"dos stub"程序
💻 ASM
字号:
;stub.asm
dos_header: 
    e_magic     dw "MZ"
    e_cblp      dw 0x0090
    e_cp        dw 0x0001
    e_crlc      dw 0x0000
    e_cparhdr   dw 0x0004
    e_minalloc  dw 0x0010
    e_maxalloc  dw 0xFFFF
    e_ss        dw 0x0000
    e_sp        dw 0x00b8
    e_csum      dw 0x0000
    e_ip        dw 0x0000
    e_cs        dw 0x0000
    e_lfarlc    dw dos_stub
    e_ovno      dw 0x0000
    e_res       rw 4
    e_oemid     dw 0x0000
    e_oeminfo   dw 0x0000
    e_res2      rw 10
    e_lfanew    dd PE_header
dos_stub:
    push cs
    pop  ds
    mov  dx, msg-dos_stub
    mov  ah, 0x09
    int  0x21
    mov  ax, 0x4C01
    int  0x21
;Put our string here
    msg  db 'This program cannot be run in DOS mode.',0x0d,0x0d,0x0a,'$'
PE_header:
;End of source code

⌨️ 快捷键说明

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