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

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

?? arith.asm

?? PIC系列單片機典型應(yīng)用程序集
?? ASM
?? 第 1 頁 / 共 3 頁
字號:
;                            :   183 (SIGNED :excluding CALL & RETURN)
;
;       Note : The above timing is the worst case timing, when the
;               register ACCb = FFFF. The speed may be improved if
;               the register ACCb contains a number ( out of the two
;               numbers ) with less number of 1s.
;
;               The performance specs are for Unsigned arithmetic ( i.e,
;               with "SIGNED equ  FALSE ").
;
;               Upon return from subroutine, the input registers
;
;
;**********************************************************
;               Multiplication Macro
;**********************************************************
;
mulMac  MACRO
	variable i

	i = 0

	#if SIGNED
	  .while i < 15
	#else
	  .while i < 16
	#endif
	     .if i < 8
		btfss      ACCbLO,i        ; test low byte
	     .else
		btfss      ACCbHI,i-8      ; test high byte
	     .fi
		goto    NoAdd#v(i)      ; LSB is 0, so no need to addwf
		movfp    ACCaLO,wreg
		addwf     ACCdLO           ;addwf lsb
		movfp    ACCaHI,wreg
		addwfc    ACCdHI           ;addwf msb
NoAdd#v(i)
		rrcf     ACCdHI
		rrcf     ACCdLO
		rrcf     ACCcHI
		rrcf     ACCcLO
		bcf      _carry
		i = i+1
	  .endw
	#if SIGNED
		rrcf     ACCdHI
		rrcf     ACCdLO
		rrcf     ACCcHI
		rrcf     ACCcLO
		bcf     _carry
	#endif
;
	ENDM
;
	PAGE
;***************************************************************
;                       Double Precision Negate Macros
;***************************************************************
AltNegMac       MACRO   fileRegLo,fileRegHi
			movfp    fileRegLo,wreg
			negw     fileRegLo
			movfp    fileRegHi,wreg
			clrf     fileRegHi
			subwfb    fileRegHi
		ENDM

;
negMac  MACRO   fileRegLo, fileRegHi
	comf    fileRegLo       ; negate FileReg ( -FileReg -> FileReg )
	incf     fileRegLo
	btfsc      _z
	decf     fileRegHi
	comf    fileRegHi
	ENDM
;
NegMac32        MACRO   x3,x2,x1,x0
	movfp   x3,wreg
	negw    x3
	movfp   x2,wreg
	clrf    x2
	subwfb  x2
	movfp   x1,wreg
	clrf    x1
	subwfb  x1
	movfp   x0,wreg
	clrf    x0
	subwfb  x0
		ENDM
;
	PAGE
;*******************************************************************;
;               Double Precision Multiply ( 16x16 -> 32 )
;         ( ACCb*ACCa -> ACCb,ACCc ) : 32 bit output with high word
;  in ACCd ( ACCdHI,ACCdLO ) and low word in ACCc ( ACCcHI,ACCcLO ).
;
D_mpyF                          ;results in ACCd(16 msb's) and ACCc(16 lsb's)
;
     #if   SIGNED
;
	movfp    ACCaHI,wreg
	xorwf     ACCbHI,w
	movwf     sign
	btfss      ACCbHI,MSB        ; if MSB set go & negate ACCb
	goto    chek_A_MSB_MPY
;
	negMac  ACCbLO,ACCbHI
;
chek_A_MSB_MPY
	btfss      ACCaHI,MSB        ; if MSB set go & negate ACCa
	goto    continue_MPY
	negMac  ACCaLO,ACCaHI
;
     #endif
;
continue_MPY
	clrf    ACCdHI
	clrf    ACCdLO
	bcf     _carry

;
; use the mulMac macro 16 times
;
	mulMac
;
    #if SIGNED
	btfss   sign,MSB        ; negate (ACCc,ACCd)
	return
	NegMac32 ACCcHI,ACCcLO,ACCdHI, ACCdLO
	return
    #else
	return
    #endif
