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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? arith.asm

?? 匯編的PIC程序
?? ASM
?? 第 1 頁 / 共 3 頁
字號:
;
;   Performance :
;               Program Memory  :   22 (excluding D_divS subroutine)
;               Clock Cycles    :   3000 (approximately,with 10 iterations)
;
;       The #of cycles depends on Number of Iterations Selected.
; In a lot of cases 5 or less iterations may be sufficient
;
;
;*******************************************************************
;               Newton-Raphson Method
;*************************************************************

Sqrt
	call    SqrtInit            ; compute initial sqrt = Num/2
nextIter
   #if MODE_FAST
	movfp    NumLo,ACCbLO
	movfp    NumHi,ACCbHI
   #else
	movfp    NumLo,wreg
	movwf     ACCbLO
	movfp    NumHi,wreg
	movwf     ACCbHI
   #endif
;
	call    D_divS          ; double precision division
				; double precision addition
	movfp    ACCdLO,wreg     ; ACCd + ACCa -> ACCd
	addwf     ACCaLO           ;addwf lsb
	movfp    ACCdHI,wreg
	addwfc    ACCaHI           ;addwf msb
				; now divide by 2
	bcf      _carry
	rrcf     ACCaHI
	rrcf     ACCaLO
;
	decfsz     iterCnt
	goto    nextIter
	return                     ; End Sqrt
;
SqrtInit
	movlw    _LUPCNT
	movwf     iterCnt         ; set number of iterations
  #if MODE_FAST
	movfp    NumHi,ACCaHI
	movfp    NumLo,ACCaLO
  #else
	movfp    NumHi,wreg
	movwf     ACCaHI
	movfp    NumLo,wreg         ; set initial guess root = NUM/2
	movwf     ACCaLO
  #endif
	bcf      _carry
	rrcf     ACCaHI
	rrcf     ACCaLO      ; set initial sqrt = Num/2
	return
;
	PAGE
;*******************************************************************
;                   8x8 Software Multiplier
;               ( Fast Version : Straight Line Code )
;
;   The 16 bit result is stored in 2 bytes
;
; Before calling the subroutine " mpy ", the multiplier should
; be loaded in location " mulplr ", and the multiplicand in
; " mulcnd " . The 16 bit result is stored in locations
; H_byte & L_byte.
;
;       Performance :
;                    Program Memory  :  36 words
;                    # of cycles     :  36       (excluding call & return)
;                    Scratch RAM     :   0 locations
;                    W Register      :  Used
;
;  This routine is optimized for speed efficiency ( straight line code )
;  For code efficiency, refer to "mult8x8S.asm" ( looped code )
;*******************************************************************
;     Define a macro for adding & right shifting
;
multiply    MACRO
	variable  i ;
	  i = 0
	  .while i < 8
		btfsc     mulplr,i
		addwf    H_byte
		rrcf    H_byte
		rrcf    L_byte
	    i = i+1 ;
	  .endw
	ENDM                    ; End of macro
;
;
mpy8x8_F
	clrf     H_byte
	clrf     L_byte
	movfp    mulcnd,wreg     ; move the multiplicand to W reg.
	bcf      _carry          ; Clear the carry bit in the status Reg.
;
	multiply
;
	return
;
	PAGE
;*******************************************************************
;                   8x8 Software Multiplier
;               ( Code Efficient : Looped Code )
;
;   The 16 bit result is stored in 2 bytes
;
; Before calling the subroutine " mpy ", the multiplier should
; be loaded in location " mulplr ", and the multiplicand in
; " mulcnd " . The 16 bit result is stored in locations
; H_byte & L_byte.
;
;       Performance :
;                    Program Memory  :  13 words (excluding call & return)
;                    # of cycles     :  69       (excluding call & return)
;                    Scratch RAM     :  1 byte
;                    W Register      :  Used
;
;  This routine is optimized for code efficiency ( looped code )
;  For time efficiency code refer to "mult8x8F.asm" ( straight line code )
;*******************************************************************
;
mpy8x8_S
	clrf     H_byte
	clrf     L_byte
	clrf     count
	bsf      count,3         ; set count = 8
	movfp    mulcnd,wreg
	bcf     _carry    ; Clear the carry bit in the status Reg.
