|
![]() | 作者: pizi [pizi]
![]() |
登录 |
谁会这个语言啊?? 帮我做一个啊,谢谢拉 各位大虾帮帮忙~~~~ |
地主 发表时间: 06/28 19:46 |
![]() | 回复: 286 [unique] ![]() |
登录 |
972病毒的杀毒源程序。 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Kill972 By 286, China,HeNan ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; CODE SEGMENT org 100h assume cs:CODE,ds:CODE,es:CODE,ss:CODE MAIN PROC NEAR jmp begin MSG0 db 'Please Input FileName:$' FNAME db 50 db 0 db 50 dup (0) MSG1 db 0dh,0ah,'No Virus in file!',0dh,0ah,'$' MSG2 db 0dh,0ah,'Find Virus!',0dh,0ah,'$' MSG3 db 0dh,0ah,'Kill Successfully!',0dh,0ah,'$' ERROR db 0dh,0ah,'File Not Found!',0dh,0ah,'$' HANDLE dw 0 NUMB1 dw 0 ;文件长度<>File Length NUMB2 dw 0 ;原文件长<>OldFile Length VirusLength dw 972 DISPSTR MACRO ADDR lea dx,ADDR mov ah,9 int 21h ENDM begin: DISPSTR MSG0 ;"请输入文件名:"<>"Input FileName" mov ah,0ah ;键盘缓冲区输入<>Keyboard buffer input lea dx,FNAME ;ds:dx=>缓冲区<>Buffer int 21h lea bx,FNAME+1 tail0: inc bx cmp byte ptr [bx],0dh jnz tail0 mov byte ptr [bx],0 ;生成ASCIIZ<> Creat ASCIIZ mov ax,3d02h lea dx,FNAME+2 int 21h ;Open with Read & Write jc er ;"文件没有找到"<>"File not Found" mov bx,ax mov HANDLE,ax mov ax,4202h ;Move Pointer to End of File xor cx,cx xor dx,dx int 21h cmp ax,VirusLength ;比病毒短:"没有感染" jbe no1 ;<>Shorter Than virusLength:"No Virus" mov NUMB1,ax ;实际字节数<>Byte Numbers in fact sub ax,VirusLength mov NUMB2,ax ;原文件长度<>OldFile Length mov ax,4200h ;Move Pointer to head of File xor cx,cx xor dx,dx int 21h mov ah,3fh mov cx,NUMB1 lea dx,Buffer int 21h mov ah,3eh int 21h ;关闭<>Close file lea di,Buffer add di,NUMB1 dec di cmp word ptr[di-971],6c42h jnz no1 cmp word ptr[di-969],06575h jnz no1 cmp byte ptr[di],0e9h ;病毒特征<>Staus of Virus jnz no1 jmp v er: jmp err v: DISPSTR MSG2 ;发现病毒<>"Found Virus" lea si,Buffer mov ax,[di-2] xor ax,1976h xor [si+1],ax mov al,[di-3] xor al,7ch xor [si],al jmp mm no1: jmp no mm: lea dx,FNAME+2 mov ax,3c00h ;创建<>Creat mov cx,0 ;属性<>Attribute mov dx,offset FNAME+2 ;DS:DX=>ASCIIZ int 21h mov bx,ax mov ah,40h ;写<>Write mov cx,NUMB2 ;长度<>Length lea dx,Buffer int 21h mov ah,3eh ;关闭<>Close int 21h DISPSTR MSG3 ;"成功杀掉"<>"Kill Successfully" jmp exit no: push cs pop ds DISPSTR MSG1 ;"没有感染"<>"Not be infected" mov bx,HANDLE mov ax,3e00h ;关闭<>Close int 21h jmp exit err: DISPSTR ERROR ;"文件没有找到"<>"File not Found" exit: mov ax,4c00h int 21h Buffer db 0 MAIN ENDP CODE ENDS END MAIN |
B1层 发表时间: 06/29 23:31 |
![]() | 回复: xdy [xdy] ![]() |
登录 |
花无秋 data segment hey db 'I suggest you to learn more thing about the structure of the comuter!',0dh,0ah,'$' data ends code segment assume cs:code,ds:data main: mov ax,data mov ds,ax mov cx,20 begin: mov ah,9 mov dx,offset hey int 21h dec cx cmp cx,0 jnz begin mov ah,4ch int 21h code ends end main 286 我问你一个问题:masm支持中文输出输入吗? 如果不支持可以推荐支持asm调试的中文工具吗? 谢了 |
B2层 发表时间: 11/23 22:25 |
![]() | 回复: 286 [unique] ![]() |
登录 |
masm支持即支持,又不支持中文。 masm在显示文字或字符时,其实也只是调用标准的中断。所以具体支持不支持要看那些标准中断是否支持,比如DOS,windows 95/97/98都可以正常显示。而完全支持unicode的操作系统,如windows 2000就不一定支持,是否支持你试试。 :) |
B3层 发表时间: 11/24 09:23 |
|
20CN网络安全小组版权所有
Copyright © 2000-2010 20CN Security Group. All Rights Reserved.
论坛程序编写:NetDemon
粤ICP备05087286号