亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? lpc.asm

?? DOS 源碼 系列之 BIOS ,上傳與大家分享
?? ASM
字號:
        PAGE    ,132
        TITLE   'Power Control Transient Portion'

;-----------------------------------------------------------------------------
;       Power control transient module for POWER.EXE
;
;       This file contains the transient code used to turn power
;       monitoring on and off from the command line.
;
;       Microsoft Confidential
;       Copyright (C) 1991 Microsoft Corporation 
;       All Rights Reserved.
;
; This code is bound to the device driver image of POWER.EXE.  This
; transient program can be used to turn power control on and off.
; POWER has the following options:
;
;       POWER [ADV | STD |OFF |SOUND |/?]
;               ADV   - Monitors applications and devices
;               STD   - Monitors devices only
;		OFF   - turns off all pw. management
;               SOUND - activate speaker during idle (debug version only) - toggle
;               /? - print help message
;
; MODIFICATIONS:
;	M004	9/5/91	NSM	power status from APM in BL reg. was trashed
;				and so we were skipping call to get and print
;				APM stats. Fixed by storing status and
;				using it whenever we need to look at current
;				POWER status
;	M007	09/11/91 SMR	B#2669. Registered POWER's 2f channels
;					in mult.inc
;	M009	09/11/91 SMR	Build non-debug version.
;
;  	M010	09/12/91 SMR	PWR_API returns 0 in AX instead of no carry flag
;				in case of no error
;	M011	09/17/91 NSM	PWR_API returns the version no in AX for the
;				install_chk call and so we shouldn't chk for
;				AX==0 for install-chk call.
;	M087	09/23/91 NSM	Install_chk returns 504d in BX and not 4d50
;				B#2756
;
;	M089	09/25/91 NSM	UI changes.	
;
;	M092	10/18/91 NSM	B#2872(5.1) Clear out BH
;				(correction for a typo: xor was entered as or)
;-----------------------------------------------------------------------------

Trans_Code      segment word public 'CODE'
Trans_Code      ends

Trans_Data      segment word public 'DATA'
Trans_Data      ends

Trans_Stack     segment para stack 'STACK'
        db      512 dup (?)
Trans_Stack     ends

break		macro		; satisfy mult.inc & pdb.inc		; M009
		endm							; M009

include		mult.inc				; M007
include         power.inc
include         pdb.inc

; DOS calls used
EXIT            equ     4Ch
OUT_STRING      equ     09h
OUT_CHAR        equ     02h

Trans_Data      segment
include         powermsg.inc

psp             dw      0,0             ; stores our PSP address 

digit_buf       db      8 dup (0)       ; stores chars generated by get_dec

idle_data	IDLE_INFO	<>

pow_status	db	0		; M004 ; to store current POWER
					; enabled/disabled state

Trans_Data      ends

Trans_Code      segment
        assume  cs:Trans_Code, ds:nothing, es:nothing

        extrn   get_dec:near, uldiv:near, lmul:near        
        
start:
        public  start
        mov     ax,Trans_Data
        mov     ds,ax                   ; set up data segment
        assume  ds:Trans_Data

        mov     [psp]+2,es              ; save our PSP address for later
        
; look at the command line and determine what we are supposed to be
; doing.  

        les     bx,dword ptr [psp]      ; recover our PSP address
        lea     di,es:[bx].PDB_TAIL
        cmp     es:[bx].PDB_TAIL,0      ; is there a command line?
	je	not_help		; no tail; go display stats
look_at_tail:
	inc	di			; skip the first blank in tail

clear_spaces:
        cmp     es:byte ptr [bx+di],' ' ; scan past any spaces
        jne     get_command_option      ; not a space, load it and check it
        inc     di
        jmp     short clear_spaces      ; assume we will stop on CR terminator

get_command_option:
        mov     ax,es:word ptr [bx+di]  ; get start of command line,
        cmp     ax,'?/'                 ; looks like /?
	jne	not_help
	jmp	display_help

not_help:

; We've established this is not /?.  Now check for other options        
; before proceeding, detect the presence of POWER by power detect call

	push	bx
	mov	ax,(MultPWR_API*256)+00h; POWER detect mult.call ; M007
	int	2fh
	cmp	ax,(MultPWR_API*256)+00h; MultAPI code unchanged ? ; M011
	jnz	chk_signature		; M011
to_open_fail:
	jmp	open_failed
chk_signature:
	cmp	bx,504dh		; M087 signature correct ?
	jne	to_open_fail

IFDEF	DEBUG
	push	di
        lea     dx,rev_msg      	; Display current rev. no & date
        mov     ah,OUT_STRING		;
        int     21h                     
	pop	di
