• linkedu视频
  • 平面设计
  • 电脑入门
  • 操作系统
  • 办公应用
  • 电脑硬件
  • 动画设计
  • 3D设计
  • 网页设计
  • CAD设计
  • 影音处理
  • 数据库
  • 程序设计
  • 认证考试
  • 信息管理
  • 信息安全
菜单
linkedu.com
  • 网页制作
  • 数据库
  • 程序设计
  • 操作系统
  • CMS教程
  • 游戏攻略
  • 脚本语言
  • 平面设计
  • 软件教程
  • 网络安全
  • 电脑知识
  • 服务器
  • 视频教程
  • JavaScript
  • ASP.NET
  • PHP
  • 正则表达式
  • AJAX
  • JSP
  • ASP
  • Flex
  • XML
  • 编程技巧
  • Android
  • swift
  • C#教程
  • vb
  • vb.net
  • C语言
  • Java
  • Delphi
  • 易语言
  • vc/mfc
  • 嵌入式开发
  • 游戏开发
  • ios
  • 编程问答
  • 汇编语言
  • 微信小程序
  • 数据结构
  • OpenGL
  • 架构设计
  • qt
  • 微信公众号
您的位置:首页 > 程序设计 >汇编语言 > 汇编源码系列之ctrladel

汇编源码系列之ctrladel

作者:匿名 字体:[增加 减小] 来源:互联网 时间:2017-06-28

匿名通过本文主要向大家介绍了汇编源码,易语言反汇编源码,win7用远程汇编源码,反汇编源码,易语言汇编源码等相关知识,希望对您有所帮助,也希望大家支持linkedu.com www.linkedu.com
</div>

这个都是过去DOS时代的汇编源码,虽然已经过去了,但是对于学习汇编还是有帮助的,汇编语言只是程序员一门基础语言,大多人掌握即可,不一定要深入研究.......

Date: 4 December 89, 09:53:09 EDT
From: Antonio@garcon.cso.uiuc.edu, Quezada-Duarte@garcon.cso.uiuc.edu,
Subject: Disabling CTRL-ALT-DEL
  Marcelo H. Ang Jr in his letter dated Nov 11th 1989 asks for a program
 to disable CTRl+ALT+DEL, well.., here it is, i've used it on my
 TANDY 1000A with no problems and in PS/2's 25 and 50 and had no
 problems at all either.
 To use it just type, from the dos prompt:
 MASM NOCAD; (of course you need MASM)
 LINK NOCAD; (and of course you need a linker)
 NOCAD
  If you type NOCAD once it has been loaded, it will tell you so.
  I've used it with DOS 3.30, but it works just as well under DOS
  2.00 and above.
  If you have any comment of any kind please let me know.
  And have a nice new decade everybody.
cut here: ************************************************************
page 255,132              ;just to get a nice list file
comment  :
     Program to prevent CTRL+ALT+DEL from restarting the system
     WARNING: Once loaded, you only have three choices:
       1) Turn power off
       2) Use a reset button (not all the machines have one)
       3) Generate INT 19h
     WARNING: If you have a program that uses INT 0CDh, change
         this value in the equates line below to the number
         of a not used INT. This method is used because
         there are too many programs that hook INT 9 Vector and
         we can't be sure it always points to the end of our
         notice (and start of our ISR).
     NOTE: For memory references i use parentheses instead of
        square brackets because of ASCII-EBCDIC translations.
        It works the same under Microsoft's MASM 4.0
     NOTE: NOCAD won't work if you press CTRL+ALT+DEL from
        a program that hooked to INT 9 before NOCAD
        (example: SideKick). Solution: Load NOCAD before
        everything else.
 Author   Antonio Quezada-Duarte
       Monterrey, Nuevo Leon, MEXICO
       Monterrey's Technologic Institute
       ID No 296641
       Bitnet Address  AL296641@TECMTYVM
               BL296641@TECMTYVM
       Feel free to share this with anyone while
       leaving the copyright notice intact.
       If you have any comment please let me know,thanks.  :
ctrl equ 0100b            ;bit map for ctrl key
alt equ 1000b            ;bit map for alt key
free_vector equ 0CDh          ;vector used to prevent double loading
                    ;change it if your system uses INT 0CDh
  nocad segment byte 'CODE'
  assume cs:nocad, ds:msgs, es:nothing, ss:stack
   Copyright db 'Antonio Quezada-Duarte ITESM ISC 296641 Monterrey '
        db 'Nuevo Leon MEXICO'
   Cright_Len equ $-Offset Copyright
  new_int_9h proc near
   push ax
   push ds             ;save registers
   xor ax,ax
   mov ds,ax            ;point DS to BIOS data area
                    ;well, actually BIOS data area
                    ;starts at 0040:0000, but
                    ; XOR AX,AX is faster than MOV AX,40h
   mov al,ds:(417h)         ;get keyboard flags
   and al,ctrl+alt         ;clear non relevant bits
   cmp al,ctrl+alt         ;compare to our map
   jne go_ahead           ;NO CTRL+ALT keys pressed
   and byte ptr ds:(417h),not alt  ;CTRL+ALT pressed
                    ;clear ALT key bit to simulate
                    ;ALT key is not pressed
