这些小活动你都参加了吗?快来围观一下吧!>>
电子产品世界 » 论坛首页 » 嵌入式开发 » FPGA » bf561 汇编指令集(二)

共1条 1/1 1 跳转至

bf561 汇编指令集(二)

高工
2007-12-11 18:19:16     打赏


 
 bf561 汇编指令集(二)

全文浏览:http://www.analogcn.com/Article/wz3/200711/20071120020904.html

位操作指令

Bit Operations
bitclr (r2, 3) ;   /* clear bit 3 (the fourth bit from LSB) in R2 */
bitset (r2, 7) ;   /* set bit 7 (the eighth bit from LSB) in R2 */
bittgl (r2, 24) ;   /* toggle bit 24 (the 25th bit from LSB in R2 */
cc = bittst (r7, 15) ;   /* test bit 15 TRUE in R7 */
cc = ! bittst (r3, 0) ;   /* test bit 0 FALSE in R3 */
r7 = deposit (r4, r3) ;                   /* Special Applications:Video image overlay algorithms */

r7 = extract (r4, r3.l) (x) ;            /*Special Applications Video image pattern recognition and separation algorithms */

bitmux (r2, r3, a0) (asr) ;   /* right shift*/
bitmux (r3, r2, a0) (asl) ;   /* left shift*/
r3.l = ones r7 ; /*loads the number of 1’s*/   /*Special Applications
Software parity testing */

Shift/Rotate Operations
Add with Shift
p3 = (p3+p2)<<2 ;
r3 = (r3+r2)<<1 ;
Shift with Add
p3 = p0+(p3<<1) ;
Arithmetic Shift
r0 >>>= 19 ;
r3.l = r0.h << 12 (S) ;
r3.l = r0.h >>> 7(s) ;
r4 = ashift r2 by r7.l ;  
A1 = ashift A1 by r7.l ;
Logical Shift
p3 = p2 >> 1 ;
r3.h = r0.h << 14 ;
a0 = lshift a0 by r7.l ;
ROT (Rotate)
r4 = rot r1 by 8 ;
a1 = rot a1 by -31 ;  
r4 = rot r1 by r2.l ;

全文浏览:http://www.analogcn.com/Article/wz3/200711/20071120020904.html
 
 

 




关键词: bf561     汇编     指令    

共1条 1/1 1 跳转至

回复

匿名不能发帖!请先 [ 登陆 注册 ]