;
	PAGE
;*******************************************************************
;                       Double Precision Division
;
;               ( Optimized for Code : Looped Code )
;
;*******************************************************************;
;   Division : ACCb(16 bits) / ACCa(16 bits) -> ACCb(16 bits) with
;                                               Remainder in ACCc (16 bits)
;      (a) Load the Denominator in location ACCaHI & ACCaLO ( 16 bits )
;      (b) Load the Numerator in location ACCbHI & ACCbLO ( 16 bits )
;      (c) CALL D_div
;      (d) The 16 bit result is in location ACCbHI & ACCbLO
;      (e) The 16 bit Remainder is in locations ACCcHI & ACCcLO
;
;   Performance :
;            Program Memory  :   31 (UNSIGNED)
;                                39 (SIGNED)
;               Clock Cycles    : 300 (UNSIGNED : excluding CALL & RETURN)
;                               : 312 (SIGNED : excluding CALL & RETURN)
;
;       NOTE :
;               The performance specs are for Unsigned arithmetic ( i.e,
;               with "SIGNED equ  FALSE ").
;
;*******************************************************************
;       Double Precision Divide ( 16/16 -> 16 )
;
;         ( ACCb/ACCa -> ACCb with remainder in ACCc ) : 16 bit output
; with Quotiont in ACCb (ACCbHI,ACCbLO) and Remainder in ACCc (ACCcHI,ACCcLO).
;
;               B/A = (Q) + (R)/A
;       or      B = A*Q + R
;
;                       where   B :     Numerator
;                               A :     Denominator
;                               Q :     Quotiont (Integer Result)
;                               R :     Remainder
;
;       Note :  Check for ZERO Denominator or Numerator is not performed
;               A ZERO Denominator will produce incorrect results
;
;       SIGNED Arithmetic :
;                       In case of signed arithmetic, if either
;  numerator or denominator is negative, then both Q & R are
;  represented as negative numbers
;               -(B/A) = -(Q) + (-R)/A
;       or      -B = (-Q)*A + (-R)
;
;*******************************************************************
;
D_divS
;
	bsf      _fs0
	bsf      _fs1            ; set no auto-incrment for fsr0

     #if    SIGNED
	CALL    S_SIGN
     #endif
;
	clrf     count
	bsf      count,4         ; set count = 16
	clrf     ACCcHI
	clrf     ACCcLO
	clrf     ACCdLO
	clrf     ACCdHI
;
;  Looped code
;
divLoop
	bcf      _carry
	rlcf     ACCbLO
	rlcf     ACCbHI
	rlcf     ACCcLO
	rlcf     ACCcHI
	movfp    ACCaHI,wreg
	subwf     ACCcHI,w          ;check if a>c
	btfss      _z
	goto    notz
	movfp    ACCaLO,wreg
	subwf     ACCcLO,w        ; if msb equal then check lsb
notz
	btfss      _carry    ; carry set if c>a
	goto    nosub           ; if c < a
subca
	movfp    ACCaLO,wreg     ; c-a into c
	subwf     ACCcLO
	movfp    ACCaHI,wreg
	subwfb    ACCcHI
	bsf      _carry              ;shift a 1 into d (result)
nosub
	rlcf     ACCdLO
	rlcf     ACCdHI
	decfsz     count
	goto    divLoop

;
    #if SIGNED
	btfss      sign,MSB
	return
	movlw    ACCcLO
	movwf     fsr0
	call    negate
	movlw    ACCdLO
	movwf     fsr0
	call    negate
	return
    #else
	return
    #endif
;
	PAGE