go_ahead:
   pushf              ;old ISR returns with IRET
   COMMENT :
     The Following code stands for
       CALL OLD_INT_9
        Where OLD_INT_9 is a FAR PROC
        this is faster than having the address of OLD_INT_9
        stored in memory and doing a
        CALL CS:(OLD_INT_9)
                        :
   DB 9Ah
     OLD_INT_9_OFS DW 0
     OLD_INT_9_SEG DW 0      ;call old INT 9 ISR
   pop ds
   pop ax              ;restore registers
   iret               ;return to caller
  new_int_9h endp
    begin proc near
     push es           ;save psp base address
     mov dx,seg msgs
     mov ds,dx
     mov dx,offset msg_0
     mov ah,9
     int 21h
     mov ax,3500h + free_vector
     int 21h
     mov di,bx          ;ES:DI ===> start of INT 0CDh ISR
     mov si,offset copyright
     mov ax,cs
     mov ds,ax          ;DS:SI ===> THIS code copyright notice
     mov cx,cright_len
     cld
     repe cmpsb          ;compare
     je loaded          ;if equal then already loaded
     mov ax,2500h + free_vector
     mov dx,cs
     mov ds,dx
     mov dx,offset copyright
     int 21h           ;point free_vector INT vector to
                    ;our copyright notice
     mov ax,3509h
     int 21h           ;get pointer to INT 9 ISR
     mov cs:old_int_9_ofs,bx
     mov cs:old_int_9_seg,es   ;put it IN the new INT 9 ISR
     mov ax,2509h
     mov dx,offset new_int_9h
     push cs
     pop ds
     int 21h           ;point INT 9 vector to our ISR
     mov dx,seg msgs
     mov ds,dx
     mov dx,offset msg_1
     mov ah,9
     int 21h           ;print loaded msg
     pop ds            ;get saved psp base address
     mov es,ds:(2Ch)
     mov ah,49h
     int 21h           ;free environment's memory
                    ;assume no error
     mov dx,offset begin     ;everything up to BEGIN
     add dx,10Fh         ;and all the bytes needed to
     mov cl,4           ;make a full paragraph ...
     shr dx,cl
     mov ax,3100h         ;... stay resident
     int 21h           ;and return exit code = 0
loaded:  pop ax            ;get psp address out of stack
                    ;any register will do
     mov dx,seg msgs
     mov ds,dx          ;point DS to our data area
     mov dx,offset msg_2
     mov ah,9
     int 21h           ;print already loaded msg
     mov ax,4C01h
     int 21h           ;terminate with exit code = 1
    begin endp
    nocad ends
    msgs segment word 'DATA'
     msg_0 db 10,13,'NOCAD: Prevent CTRL+ALT+DEL from restarting the '
        db 'system',10,13,'Author: Antonio Quezada-Duarte',10,13,'$'
     msg_1 db 10,13,'NOCAD Loaded OK.',10,13,'$'
     msg_2 db 10,13,'NOCAD Already Loaded.',10,13,'$'
    msgs ends
    stack segment para

分享到:QQ空间新浪微博腾讯微博微信百度贴吧QQ好友复制网址打印

您可能想查找下面的文章:

  • 汇编源码系列之inthand
  • 汇编源码系列之cdcheck
  • 汇编源码系列之cldoc12
  • 汇编源码系列之basload
  • 汇编源码系列之basmain
  • 汇编源码系列之brk2
  • 汇编源码系列之cleanf
  • 汇编源码系列之charop
  • 汇编源码系列之sertype
  • 汇编源码系列之comint

相关文章

  • 2017-06-28(汇编源代码 )简单的取系统时间小程序
  • 2017-06-28Casl汇编语言辅导
  • 2017-06-28Windows下反汇编程序例子
  • 2017-06-28汇编教程之树型视图控件
  • 2017-06-288086/88的内存寻址方式
  • 2017-06-28动态库的执行时间
  • 2017-06-28汇编中使用打开对话框
  • 2017-06-28树型视图控件详解
  • 2017-06-17伪操作
  • 2017-06-28汇编教程之基本概念(win32)

文章分类

  • JavaScript
  • ASP.NET
  • PHP
  • 正则表达式
  • AJAX
  • JSP
  • ASP
  • Flex
  • XML
  • 编程技巧
  • Android
  • swift
  • C#教程
  • vb
  • vb.net
  • C语言
  • Java
  • Delphi
  • 易语言
  • vc/mfc
  • 嵌入式开发
  • 游戏开发
  • ios
  • 编程问答
  • 汇编语言
  • 微信小程序
  • 数据结构
  • OpenGL
  • 架构设计
  • qt
  • 微信公众号

最近更新的内容

    • 通用控件详解
    • 汇编语言的符号、标号和变量符号
    • 汇编中使用打开对话框
    • 几种基本的逻辑运算
    • 了解汇编命令行参数
    • 汇编源码系列之cldoc12
    • 80386的中断和异常
    • 指令格式
    • 汇编结构类型转换快速操作
    • 汇编教程之窗口子类化

关于我们 - 联系我们 - 免责声明 - 网站地图

©2020-2025 All Rights Reserved. linkedu.com 版权所有