谁有用汇编写的屏保原代码

GhostAdz 2003-08-20 02:12:54
谁有用纯汇编写的屏保原代码
发上来 就揭贴
...全文
90 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
GhostAdz 2003-08-21
  • 打赏
  • 举报
回复
好 那就揭贴了 可惜没注释 安装部分都看懂
其他如果看不懂 我会贴问题问你的 顺便再给你另外的20
搞懂了 就给了
紫郢剑侠 2003-08-21
  • 打赏
  • 举报
回复
下面这个是我以前写的.主要是修改了1CH中断和键盘中断, 在新的1CH中断中不停检测用户是否使用键盘, 若在一定时间内没有则黑屏.
用低版本MASM生成COM格式,第一次运行时常驻内存,再运行则退出.
在纯DOS和WINDOWS 9X(2000/me/xp/2003没试过)的全屏DOS下有效.
但有些软件修改了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
GhostAdz 2003-08-20
  • 打赏
  • 举报
回复
给我讲思路也可以啊
GhostAdz 2003-08-20
  • 打赏
  • 举报
回复
win32的我也有的
我要dos汇编的
谁给我 就再加20分
romyks 2003-08-20
  • 打赏
  • 举报
回复
在ASM.YEAH.NET上有的载,是WIN32汇编

21,459

社区成员

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

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