ENDIF
	pop	bx

        mov     ax,es:word ptr [bx+di]  ; get start of command line,

        cmp     al,13                   ; is it the CR terminator?
        je      display_info            ; yes, just go display status
	cmp	al,0			; no tail at all
	je	display_info		; just display status

        or      ax,2020h                ; map to lower case -- this is a
                                        ; command line, so don't need lang.
                                        ; independence
; M089 BEGIN - UI changes

        cmp     ax,'da'                 ; turning on?
        je      turn_on_all
	cmp	ax,'ts'			; Standard ?
	je	turn_on_FW
        cmp     ax,'fo'                 ; looks like OFF?
        je      turn_off                ; 

; M089 END

IFDEF      DEBUG           ; only active in debug version
        cmp     ax,'os'                 ; looks like SOUND?
        jne     bad_command             ; none of the above, parameter error

; User requests we toggle control of speaker on at idle
	mov	ax,(MultPWR_API*256)+02h; change allocation strategy ; M007
	mov	bl,80h			; special value for SOUND toggle
	int	2fh
        jmp     short display_info      ; go show current state

bad_command:

ENDIF

; User provided an invalid command line

        lea     dx,bad_command_msg      ; scold the user
        jmp     err_exit

turn_on_all:        ; User requested power control be activated
	mov	bl,3			; set both F/W and S/W
;
change_pw_state:			; issue mult.int to turn on/off PW mgmt.
	mov	bh,1			; set  power state
	mov	al,I2F_PW_GET_SET_PWSTATE
	mov	ah,MultPWR_API		; M007
	int	2fh
        jmp     short display_info

turn_on_FW:
	mov	bl,2			; turn on only F/W
	jmp	short change_pw_state
	

turn_off:       ; User requests power control be deactivated
	xor	bl,bl		; turn off all pw mgmt
	jmp	short change_pw_state
	
        
display_info:   ; Print current state and idle stats
	mov	al,I2F_PW_GET_SET_PWSTATE
	mov	ah,MultPWR_API		; M007
	mov	bx,0			; get pw state
	int	2fh
	or	ax, ax			; M010
	jz	chk_status		; M010
	jmp	stats_failed		; error in get pw state ? just quit
chk_status:
	mov	[pow_status],bl		; M004
        lea     dx,power_stat1_msg      ; Display current POWER status
        mov     ah,OUT_STRING		; Whether "ON/OFF/NOAPP"
        int     21h                     

	or	bl,bl			; all pow.mgmt off ?
        lea     dx,power_off_msg         ; assume power control is off
	jz	got_msg			
	cmp	bl,2
	lea	dx,power_allon_msg
	jne	got_msg
	lea	dx,power_noid_msg
got_msg:
        mov     ah,OUT_STRING		
        int     21h                     
	lea	dx,power_stat2_msg	; complete the above stat msg
        mov     ah,OUT_STRING		
        int     21h                     

; Compute percentage of time idle if idle detection is on
	test	[pow_status],1		;M004; is idle detection on ?
	jz	Print_APM_Stats
        lea     dx,cpu_idle_msg1
        mov     ah,OUT_STRING
        int     21h

	lea	si,idle_data
	mov	cx,size IDLE_INFO
	mov	al,I2F_PW_GET_STATS
	mov	ah,MultPWR_API		; M007
	mov	bx,PW_GET_IDLE_STATS	; get only idle detection stats
	int	2fh			; get stats
	or	ax, ax			; M010
	jnz	stats_failed		; M010

	lea	bx,idle_data
        push    word ptr [bx].CPU_IDLE_TIME+2
        push    word ptr [bx].CPU_IDLE_TIME   ; get total idle time
        xor     ax,ax
        push    ax
        mov     ax,100
        push    ax
        call    lmul                    ; returns result in DX:AX
        add     sp,8
        push    word ptr [bx].CPU_ON_TIME+2
        push    word ptr [bx].CPU_ON_TIME
        push    dx
        push    ax
        call    uldiv                   ; returns result in DX:AX
        add     sp,8

	call	calc_and_print_no
        
        lea     dx,cpu_idle_msg2
        mov     ah,OUT_STRING
        int     21h

Print_APM_Stats:
IFDEF	INCL_APM
	test	[pow_status],2		;M004; is APM enabled ?
	jz	good_exit		; no, all stats display over
	call	Display_APM_Stats
ENDIF
	

good_exit:      ; And exit

        xor     al,al
        mov     ah,EXIT
        int     21h


; Help message display

display_help:
        lea     dx,help_text
        mov     ah,OUT_STRING
        int     21h
        jmp     short good_exit


; Various error exits

open_failed:
        
        lea     dx,open_failed_msg
        jmp     short err_exit

stats_failed:
        lea     dx,stats_failed_msg
