如何关闭显示器

1982xcc 2003-08-29 08:44:07
同上
...全文
295 9 打赏 收藏 转发到动态 举报
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
kuangjingbo 2003-09-01
  • 打赏
  • 举报
回复
基本上,

嗯,


可以用手。
predrose 2003-09-01
  • 打赏
  • 举报
回复
这么麻烦?只需2条语句:(DEBUG)
;Turn OFF
O 3C4 1
O 3C5 20
;Turn ON
O 3C4 1
O 3c5 0
紫郢剑侠 2003-08-31
  • 打赏
  • 举报
回复
下面是我以前写的DOS下的黑屏保护程序, 用低版本MASM生成, COM格式.
第一次运行时常驻内存, 再次运行时退出.
在DOS6.X和WIN9X的全屏MSDOS方式下正常工作.
程序修改了1CH中断和键盘中断.所以在运行某些同样修改了这两个中断但没有回调的软件时可能无法实现黑屏, 目前发现的有:明伦五笔高手速成.

;<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
;Name : SafeScr.asm
;Function : Disapears the screen when user doesn't press key
;Author : Purple Endurer
;Reference: Computer paper 1996U243, Software 1993 P114
;<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

cseg segment
assume cs: cseg, ds: cseg
org 100h
start: jmp @Init
;====================
Old1cAddr label dword
Old1cOff dw ?
Old1cSeg dw ?
Old09Addr label dword
Old09Off dw ?
Old09Seg dw ?
mcb_evb dw ? ; mcb: Memmory Control Block
mcb_psp dw ?
show dw 1
count dw 0
VarLen equ $ - Old1cAddr
time equ 1000

;///////////////////////////
new1ch proc far
;///////////////////////////
;sti
push ax
push bx
inc cs:[count]
;mov ax, cs: [time]
cmp cs:[count], time
jne @New1chEnd
mov bl, 36h
mov ax, 1201h
int 10h
mov cs:[count], 0
mov cs:[show], 0
@New1chEnd:
pop bx
pop ax
jmp cs:Old1cAddr
new1ch endp

;///////////////////////////
new09h proc far
;sti
push ax
push bx
cmp cs:[show], 1h
je @New09hEnd
mov cs:[show], 0h
mov bl, 36h
mov ax, 1200h
int 10h
@New09hEnd:
mov cs:[count], 0
pop bx
pop ax
jmp cs:Old09Addr
new09h endp
;///////////////////////////

@Init:
mov ax, 3509h ; Get current 1ch interrupt vector
int 21h

cmp bx, offset new09h ; Has been Intalled?
jnz @install ; No install

mov dx, offset strMsgUninstall
mov ah, 09h
int 21h

mov bx, 1ch * 04h ; Restore old 1ch interrupt vector
xor ax, ax ; to System interrupt vector talbe
mov ds, ax
mov ax, es:[Old1cOff]
mov ds:[bx], ax
mov ax, es:[Old1cSeg]
mov ds:[bx+2], ax

mov bx, 09h * 04h ; Restore old 09h interrupt vector
mov ax, es:[Old09Off] ; to System interrupt vector talbe
;xor ax, ax
;mov ds, ax ; ds must equal 0
mov ds:[bx], ax
mov ax, es:[Old09Seg]
mov ds:[bx+2], ax

mov bx, 1 ; Release evirenment parameter block
mov ax, es:[mcb_evb]
mov ds, ax
mov word ptr ds:[bx], 0

mov ax, es:[mcb_psp] ; Release TSR
mov ds, ax
mov word ptr ds:[bx], 0
mov ax, 4c00h
int 21h

@install:
;mov ax, 3509h ; Get current 1ch interrupt vector
;int 21h
mov Old09Seg, es ; Store current 09h interrupt vector
mov Old09Off, bx

mov dx, offset new09h ; Set new 09h interrupt vector
mov ax, 2509h
int 21h

mov ax, 351ch ; Get current 1ch interrupt vector
int 21h
mov Old1cSeg, es ; Store current 1ch interrupt vector
mov Old1cOff, bx

mov dx, offset new1ch ; Set new 1ch interrupt vector
mov ax, 251ch
int 21h

mov dx, offset strMsgInstall
mov ah, 09h
int 21h

; Store the address of evirenment parameter block
mov ax, cs
dec ax
mov [mcb_psp], ax ;mov cs:[mcb_psp], ax
mov bx, 2ch
mov ax, [bx] ;mov ax, cs:[bx]
dec ax
mov cs:[mcb_evb], ax

mov dx, offset @Init
add dx, VarLen + 2
mov cl, 04h
shr dx, cl
mov ax, 3100h
int 21h
;====================
strMsgInstall db 07h, "Screensafer installed!$"
strMsgUninstall db 07h, "Screensafer uninstalled!$"
cseg ends
end start
W32API 2003-08-31
  • 打赏
  • 举报
回复
黑屏不是关闭显示器吧。。。
VGA 有这方面的功能接口
1982xcc 2003-08-31
  • 打赏
  • 举报
回复
谢谢Purpleendurer(Purplenendurer)
关于你的程序有几处询问一下
对于屏幕的内容是如何保存的 通过Store the address of evirenment parameter block
这段看得不是太明白,保存屏幕的内容 我曾想过通过文件保存的方式,但是存在问题,那篇关于两个程序的贴子你也看了

还有其他方式保存屏幕的内容么

W32API 2003-08-30
  • 打赏
  • 举报
回复
要做什么?
在自己的软件里面加入?还是写屏幕保护程序?
1982xcc 2003-08-30
  • 打赏
  • 举报
回复
是一个屏保
1982xcc 2003-08-30
  • 打赏
  • 举报
回复
在dos下,关闭显示器
紫郢剑侠 2003-08-30
  • 打赏
  • 举报
回复
DOS下还是WINDOWS下?

21,453

社区成员

发帖
与我相关
我的任务
社区描述
汇编语言(Assembly Language)是任何一种用于电子计算机、微处理器、微控制器或其他可编程器件的低级语言,亦称为符号语言。
社区管理员
  • 汇编语言
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