;*******************************************************************
;                       Double Precision Division
;
;               ( Optimized for Speed : straight Line Code )
;
;*******************************************************************;
;   Division : ACCb(16 bits) / ACCa(16 bits) -> ACCb(16 bits) with
;                                               Remainder in ACCc (16 bits)
;
;      (a) Load the Denominator in location ACCaHI & ACCaLO ( 16 bits )
;      (b) Load the Numerator in location ACCbHI & ACCbLO ( 16 bits )
;      (c) CALL D_div
;      (d) The 16 bit result is in location ACCbHI & ACCbLO
;      (e) The 16 bit Remainder is in locations ACCcHI & ACCcLO
;
;               B/A = (Q) + (R)/A
;       or      B = A*Q + R
;
;                       where   B :     Numerator
;                               A :     Denominator
;                               Q :     Quotiont (Integer Result)
;                               R :     Remainder
;
;       Note :  Check for ZERO Denominator or Numerator is not performed
;               A ZERO Denominator will produce incorrect results
;
;       SIGNED Arithmetic :
;                       In case of signed arithmetic, if either
;  numerator or denominator is negative, then both Q & R are
;  represented as negative numbers
;               -(B/A) = -(Q) + (-R)/A
;       or      -B = (-Q)*A + (-R)
;
;   Performance :
;            Program Memory  :   325 (UNSIGNED)
;                                354 (SIGNED)
;               Clock Cycles    : 250 (UNSIGNED : excluding CALL & RETURN)
;                               : 260 (SIGNED : excluding CALL & RETURN)
;
;*******************************************************************;
;       division macro
;
divMac  MACRO
	variable i

       i = 0
      .while i < 16
;
		bcf      _carry
		rlcf     ACCbLO
		rlcf     ACCbHI
		rlcf     ACCcLO
		rlcf     ACCcHI
		movfp    ACCaHI,wreg
		subwf     ACCcHI,w          ;check if a>c
		btfss      _z
		goto    notz#v(i)
		movfp    ACCaLO,wreg
		subwf     ACCcLO,w        ;if msb equal then check lsb
notz#v(i)       btfss     _carry    ;carry set if c>a
		goto    nosub#v(i)           ; if c < a
subca#v(i)      movfp    ACCaLO,wreg        ;c-a into c
		subwf     ACCcLO
		movfp    ACCaHI,wreg
		subwfb    ACCcHI
		bsf      _carry            ;shift a 1 into d (result)
nosub#v(i)      rlcf     ACCdLO
		rlcf     ACCdHI
       i=i+1
      .endw
;
	ENDM
;
	PAGE
;*******************************************************************
;       Double Precision Divide ( 16/16 -> 16 )
;
;         ( ACCb/ACCa -> ACCb with remainder in ACCc ) : 16 bit output
; with Quotiont in ACCb (ACCbHI,ACCbLO) and Remainder in ACCc (ACCcHI,ACCcLO).
;
;   NOTE  :  Before calling this routine, the user should make sure that
;            the Numerator(ACCb) is greater than Denominator(ACCa). If
;            the case is not true, the user should scale either Numerator
;            or Denominator or both such that Numerator is greater than
;            the Denominator.
;
;
;*******************************************************************
;
D_divF
;
     #if   SIGNED
	movfp    ACCaHI,wreg
	xorwf     ACCbHI,w
	movwf     sign
	btfss      ACCbHI,MSB        ; if MSB set go & negate ACCb
	goto    chek_A_MSB_DIV
;
	negMac  ACCbLO,ACCbHI
;
chek_A_MSB_DIV
	btfss   ACCaHI,MSB        ; if MSB set go & negate ACCa
	goto    continue_DIV
	negMac  ACCaLO,ACCaHI

     #endif
;
continue_DIV
	clrf     ACCcHI
	clrf     ACCcLO
	clrf     ACCdLO
	clrf     ACCdHI

;
; straight line code : using the macro divMac
;
	divMac
;
    #if SIGNED
	btfss   sign,MSB        ; negate (ACCc,ACCd)
	return
	negMac  ACCcLO,ACCcHI
	negMac  ACCdLO,ACCdHI
	return
    #else
	return
    #endif
;
	PAGE