err_exit:
        mov     ah,OUT_STRING
        int     21h                     ; display error message
        mov     ah,EXIT
        mov     al,1                    ; signal error on exit 
        int     21h                     

; END OF Main (of transient POWER.EXE)

calc_and_print_no	proc	near
;dx:ax = no to print
;
        lea     di,digit_buf
        call    get_dec                 ; convert result to ASCII

        mov     ah,OUT_CHAR
        lea     bx,digit_buf

next_digit:
        mov     dl,[bx]                 ; reached end of string?
        or      dl,dl
        jz      capn_end              ; yes, go wrap up
        int     21h                     ; print the character
        inc     bx                      ; point to next char in string
        jmp     short next_digit
capn_end:
	ret

calc_and_print_no	endp

IFDEF	INCL_APM

batt_stat_table	label	word
	dw	battery_high
	dw	battery_low
	dw	battery_critical
	dw	battery_charging

;***************************************** Display_APM_Stats
; display APM statistics (ACLine status, Battery status and battery life)
;

Display_APM_Stats	proc	near
	mov	ax,530ah		; get power status
	mov	bx,1
	int	15h			;
	jc	APM_stats_End
	push	cx
	push	bx
	cmp	bh,-1
	je	go_chk_batt_stat
        lea     dx,ACLine_Stat1
        mov     ah,OUT_STRING
        int     21h
	pop	bx
	push	bx
        lea     dx,AC_Offline_str
	or	bh,bh
	je	go_print_acstat
	lea	dx,AC_Online_str
go_print_acstat:
        mov     ah,OUT_STRING
        int     21h
        lea     dx,ACLine_Stat2
        mov     ah,OUT_STRING
        int     21h

go_chk_batt_stat:
	pop	bx
	cmp	bl,-1
	je	go_print_batt_life
	xor	bh,bh		; M092
	push	bx
	lea	dx,battery_status1
        mov     ah,OUT_STRING
        int     21h
	pop	bx
	shl	bx,1		; word offset
	mov	dx,cs:batt_stat_table[bx]
        mov     ah,OUT_STRING
        int     21h

	lea	dx,battery_status2
        mov     ah,OUT_STRING
        int     21h

go_print_batt_life:
	pop	cx
	cmp	cl,-1
	je	APM_stats_End
	mov	ax,cx
	xor	ah,ah
	push	ax
	lea	dx,battery_life_str1
        mov     ah,OUT_STRING
        int     21h
	pop	ax
	xor	dx,dx
	call	calc_and_print_no
	lea	dx,battery_life_str2
        mov     ah,OUT_STRING
        int     21h
APM_stats_END:
	ret

Display_APM_Stats	endp

ENDIF

