asmio.asm

来自「masm32环境」· 汇编 代码 · 共 46 行

ASM
46
字号
;------------------------------------------------------------
; Win32Asm stupid sample for WinIo v1.2
;------------------------------------------------------------
; Example by Exagone (http://exagone.cjb.net)
; Uses winIO library by Yariv Kaplan  (www.internals.com)
; 
; NOTE: You may not notice anything at all when you run this
; sample, on my keyboard the status led's blinked for a 
; moment. All this example does is resetting the keyboard by
; sending the 0ffh byte to port 60h. 
;
; best viewed at tabspacing = 4, the libraries and include
; files from the masm package @ http://win32asm.cjb.net 
; are used.
;
.486
.model flat, stdcall
option casemap:none

include		\masm32\include\kernel32.inc
include		\masm32\include\user32.inc
include		\masm32\include\windows.inc
includelib	\masm32\lib\kernel32.lib
includelib	\masm32\lib\user32.lib

includelib	WinIo.lib	;<<<<<<<<<<<<<<<<<<<<<< Library
include		WinIo.inc	;<<<<<<<<<<<<<<<<<<<<<< Include file

.data

.data?


.code
start:
	invoke	InitializeWinIo
	; ---- Just an example: ----
	invoke	SetPortVal, 060h, 0ffh, 1
	; output byte 0ffh to port 60h, this will reset keyboard, most keyboards will
	; lighten up the num/caps/scroll-lock lights for a moment.
	
	invoke	ShutdownWinIo
	invoke	ExitProcess, NULL


end start

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?