⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mp.inc

📁 super io 监控程序
💻 INC
📖 第 1 页 / 共 2 页
字号:
        lea	si,Type0EntryAddress
	mov	di,ds:[si]
	call	DisplayEntryType0
        lea     si,Type0EntryCount
	mov	cx,ds:[si]
	mov	ax,ds:[si]
	dec	cx
	jz	EndOfEntryType0
LoopDisplayEntryType0:
	push	cx
	call	WaitOneKey
	call	DisplayEntryType0
	pop	cx
        loop    LoopDisplayEntryType0
EndOfEntryType0:
	ret
;----------------------------------------
MPType1Viewer:
	push	di
        lea	si,Type1EntryCount   
	mov	ax,ds:[si]
        mov     bh,(Blue shl 4)+White+LightColor          
	mov	cx,0528h
	mov	dx,cx
	add	dh,al
	inc	dh
	inc	dh
	add	dl,22 
        call    SetWindowsAttribute

	mov	dx,0528h+06h
	call	SetCursor
        lea     si,Type1Entry
	mov	bl,Yellow+(Blue shl 4)
        call    DisplayStringAttrib
	mov	dx,0628h
	call	SetCursor
        lea     si,Type1Header
	mov	bl,Cyan+(Blue shl 4)
        call    DisplayStringAttrib


        lea	si,Type1EntryAddress
	mov	di,ds:[si]
        lea	si,Type1EntryCount   
	mov	cx,ds:[si]

	mov	dx,0729h
LoopShowType1:
	push	cx
	call	SetCursor
	push	dx
	mov	al,es:[di]
	call	displayHex
	call	GetCursor
	mov	dl,49
	call	SetCursor
	mov	al,es:[di+1]
	call	displayHex
	call	GetCursor
	mov	dl,56
	call	SetCursor
	mov	cx,6
	mov	bx,2
DispBusString:
	mov	al,es:[di+bx]
	call	DisplayChar
	inc	bx
        loop    DispBusString

	pop	dx
	inc	dh
	pop	cx
	add	di,8
        loop    LoopShowType1

	pop 	di
	ret
;----------------------------------------
MPType2Viewer:
	push	di
        lea	si,Type2EntryCount   
	mov	ax,ds:[si]
        mov     bh,(Blue shl 4)+White+LightColor          
	mov	cx,0528h
	mov	dx,cx
	add	dh,al
	inc	dh
	add	dl,28 
        call    SetWindowsAttribute

	mov	dx,052fh
	call	SetCursor
        lea     si,Type2Entry
	mov	bl,Yellow+(Blue shl 4)
        call    DisplayStringAttrib
	mov	dx,0628h
	call	SetCursor
        lea     si,Type2Header
	mov	bl,Cyan+(Blue shl 4)
        call    DisplayStringAttrib


        lea	si,Type2EntryAddress
	mov	di,ds:[si]
        lea	si,Type2EntryCount   
	mov	cx,ds:[si]

	mov	dx,0729h
LoopShowType2:
	push	cx
	call	SetCursor
	push	dx
	mov	al,es:[di]		;type
	call	displayHex
	mov	dl,45
	call	SetCursor
	mov	al,es:[di+1]		;ID
	call	displayHex
	mov	dl,51
	call	SetCursor
	mov	al,es:[di+2]		;Version
	call	displayHex
	mov	dl,57
	call	SetCursor
	mov	al,es:[di+3]		;Flag   
	test	al,01h
        jz      Type2Dis
	mov	al,'E'
	call	Displaychar
	mov	al,'N'
	call	Displaychar
	jmp 	short Type2Address
Type2Dis:
	mov	al,'D'
	call	Displaychar
	mov	al,'I'
	call	Displaychar
	mov	al,'S'
	call	Displaychar