loop
	btfsc      mulplr,0
	addwf     H_byte
	rrcf     H_byte
	rrcf     L_byte
	rrncf      mulplr
	decfsz     count
	goto    loop
;
	return
;
	PAGE
;*******************************************************************
;                       Numerical Differenciation
;
;       The so called "Three-Point Formula" is implemented to
; differenciate a sequence of points (uniformly sampled).
;       The eqn implemented is :
;             f'(Xn) = [ f(Xn - 2h) - 4*f(Xn - h) + 3*f(Xn)]*0.5/h
;    where Xn is the present sample and 'h' is the step size.
;
;       The above formula may be rewritten as :
;
;         f'(Xn) = [ 0.5*f(Xn -2) - 2*f(Xn - 1) + 0.5*3*f(Xn)]*1/DiffK
;  where DiffK = h = Step Size
;
;   This differenciation routine can be used very effectively
; in the computation of the differential component part in
; a PID Loop calculation in Motor Control Applications
;
;       Double precision arithmetic is used throught
;  The present sample value is assumed to be in locations
; (XnHi, XnLo). The past two values are assumed to be in locations
; (Xn_1_Hi, Xn_1_Lo) & (Xn_2_Hi, Xn_2_Lo).
;       The output value is located in DiffHi & DiffLo. No overflow
; checking mechanism is implemented. If the values are limited
; to 12 bits, then the user need not worry about overflows
;
;  It is user's responsibility to update the past values with the
; present values before calling this routine.
;  After computation, the present value Xn is not moved to Xn_1
; because the user may want these values to be intact for other
; computations ( say numerical integration)
;       Also it is user's responsibility to set past 2 values
; (Xn_1 & Xn_2) values to be zero on initialization.
;
;*******************************************************************
;
Diff
	movfp    Xn_2_Lo,wreg
	addwf     XnLo,w
	movwf     ACCbLO
	movfp    Xn_2_Hi,wreg
	addwfc    XnHi,w
	movwf     ACCbHI          ; Y = f(Xn-2) + f(Xn)
;
	movfp    XnLo,wreg
	addwf     ACCbLO
	movfp    XnHi,wreg
	addwfc    ACCbHI
	movfp    XnLo,wreg
	addwf     ACCbLO
	movfp    XnHi,wreg
	addwfc    ACCbHI    ; Y = f(Xn-2) + 3*f(Xn)
;
	bcf      _carry
	rrcf     ACCbHI
	rrcf     ACCbLO    ; Y = 0.5*[ f(Xn-2) + 3*f(Xn) ]

;
	movfp    Xn_1_Lo,wreg
	subwf     ACCbLO
	movfp    Xn_1_Hi,wreg
	subwfb    ACCbHI
	movfp    Xn_1_Lo,wreg
	subwf     ACCbLO
	movfp    Xn_1_Hi,wreg
	subwfb    ACCbHI    ; Y = 0.5*[f(Xn-2) + 3*f(Xn)] - 2*f(Xn-1)
;
	movfp    DiffKLo,wreg
	movwf     ACCaLO
	movfp    DiffKHi,wreg
	movwf     ACCaHI
;
	call    D_divS
	movfp    ACCbLO,wreg
	movwf     DiffLo
	movfp    ACCbHI,wreg
	movwf     DiffHi          ; result = Y/h
;
	return
;
	PAGE
