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

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

?? arith.asm

?? 基于pic的例子程序
?? 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一区二区三区免费野_久草精品视频
久久精品一区八戒影视| 国产免费成人在线视频| 欧美日韩色综合| 欧美视频一区二区三区在线观看 | 一区二区三区国产精华| 久久精品国产精品青草| 国产成人午夜99999| 99视频精品全部免费在线| 色婷婷综合久色| 欧美绝品在线观看成人午夜影视| 日韩免费高清av| 亚洲天堂网中文字| 国产精品黄色在线观看| 亚洲柠檬福利资源导航| 日本欧美一区二区三区乱码| 成人在线视频一区| 日韩一级大片在线观看| 中文字幕第一页久久| 人人超碰91尤物精品国产| 99精品热视频| 欧美日韩国产大片| 国产欧美日韩三区| 久久精品国产精品亚洲综合| 色综合天天视频在线观看| 欧美老肥妇做.爰bbww| 亚洲人被黑人高潮完整版| 麻豆精品一区二区三区| 日韩欧美一区二区免费| 亚洲国产精品精华液网站| 日本乱人伦一区| 亚洲国产日韩在线一区模特| 在线观看91视频| 日韩国产欧美在线播放| 黑人巨大精品欧美一区| 欧美日本国产视频| 三级不卡在线观看| 日韩一级在线观看| 九色综合狠狠综合久久| 亚洲精品一区二区三区蜜桃下载| 蜜臀久久99精品久久久久久9| 欧美人xxxx| 国产一区二区在线看| 国产精品色在线| 国产91精品久久久久久久网曝门| 国产一区二区三区精品视频| 欧美老人xxxx18| 午夜伦欧美伦电影理论片| 色94色欧美sute亚洲线路一久| 久久久亚洲午夜电影| 色综合久久综合中文综合网| 五月激情六月综合| 中文子幕无线码一区tr| 在线视频一区二区三区| 日韩精品一级二级 | 日韩主播视频在线| 久久久综合激的五月天| 欧美亚洲尤物久久| 激情都市一区二区| 亚洲精品欧美综合四区| 精品理论电影在线观看| 色婷婷久久久久swag精品 | 精品1区2区3区| 99精品视频在线观看| 精品午夜久久福利影院| 亚洲最大成人综合| 亚洲欧美日韩在线播放| 日韩av电影天堂| 日韩毛片一二三区| 国产精品久久久久永久免费观看| 欧美一区二视频| 欧美巨大另类极品videosbest | 欧美日韩三级视频| 91久久一区二区| 99视频一区二区| 成人性色生活片免费看爆迷你毛片| 日本怡春院一区二区| 亚洲高清视频中文字幕| 亚洲一区二区三区四区在线观看 | 欧美在线观看一二区| 欧美性淫爽ww久久久久无| 91麻豆精品在线观看| 在线免费观看一区| 亚洲视频中文字幕| 国产精品污污网站在线观看 | 国产精品一区在线观看乱码| 国内精品国产成人国产三级粉色 | 欧美一卡二卡在线观看| 欧美精品一区二区三区蜜桃视频| 日韩午夜激情视频| 日韩一级二级三级| 日韩欧美一卡二卡| 国产三级欧美三级| 亚洲第一搞黄网站| 蜜臂av日日欢夜夜爽一区| 韩国欧美一区二区| 不卡一区二区三区四区| 欧美午夜精品久久久久久超碰 | 亚洲三级在线免费观看| 不卡av免费在线观看| 色婷婷综合久色| 日韩欧美在线观看一区二区三区| 久久综合给合久久狠狠狠97色69| 国产精品国产三级国产aⅴ无密码 国产精品国产三级国产aⅴ原创 | 一卡二卡欧美日韩| 国内一区二区视频| 91精品久久久久久蜜臀| 中文字幕亚洲成人| 麻豆成人久久精品二区三区红| 成人av集中营| 欧美α欧美αv大片| 亚洲精品乱码久久久久久久久 | 91麻豆精品国产91| 亚洲精品少妇30p| 成人高清免费观看| 久久女同精品一区二区| 久久精品国产免费看久久精品| 在线观看国产精品网站| 亚洲欧洲在线观看av| 国产91精品免费| 国产精品久久久久久福利一牛影视 | 激情综合亚洲精品| 日韩一卡二卡三卡四卡| 免费成人av在线| 精品剧情v国产在线观看在线| 日韩精品一级中文字幕精品视频免费观看 | 国产成人午夜精品影院观看视频| 制服丝袜激情欧洲亚洲| 亚洲制服丝袜av| 91免费看视频| 亚洲不卡一区二区三区| 日韩一级二级三级精品视频| 日本一区中文字幕| 7777精品伊人久久久大香线蕉的 | av在线不卡电影| 伊人婷婷欧美激情| 91精品国产一区二区| 激情小说欧美图片| 国产精品情趣视频| 一本到三区不卡视频| 天涯成人国产亚洲精品一区av| 日韩午夜激情电影| 波多野结衣中文字幕一区二区三区 | 亚洲素人一区二区| 日韩午夜精品视频| 成人av电影在线播放| 久久99精品久久久久婷婷| 亚洲嫩草精品久久| 国产欧美一区二区三区网站 | 免费美女久久99| 亚洲图片另类小说| 国产夜色精品一区二区av| 3atv在线一区二区三区| 成人av片在线观看| 国内久久精品视频| 男人的天堂亚洲一区| 亚洲综合一区二区精品导航| 国产精品欧美极品| 国产日本欧洲亚洲| 欧美一区二区三区在线看| 色嗨嗨av一区二区三区| 国产精品亚洲成人| 精彩视频一区二区三区| 视频一区视频二区中文| 亚洲欧美一区二区三区极速播放| 精品精品国产高清一毛片一天堂| 在线观看91精品国产入口| 成人av影院在线| 不卡一区二区中文字幕| 精品一区二区影视| 激情另类小说区图片区视频区| 美女www一区二区| 亚洲国产精品久久久久秋霞影院 | 北岛玲一区二区三区四区| 丰满少妇在线播放bd日韩电影| 狠狠色伊人亚洲综合成人| 精品一区二区免费视频| 久久69国产一区二区蜜臀| 国内欧美视频一区二区 | 日韩视频免费观看高清完整版在线观看 | 欧美日韩成人在线一区| 欧美tk丨vk视频| 国产情人综合久久777777| 成人免费在线视频观看| 日韩理论片在线| 丝袜美腿亚洲色图| 国产一区二区精品久久91| 白白色亚洲国产精品| 51午夜精品国产| 欧美极品少妇xxxxⅹ高跟鞋| 亚洲男女一区二区三区| 免费人成精品欧美精品| 9色porny自拍视频一区二区| 欧美福利视频一区| 国产精品久久久久婷婷| 日本少妇一区二区| 91日韩在线专区| 久久日一线二线三线suv| 亚洲电影在线免费观看| 成人爱爱电影网址| 午夜视频在线观看一区|