Type2Address:
	mov	dl,61
	call	SetCursor
	mov	al,es:[di+7]		;Address
	call	displayHex
	mov	al,es:[di+6]		;Address
	call	displayHex
	mov	al,es:[di+5]		;Address
	call	displayHex
	mov	al,es:[di+4]		;Address
	call	displayHex
	pop	dx
	inc	dh
	pop	cx
	add	di,8
        loop    LoopShowType2

	pop 	di
	ret
;----------------------------------------
MPType3Viewer:
	push	di
ViewType3Begin:
	call	ClearScreen
        mov     bh,(Blue shl 4)+White+LightColor          
	mov	cx,0000h
	mov	dx,1848h
        call    SetWindowsAttribute
	mov	dx,0016h
	call	SetCursor
        lea     si,Type3Entry
	mov	bl,Yellow+(Blue shl 4)
        call    DisplayStringAttrib
	mov	dx,0101h
	call	SetCursor
        lea     si,Type3Header
	mov	bl,Cyan+(Blue shl 4)
        call    DisplayStringAttrib

        lea	si,Type3EntryAddress
	mov	di,ds:[si]
        lea	si,Type3EntryCount  
	mov	cx,ds:[si]
	cmp	cx,23
        jbe     GoGoViewType3
	mov	cx,23
GoGoViewType3:
	mov	dx,0202h
LoopViewType3:
	push	cx
	push	dx
	call	SetCursor
	call	DisplayLocalAPICEntry
	pop	dx
	inc	dh
	pop	cx
	add	di,8
        loop    LoopViewType3

        lea	si,Type3EntryCount  
	mov	cx,ds:[si]
	cmp	cx,23
        jbe     GoGoViewType3End

	call	WaitOneKey 
	cmp	al,KeyEsc   
	jz	GoGoViewType3End

        mov     bh,(Blue shl 4)+White+LightColor          
	mov	cx,0200h
	mov	dx,1848h
        call    SetWindowsAttribute

        lea	si,Type3EntryCount  
	mov	cx,ds:[si]
	sub	cx,23
	mov	dx,0202h
LoopViewType31:
	push	cx
	push	dx
	call	SetCursor
	call	DisplayLocalAPICEntry
	pop	dx
	inc	dh
	pop	cx
	add	di,8
        loop    LoopViewType31
	call	WaitOneKey 
	cmp	al,KeyEsc   
	jz	GoGoViewType3End
        jmp     ViewType3Begin
GoGoViewType3End:

	pop	di
	ret
;----------------------------------------
MPType4Viewer:
	push	di
	call	ClearScreen
        mov     bh,(Blue shl 4)+White+LightColor          
	mov	cx,0000h
	mov	dx,1848h
        call    SetWindowsAttribute
	mov	dx,0015h
	call	SetCursor
        lea     si,Type4Entry
	mov	bl,Yellow+(Blue shl 4)
        call    DisplayStringAttrib
	mov	dx,0101h
	call	SetCursor
        lea     si,Type3Header
	mov	bl,Cyan+(Blue shl 4)
        call    DisplayStringAttrib

        lea	si,Type4EntryAddress
	mov	di,ds:[si]
        lea	si,Type4EntryCount  
	mov	cx,ds:[si]
	mov	dx,0202h
LoopViewType4:
	push	cx
	push	dx
	call	SetCursor
	call	DisplayLocalAPICEntry
	pop	dx
	inc	dh
	pop	cx
	add	di,8
        loop    LoopViewType4

	pop	di
	ret
;----------------------------------------
DisplayLocalAPICEntry:
	pusha
	mov	al,es:[di]		; Type
	call	DisplayHex

	mov	dl,7
	call	SetCursor
	mov	al,es:[di+1]      	; INT_type
        lea     si,APICINT
	cmp	al,0
	jz	ViewAPICINTType
        lea     si,APICNMI
	cmp	al,1
	jz	ViewAPICINTType
        lea     si,APICSMI
	cmp	al,2
	jz	ViewAPICINTType
        lea     si,APICEXTINT
