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

📄 emul32a.s

📁 ICCAVR中所有的库函数源码
💻 S
字号:
	.textempy32s::empy32u::;  think of one operand as consisting of bytes (high) A B C D (low); and the other operand as consisting of bytes (high) E F G H (low)	.define	A R19	.define	B R18	.define	C R17	.define	D R16	.define	E R27	.define	F R26	.define	G R25	.define	H R24; inputs: R19..R16 multiplier;	  R27..R24 multiplicand; output: R8..R11  product;	  R7	   overflow indicator if not zero	rcall	long_prolog	push R7	; rfm - done after long_prolog so the		; end can still be a rjmp to long_epilog	rcall	tstzero1	; this along with next step are optional	breq	donemul		; exit if multiplier is zero	clr	R7		; zero value and overflow accumualtor	rcall	tstzero2	; this along with next step are optional	brne gomul	movw R16,R24	movw R18,R26	rjmp donemulgomul:	MUL	D,H	mov	R11,R0	mov	R10,R1	MUL	B,H	mov	R9,R0	mov	R8,R1	MUL	C,H	add	R10,R0	adc	R9,R1	adc	R8,R7	MUL	D,G	add	R10,R0	adc	R9,R1	adc	R8,R7	MUL	C,G	add	R9,R0	adc	R8,R1	MUL	D,F	add	R9,R0	adc	R8,R1	MUL	A,H	add	R8,R0	or	R7,R1	MUL	B,G	add	R8,R0	or	R7,R1	MUL	C,F	add	R8,R0	or	R7,R1	MUL	D,E	add	R8,R0	or	R7,R1	MUL	A,G	or	R7,R0	or	R7,R1	MUL	B,F	or	R7,R0	or	R7,R1	MUL	C,E	or	R7,R0	or	R7,R1	MUL	A,F	or	R7,R0	or	R7,R1	MUL	B,E	or	R7,R0	or	R7,R1	MUL	A,E	or	R7,R0	or	R7,R1moveresult:; funky big endian order remap. "thanks" Everett; You're welcome, Richard.  We aim to produce things in the; well-known better order	mov	r16,r11	mov	r17,r10	mov	r18,r9	mov	r19,r8donemul:	pop	R7	; rfm	rjmp	long_epilog

⌨️ 快捷键说明

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