;*******************************************************************
;
;            Square Root By Newton Raphson Method
;
;    This routine computes the square root of a 16 bit number(with
;  low byte in NumLo & high byte in NumHi ). After loading NumLo &
;  NumHi with the desired number whose square root is to be computed,
;  branch to location Sqrt ( by "GOTO  Sqrt" ). " CALL  Sqrt" cannot
;  be issued because the Sqrt function makes calls to Math routines
;  and the stack is completely used up.
;       The result = sqrt(NumHi,NumLo) is returned in location SqrtLo.
;  The total number of iterations is set to ten. If more iterations
;  are desired, change "LupCnt equ .10" to the desired value. Also,
;  the initial guess value of the square root is given set as
;  input/2 ( in subroutine "init" ). The user may modify this scheme
;  if a better initial approximation value is known. A good initial
;  guess will help the algorithm converge at a faster rate and thus
;  less number of iterations required.
;       Two utility math routines are used by this program : D_divS
;  and D_add. These two routines are listed as seperate routines
;  under double precision Division and double precision addition
;  respectively.
;
;  Note : If square root of an 8 bit number is desired, it is probably
;         better to have a table look scheme rather than using numerical
;         methods.
;               This method is computationally quite intensive and
;         slow, but very accurate and the convergence rate is high

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
午夜一区二区三区视频| 欧美一级在线观看| 国产精品另类一区| 成人国产精品免费观看视频| 国产精品免费丝袜| 91麻豆精东视频| 亚洲大片免费看| 日韩午夜中文字幕| 国产高清精品久久久久| 亚洲特黄一级片| 欧美美女一区二区在线观看| 免费看日韩a级影片| 久久精品视频免费| 91蜜桃婷婷狠狠久久综合9色| 亚洲福利一二三区| 久久―日本道色综合久久| 成人动漫视频在线| 天堂午夜影视日韩欧美一区二区| 日韩欧美在线综合网| 国产91对白在线观看九色| 亚洲一区二区五区| 日韩精品影音先锋| 波多野结衣一区二区三区 | 5月丁香婷婷综合| 国产一区二区三区在线看麻豆| 亚洲国产精品v| 欧美男男青年gay1069videost| 久久电影网站中文字幕| 亚洲视频 欧洲视频| 337p亚洲精品色噜噜| 国产iv一区二区三区| 亚洲图片欧美视频| 日本一区二区高清| 国产一区二区三区精品视频| 中文字幕综合网| 欧美一卡二卡在线| 色综合天天综合网天天狠天天| 奇米四色…亚洲| ...中文天堂在线一区| 制服丝袜日韩国产| av中文字幕亚洲| 久久国产麻豆精品| 亚洲综合丝袜美腿| 国产精品人人做人人爽人人添| 欧美群妇大交群中文字幕| av成人免费在线观看| 麻豆91在线播放| 亚洲一区二区三区四区中文字幕| 久久精品一区蜜桃臀影院| 欧美一区二区三区在线视频| 91免费看`日韩一区二区| 国产91在线看| 韩国三级电影一区二区| 亚洲一卡二卡三卡四卡 | 欧美福利视频一区| 99久久伊人久久99| 国产盗摄女厕一区二区三区 | 欧美成人官网二区| 欧美视频一区二| 91美女片黄在线| 波多野结衣亚洲| 丁香激情综合国产| 国产91富婆露脸刺激对白| 国产又粗又猛又爽又黄91精品| 日韩国产一二三区| 亚洲成人免费在线| 亚洲一卡二卡三卡四卡五卡| 亚洲欧美区自拍先锋| 亚洲手机成人高清视频| 日本一区二区视频在线| 日本一区二区三区在线观看| 国产日韩欧美在线一区| 国产亚洲精品资源在线26u| 久久综合久久综合久久| 欧美成人精品3d动漫h| 精品日产卡一卡二卡麻豆| 欧美精品一区二区在线观看| 欧美大肚乱孕交hd孕妇| 精品久久国产97色综合| 日韩视频一区二区三区 | 日韩一级高清毛片| 日韩欧美亚洲一区二区| 日韩一级免费观看| 欧美mv日韩mv国产| 国产亚洲欧美日韩在线一区| 欧美国产日本视频| 亚洲欧洲日韩av| 一区二区在线电影| 午夜电影久久久| 麻豆一区二区三| 国产在线不卡一区| 菠萝蜜视频在线观看一区| 94-欧美-setu| 欧美日高清视频| 欧美一级片免费看| 精品av综合导航| 国产精品久久久久9999吃药| 一区二区三区四区av| 亚洲mv在线观看| 麻豆91免费观看| 成人a区在线观看| 日本久久一区二区三区| 欧美一卡在线观看| 国产日韩高清在线| 亚洲精品视频免费观看| 亚洲成在人线免费| 国产一区二区免费在线| 91丝袜呻吟高潮美腿白嫩在线观看| 欧美在线一二三| 精品久久久久久亚洲综合网| 欧美国产日韩亚洲一区| 五月天一区二区三区| 国产麻豆91精品| 欧美无人高清视频在线观看| 日韩欧美在线影院| 亚洲欧美激情插| 久久成人免费网| 91麻豆.com| 久久综合色天天久久综合图片| 亚洲视频狠狠干| 麻豆国产精品777777在线| 国产福利一区在线观看| 欧美日韩精品一区二区三区蜜桃 | 在线视频你懂得一区| 精品欧美一区二区三区精品久久| 国产精品女主播av| 免费在线观看不卡| 色哟哟在线观看一区二区三区| 日韩一区二区电影在线| 依依成人综合视频| 国产ts人妖一区二区| 在线不卡a资源高清| 亚洲桃色在线一区| 国产成人亚洲综合色影视| 777久久久精品| 综合自拍亚洲综合图不卡区| 久久er99热精品一区二区| 色综合久久天天综合网| 久久蜜臀中文字幕| 蜜桃在线一区二区三区| 精品视频在线看| 国产精品女上位| 国产成人在线电影| 精品久久久久99| 免费人成精品欧美精品| 欧美日韩不卡一区二区| 亚洲美女区一区| 成人美女在线观看| 久久精品亚洲国产奇米99| 久久99热这里只有精品| 欧美日韩高清一区二区| 亚洲国产成人高清精品| 一本色道久久加勒比精品| 国产精品久久毛片a| 国产精品888| 久久你懂得1024| 国产一区不卡视频| 久久夜色精品一区| 国产在线播精品第三| 亚洲精品在线网站| 精品亚洲国产成人av制服丝袜| 91精品在线观看入口| 午夜精品国产更新| 91精品啪在线观看国产60岁| 亚洲妇熟xx妇色黄| 这里只有精品视频在线观看| 午夜精品一区二区三区电影天堂 | 国产日韩在线不卡| 国产美女精品人人做人人爽| 亚洲精品在线观| 国产一二精品视频| 国产欧美日韩激情| 成人免费av资源| 亚洲欧洲制服丝袜| 在线影院国内精品| 午夜精彩视频在线观看不卡| 欧美日韩大陆在线| 免费在线看成人av| 精品电影一区二区三区| 国产伦精品一区二区三区视频青涩 | 一区二区三区在线观看国产 | 午夜亚洲福利老司机| 91精品国产综合久久精品| 美女在线视频一区| 26uuu亚洲综合色| 成人av免费在线观看| 亚洲欧美视频在线观看| 欧美浪妇xxxx高跟鞋交| 麻豆精品久久久| 中文字幕不卡一区| 欧美性高清videossexo| 日本欧美在线观看| 久久久精品综合| 99免费精品在线| 视频一区二区不卡| 国产欧美一区二区三区沐欲| 色综合色狠狠天天综合色| 日韩国产一区二| 欧美高清在线视频| 欧美日韩国产影片|