ViewAPICINTType:
	call	DisplayString

	mov	dl,16
	call	SetCursor
	mov	al,es:[di+2]      	; Polarity
	and	al,03h
        lea     si,CustomerACT
	cmp	al,0
	jz	ViewAPICPO
        lea     si,ACTH
	cmp	al,1
	jz	ViewAPICPO
        lea     si,APICReserved
	cmp	al,2
	jz	ViewAPICPO
        lea     si,ACTL           
ViewAPICPO:
	call	DisplayString

	mov	dl,28
	call	SetCursor
	mov	al,es:[di+2]      	; Polarity
	and	al,0ch
        lea     si,CustomerACT
	cmp	al,0
	jz	ViewAPICEL
        lea     si,ETRI
	cmp	al,00000100b
	jz	ViewAPICEL
        lea     si,APICReserved
	cmp	al,00001000b
	jz	ViewAPICEL
        lea     si,LTRI           
ViewAPICEL:
	call	DisplayString

	mov	dl,45
	call	SetCursor
	mov	al,es:[di+4]      	; bus id     
	call	DisplayHex

	mov	dl,52
	call	SetCursor
	mov	al,es:[di+5]      	; IRQ        
	call	DisplayHex

	mov	dl,61
	call	SetCursor
	mov	al,es:[di+6]      	; ID         
	call	DisplayHex

	mov	dl,68
	call	SetCursor
	mov	al,es:[di+7]      	; INTIN      
	call	DisplayHex
	popa
	ret
;----------------------------------------
DisplayEntryType0:
	mov	dx,0528h
	call	SetCursor
        lea     si,LocalAPICID
	call	DisplayString
	mov	al,es:[di+1]
	call	DisplayHex

	mov	dx,0628h
	call	SetCursor
        lea     si,LocalAPICVer
	call	DisplayString
	mov	al,es:[di+2]
	call	DisplayHex

	mov	dx,0728h
	call	SetCursor
        lea     si,CPUGlags
	call	DisplayString
	mov	al,es:[di+3]
        lea     si,CPUUsed
	test	al,01h
	jnz	CPUENLabel
        lea     si,CPUUnUsed
CPUENLabel:
	call	DisplayString
	mov	al,es:[di+3]
        lea     si,CPUBP
	test	al,02h
	jnz	CPUBPLabel 
        lea     si,CPUNBP
CPUBPLabel:
	call	DisplayString

	mov	dx,0828h
	call	SetCursor
	lea	si,CPUSignature
	call	DisplayString
	mov	dx,0928h
	call	SetCursor
        lea     si,CPUStepping
	call	DisplayString
	mov	al,es:[di+4]
	and	al,0fh
	call	DisplayHex 
	mov	dx,0a28h
	call	SetCursor
        lea     si,CPUModel    
	call	DisplayString
	mov	al,es:[di+4]
	and	al,0f0h
	shr	al,4
	call	DisplayHex 
	mov	dx,0b28h
	call	SetCursor
        lea     si,CPUFamily   
	call	DisplayString
	mov	al,es:[di+5]
	and	al,0fh
	call	DisplayHex 

	mov	dx,0c28h
	call	SetCursor
        lea     si,CPUFeature
	call	DisplayString
	mov	al,es:[di+11]
	call	DisplayHex
	mov	al,es:[di+10]
	call	DisplayHex
	mov	al,es:[di+9]
	call	DisplayHex
	mov	al,es:[di+8]
	call	DisplayHex
	ret
;----------------------------------------
ViewTypeEntries	label	byte
	dw	MPType0Viewer
        dw      MPType1Viewer
        dw      MPType2Viewer
        dw      MPType3Viewer
        dw      MPType4Viewer
;----------------------------------------
MPSEntryString	label   byte
        dw      offset ds:CPUEntry     
        dw      offset ds:BusEntry     
        dw      offset ds:IOAPICEntry  
        dw      offset ds:IOINTEntry   
        dw      offset ds:LoaclINTEntry

⌨️ 快捷键说明

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