阅读:1952回复:0
keyboard-lamp.asm
;本文是根据KmdKit改编而来
;若有啥事请与我联系: ;QQ:112426112 ;Email:leguanyuan@126.com ;Websites:http://correy.webs.com ;ml /coff keyboard-lamp.asm /link /subsystem:windows .386 .model flat, stdcall option casemap:none include windows.inc include kernel32.inc include user32.inc includelib kernel32.lib includelib user32.lib .data? x dd ? y dword ? z dd ? .data over db "game over!",0 correy db "made by correy",0 notice db "点击确定后,请看你键盘上的各种指示灯!",0 dn db "\\.\KbdGarland",0 noo db "建立对象失败,不能运行。",0 aa db "KbdGarland",0 bb db "\Device\KeyboardClass0",0 .code start: invoke DefineDosDevice,DDD_RAW_TARGET_PATH,addr aa,addr bb invoke MessageBox,0,addr notice,addr correy,0 invoke CreateFile,addr dn,0,0,0,3,0,0 cmp eax,-1 je noob mov z, eax mov ebx,9;亮灯的遍数 again:mov word ptr y+2,4;让caps灯亮至少0.1秒,直到调用下一个DeviceIoControl函数成功。 invoke DeviceIoControl,z,0b0008h,addr y,4,0,0,addr x,0 invoke Sleep,100 mov word ptr y+2,1;让scroll灯亮至少0.1秒,直到调用下一个DeviceIoControl函数成功。 invoke DeviceIoControl,z,0b0008h,addr y,4,0,0,addr x,0 invoke Sleep,100 mov word ptr y+2,2;让number灯亮至少0.1秒,直到调用下一个DeviceIoControl函数成功。 invoke DeviceIoControl,z,0b0008h,addr y,4,0,0,addr x,0 invoke Sleep,100 dec ebx cmp ebx,0 jne again invoke MessageBox,0,addr over,addr correy,0 jmp exit noob:invoke MessageBox,0,addr noo,addr correy,0 exit:invoke DefineDosDevice, DDD_REMOVE_DEFINITION,addr aa,0 invoke ExitProcess,0 end start ;made in 2010.05.27 |
|
|