;*******************************************************************
;
;                       Numerical Integration
;
;
;       Simpson's Three-Eighths Rule is implemented
;
;       Y(n) = [ f(X0) + 3*f(X1) + 3*f(X2) + f(X3)]*3*h/8
;
;  where 'h' is the step size and the integral is over the
;  range X0 to X3
;       The above equation can be rewritten as
;
;       Y(n) = [ f(X0) + 3*f(X1) + 3*f(X2) + f(X3)]*IntgK
;
;   where IntgK = 3*h/8 (in locations (IntgKHi, IntgKHi)
;
;   This Integration routine can be used very effectively
; in the computation of the integral component part in
; a PID Loop calculation in Motor Control Applications
;
;       Double precision arithmetic is used throught
;  The three input values over which the integral is to be computed
; are assumed to be in locations (X0Lo,X0Hi), (X1Lo,X1Hi) , (X2Lo,X2Hi)
; and (X3Lo,X3Hi)
;       The output value is located in IntgHi & IntgLo. No overflow
; checking mechanism is implemented. If the values are limited
; to 12 bits, then the user need not worry about overflows
;
;  It is user's responsibility to update the past values with the
; present values before calling this routine.
;  After computation, the present value Xn is not moved to Xn_1
; because the user may want these values to be intact for other
; computations ( say numerical integration)
;       Also it is user's responsibility to set past 2 values
; (Xn_1 & Xn_2) values to be zero on initialization.
;
;
;*******************************************************************
;
Integrate
	movfp    X0Lo,wreg
	addwf     X3Lo,w
	movwf     ACCbLO
	movfp    X0Hi,wreg
	addwfc    X3Hi,w
	movwf     ACCbHI          ; Intg = f(X0) + f(X3)
;
	movfp    X1Lo,wreg
	addwf     ACCbLO
	movfp    X1Hi,wreg
	addwfc    ACCbHI   ; Intg = f(X0) + f(X3) +X1
	movfp    X1Lo,wreg
	addwf     ACCbLO
	movfp    X1Hi,wreg
	addwfc    ACCbHI   ; Intg = f(X0) + f(X3) +2*X1
	movfp    X1Lo,wreg
	addwf     ACCbLO
	movfp    X1Hi,wreg
	addwfc    ACCbHI   ; Intg = f(X0) + f(X3) +3*X1
;
	movfp    X2Lo,wreg
	addwf     ACCbLO
	movfp    X2Hi,wreg
	addwfc    ACCbHI   ; Intg = f(X0) + f(X3) +3*X1 + X2
	movfp    X2Lo,wreg
	addwf     ACCbLO
	movfp    X2Hi,wreg
	addwfc    ACCbHI   ; Intg = f(X0) + f(X3) +3*X1 + 2*X2
	movfp    X2Lo,wreg
	addwf     ACCbLO
	movfp    X2Hi,wreg
	addwfc    ACCbHI   ; Intg = f(X0) + f(X3) +3*X1 + 3*X2
;
	movfp    IntgKLo,wreg
	movwf     ACCaLO
	movfp    IntgKHi,wreg
	movwf     ACCaHI          ;  ACCa = IntgK (prepare for multiplication)
;
	call    D_mpyS          ; make sure to set for either SIGNED or UNSIGNED
	movfp    ACCdLO,wreg
	movwf     IntgLo          ; 32 bit result in ACCd & ACCc
	movfp    ACCdHI,wreg
	movwf     IntgHi          ; upper 16 bits = result
;
	return
;
	PAGE
;*******************************************************************
;
;                       Random Number Generator
;
; This routine generates a 16 Bit Pseudo Sequence Random Generator
; It is based on Linear shift register feedback. The sequence
; is generated by (Q15 xorwf Q14 xorwf Q12 xorwf Q3 )
;
;    The 16 bit random number is in location RandHi(high byte)
;  & RandLo (low byte)
;
;       Before calling this routine, make sure the initial values
; of RandHi & RandLo are NOT ZERO
;       A good chiose of initial random number is 0x3045
;*******************************************************************
;
Random16
	rlcf     RandHi,w
	xorwf     RandHi,w
	rlcf     wreg            ; carry bit = xorwf(Q15,14)
;
	swapf    RandHi
	swapf    RandLo,w
	rlncf      wreg
	xorwf     RandHi,w        ; LSB = xorwf(Q12,Q3)
	swapf    RandHi
	andlw   0x01
	rlcf     RandLo
	xorwf     RandLo
	rlcf     RandHi
	return
;
	PAGE
;*******************************************************************
;                       Gaussian Noise Generator
;
; This routine generates a 16 Bit Gaussian distributed random
; points. This routine calls the routine "Random16", which
; generates a psuedo random noise sequence. Gaussian noise
; is computed using the CENTRAL LIMIT THEOREM.
;       The Central Limit Theorem states that the average weighted
; sum of uncorelated samples tends to have a Gaussian distribution
; For practical purposes, the sum could be over a sample size
; of 32 Random numbers. Better results could result if a larger
; sample size is desired. For faster results, a sum over 16 samples
; would also be adequate ( say, for applications like Speech synthesis,
; channel simulations, etc).
;
;       The 16 bit Gaussian distributed point is in locations
; GaussHi & GaussLo
;
;       Before calling this routine, the initial seed of Random
; number should be NON ZERO ( refer to notes on "Random16" routine
;
;*******************************************************************
;
Gauss
	clrf     count
	bsf      count,5         ; set Sample size = 32
	clrf     GaussLo
	clrf     GaussHi
	clrf     GaussTmp
;
NextGauss
	call    Random16        ; get a random value
	movfp    RandLo,wreg
	addwf     GaussLo
	movfp    RandHi,wreg
	addwfc    GaussHi
	clrf     wreg
	addwfc    GaussTmp
	decfsz     count
	goto    NextGauss       ; sum 16 random numbers
;
	movlw    5
GaussDiv16
	rrcf     GaussTmp
	rrcf     GaussHi
	rrcf     GaussLo           ; weghted average
	decfsz     wreg              ; divide by 32
	goto    GaussDiv16
;
	return
;

	END                       ; End Of arith.asm

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品少妇一区二区三区免费观看| 91免费国产视频网站| 欧美一区二区三区免费视频| 日本视频一区二区| 欧美电视剧免费全集观看| 韩国v欧美v日本v亚洲v| 欧美国产综合一区二区| 91蜜桃视频在线| 三级久久三级久久| 亚洲精品一区二区三区影院| 国产一区二区h| 亚洲日穴在线视频| 欧美美女网站色| 国产河南妇女毛片精品久久久 | 国产女主播视频一区二区| a4yy欧美一区二区三区| 一二三四社区欧美黄| 日韩一区二区在线观看视频播放| 国产大陆亚洲精品国产| 亚洲欧美一区二区三区极速播放| 欧美三级中文字| 国产在线观看免费一区| 亚洲免费高清视频在线| 欧美一区二区三区在线观看视频 | 午夜电影久久久| 2023国产精品| 在线视频你懂得一区二区三区| 日韩av高清在线观看| 亚洲国产精品t66y| 337p亚洲精品色噜噜| 国产91富婆露脸刺激对白| 亚洲午夜在线视频| 国产日产亚洲精品系列| 欧美日韩高清一区二区| 国产99久久久国产精品潘金| 性欧美大战久久久久久久久| 国产拍揄自揄精品视频麻豆| 欧美肥大bbwbbw高潮| av一区二区三区| 精品无码三级在线观看视频| 亚洲精品网站在线观看| 久久久综合网站| 7777精品伊人久久久大香线蕉| 成人免费毛片嘿嘿连载视频| 久久99国产精品免费网站| 亚洲综合免费观看高清完整版| 久久久久久久免费视频了| 欧美日韩另类国产亚洲欧美一级| 成人午夜在线播放| 美洲天堂一区二卡三卡四卡视频| 一区二区三区.www| 国产精品久久久久影院亚瑟| 欧美精品一区二区在线观看| 在线不卡一区二区| 色婷婷狠狠综合| 不卡免费追剧大全电视剧网站| 九色|91porny| 日本不卡123| 图片区日韩欧美亚洲| 亚洲欧美视频一区| 国产精品女同一区二区三区| 精品999久久久| 日韩一区二区视频| 91麻豆精品国产自产在线| 欧美系列在线观看| 日本道色综合久久| 色综合网站在线| 97精品超碰一区二区三区| 国产mv日韩mv欧美| 国产乱一区二区| 国产一区不卡在线| 国产成人在线视频免费播放| 国产真实乱偷精品视频免| 老司机精品视频在线| 青青草97国产精品免费观看| 天天综合网 天天综合色| 亚洲第一主播视频| 亚洲成人tv网| 丝袜美腿亚洲综合| 婷婷成人综合网| 日韩高清欧美激情| 日本va欧美va欧美va精品| 日本午夜一本久久久综合| 毛片不卡一区二区| 国产馆精品极品| av色综合久久天堂av综合| 91原创在线视频| 欧美中文字幕一区二区三区亚洲| 欧美系列亚洲系列| 欧美一区二区网站| 久久综合九色综合97婷婷| 国产女同互慰高潮91漫画| 中文字幕一区日韩精品欧美| 一区二区久久久久| 日韩二区三区在线观看| 精品一区二区三区免费视频| 国产精品一区二区无线| 99国产精品久久| 欧美日本韩国一区| 欧美成人一区二区三区| 国产欧美日韩激情| 亚洲精品国产一区二区精华液| 天天射综合影视| 激情综合色播激情啊| 91亚洲国产成人精品一区二区三| 欧美午夜精品久久久| 欧美电影精品一区二区| 国产精品毛片无遮挡高清| 亚洲不卡一区二区三区| 国产精品亚洲成人| 色八戒一区二区三区| 日韩欧美你懂的| 亚洲视频免费在线| 日本伊人色综合网| 成人午夜免费av| 欧美日韩国产一级片| 国产拍欧美日韩视频二区| 亚洲高清免费在线| 国产精品一品二品| 欧美日韩国产综合一区二区三区| 久久亚区不卡日本| 亚洲国产成人高清精品| 成人午夜免费视频| 日韩一区二区免费在线观看| 亚洲区小说区图片区qvod| 久久97超碰色| 欧美午夜精品理论片a级按摩| 久久久国际精品| 亚洲成av人片一区二区梦乃| 国产精品亚洲成人| 日韩一区二区三区四区五区六区| 亚洲视频 欧洲视频| 精品一区二区三区免费观看| 欧美日韩视频第一区| 国产精品私房写真福利视频| 秋霞国产午夜精品免费视频| 色先锋aa成人| 国产精品三级av在线播放| 久久精品国产亚洲一区二区三区| 在线观看日韩毛片| 日韩毛片一二三区| 国产成人综合视频| 欧美α欧美αv大片| 亚洲成人午夜电影| 色视频一区二区| 中文字幕在线观看一区| 狠狠狠色丁香婷婷综合激情 | 蜜臀av性久久久久蜜臀aⅴ | 美女任你摸久久| 欧美日韩国产一区二区三区地区| 国产精品传媒在线| 国产不卡免费视频| 欧美mv日韩mv国产网站| 秋霞影院一区二区| 欧美一区二区美女| 丝袜诱惑制服诱惑色一区在线观看| 一本久久a久久免费精品不卡| 中文字幕av一区二区三区| 国产一区二区h| 久久人人超碰精品| 国产一区二区三区黄视频| 日韩欧美成人一区二区| 蜜臀久久99精品久久久久久9 | 欧美久久久久免费| 亚洲国产一区在线观看| 欧美视频一区二区在线观看| 亚洲午夜电影网| 欧美精品自拍偷拍| 日韩精品福利网| 欧美一区二区三级| 久久精品久久99精品久久| 精品久久久久99| 国产一区二区精品在线观看| 国产午夜精品在线观看| 成人动漫av在线| 亚洲视频小说图片| 欧美视频在线不卡| 日韩激情一二三区| xnxx国产精品| 播五月开心婷婷综合| 亚洲日本在线看| 欧美日韩成人综合天天影院 | 国产寡妇亲子伦一区二区| 中文字幕乱码久久午夜不卡| 99久久精品国产精品久久| 亚洲免费观看高清完整版在线观看 | 欧美成人在线直播| 国产成人午夜电影网| 中文字幕中文在线不卡住| 欧美色区777第一页| 精品影院一区二区久久久| 久久精品免视看| 色999日韩国产欧美一区二区| 亚洲午夜国产一区99re久久| 欧美高清视频一二三区| 国产一区在线观看麻豆| 亚洲色图20p| 69p69国产精品| 国产二区国产一区在线观看| 亚洲视频一二区|