Trans_Code      ends

        end     start

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
韩国视频一区二区| 精品一区二区成人精品| 久久久99精品久久| 久久这里只有精品6| 久久久久亚洲蜜桃| 国产婷婷色一区二区三区在线| 精品国产免费一区二区三区四区| 日韩区在线观看| 久久久精品黄色| 中文字幕一区二区三| 一区二区久久久| 美女网站一区二区| 国产精品2024| 一本大道久久精品懂色aⅴ| 在线观看av不卡| 精品国精品国产| 国产精品美女久久久久久久网站| 亚洲色图在线看| 午夜伦理一区二区| 激情小说亚洲一区| 不卡的av中国片| 欧美电影影音先锋| 久久精品人人做| 亚洲在线视频网站| 91网站视频在线观看| 色狠狠综合天天综合综合| 在线观看91av| 亚洲欧洲日韩av| 蜜桃av噜噜一区| 成人综合日日夜夜| 91精品国产综合久久小美女| 久久精品免费在线观看| 亚洲人成小说网站色在线| 奇米在线7777在线精品| 成人黄色av电影| 欧美高清精品3d| 中文字幕第一区综合| 日本一区中文字幕| 99精品视频在线观看免费| 日韩精品一区二区三区swag | 欧美日韩国产影片| 久久尤物电影视频在线观看| 亚洲免费观看高清完整版在线| 免费成人深夜小野草| 99精品久久99久久久久| 精品播放一区二区| 亚洲夂夂婷婷色拍ww47| 成人av网站免费| 精品国产免费一区二区三区四区| 美国毛片一区二区| 色婷婷av一区二区三区之一色屋| www亚洲一区| 亚洲va欧美va人人爽午夜| 国产成人精品影院| 欧美电影免费观看高清完整版| 亚洲免费毛片网站| 国产在线国偷精品免费看| 欧美狂野另类xxxxoooo| 亚洲视频资源在线| 成人精品免费看| 国产亚洲欧美中文| 狠狠色2019综合网| 欧美一区二区三区在线观看视频| 亚洲精品国产a久久久久久| 国产不卡视频在线播放| 久久无码av三级| 狠狠色丁香久久婷婷综合_中 | 中国av一区二区三区| 精品一区二区久久久| 欧美一级欧美一级在线播放| 亚洲福利电影网| 欧美精品在线一区二区| 亚洲成人av一区二区三区| 欧美日韩免费观看一区三区| 亚洲一二三四区| 欧美三级视频在线观看| 视频一区视频二区中文字幕| 欧美日韩精品福利| 五月综合激情婷婷六月色窝| 欧美一区二区三区婷婷月色 | 欧美不卡一二三| 精品亚洲国内自在自线福利| 久久影院电视剧免费观看| 国内不卡的二区三区中文字幕| 精品国产乱码久久久久久1区2区| 狠狠色丁香婷婷综合| 国产网红主播福利一区二区| 成人av片在线观看| 亚洲精品ww久久久久久p站| 欧美三级日韩在线| 久久成人免费网站| 国产精品久久久久一区二区三区共| 99v久久综合狠狠综合久久| 夜夜夜精品看看| 欧美哺乳videos| 成人美女视频在线观看| 亚洲国产美国国产综合一区二区| 3d动漫精品啪啪一区二区竹菊| 捆绑变态av一区二区三区| 久久久91精品国产一区二区三区| 97精品久久久午夜一区二区三区 | 欧美精品久久久久久久多人混战 | 亚洲欧美另类图片小说| 欧美视频一区在线| 麻豆国产欧美日韩综合精品二区| 日本一区二区视频在线| 欧美在线免费观看视频| 国产一区二区三区av电影 | 日韩欧美的一区| 99视频精品全部免费在线| 午夜激情一区二区三区| 国产精品三级av| 51精品国自产在线| 91麻豆免费观看| 美腿丝袜在线亚洲一区| 一区二区三区四区在线| 久久综合五月天婷婷伊人| 欧美视频中文字幕| 成人性生交大合| 蜜桃视频一区二区三区在线观看| 国产精品国产三级国产aⅴ原创| 91精品国产高清一区二区三区蜜臀| 床上的激情91.| 麻豆久久久久久| 亚洲一区二区三区在线| 国产精品传媒在线| 久久先锋影音av鲁色资源| 在线成人小视频| 欧美午夜理伦三级在线观看| 国产一区在线看| 免费看欧美女人艹b| 亚洲一区精品在线| 成人欧美一区二区三区小说| 久久婷婷综合激情| 欧美一区二区在线播放| 欧美日韩在线亚洲一区蜜芽| 色婷婷久久久亚洲一区二区三区 | 91国偷自产一区二区三区成为亚洲经典| 久久99精品久久久久久国产越南| 亚洲图片一区二区| 亚洲在线观看免费视频| 亚洲品质自拍视频网站| 国产精品久久久久久久久动漫| 久久久99精品免费观看不卡| 久久亚洲二区三区| 久久日韩粉嫩一区二区三区| 欧美精品一区二区在线播放| 欧美成人一级视频| 2021国产精品久久精品| 欧美v国产在线一区二区三区| 欧美日韩高清一区二区三区| 欧美日韩一区中文字幕| 欧美日精品一区视频| 欧美日韩国产一区| 6080日韩午夜伦伦午夜伦| 欧美日本乱大交xxxxx| 欧美日韩成人一区| 欧美一区二区三区在| 精品国内二区三区| 日本一区二区三区在线不卡| 国产精品家庭影院| 亚洲欧洲日韩av| 亚洲国产精品久久艾草纯爱 | 成人免费视频视频| 一本大道久久a久久综合| 在线亚洲一区二区| 欧美二区三区91| 久久亚洲一级片| 国产精品你懂的在线欣赏| 中文字幕在线观看一区| 亚洲一卡二卡三卡四卡无卡久久| 亚洲大片免费看| 久久99久久久欧美国产| 丁香激情综合国产| 日本道免费精品一区二区三区| 欧美性猛片aaaaaaa做受| 538在线一区二区精品国产| 久久久精品国产免大香伊| 日韩一区日韩二区| 秋霞电影网一区二区| 高清在线不卡av| 欧美日韩中文字幕一区| 久久伊人蜜桃av一区二区| 中文字幕佐山爱一区二区免费| 亚洲444eee在线观看| 粉嫩aⅴ一区二区三区四区五区 | www精品美女久久久tv| 国产精品久久久久久妇女6080| 亚洲国产日韩av| 极品少妇xxxx偷拍精品少妇| www.视频一区| 日韩精品一区在线观看| 亚洲日本免费电影| 美女网站视频久久| 91激情五月电影| 久久九九99视频| 蜜臀av一区二区在线免费观看| 99视频热这里只有精品免费| 日韩欧美的一区| 亚洲aaa精品|