嵌入式开发者社区

标题: omapl138 c程序中嵌入汇编问题 [打印本页]

作者: vtinf    时间: 2016-11-22 18:09
标题: omapl138 c程序中嵌入汇编问题
您好,请问omapl138 c程序中嵌入汇编问题。下面代码汇编程序是怎样的呢?8 ^. `% {. y% G& j8 U& U  a

. p! o  R% N2 b: s. S, Z( R1 `/ qint16_t raw  ;
; q$ ^! g/ k$ ^9 A( @/ Hdouble tempin = 0.0 ;# N& `! ^# M3 v3 l% {1 \/ F
double tempout = 0.0 ;
6 U: \" M  B+ m" M1 m4 p  M6 W1 P
float alpha = 1.8  ;- ^/ }5 ^5 Y! ^" C
float gamma = 1.6  ;
+ ^$ K% r/ A4 {6 C5 n& d2 ~9 U( ^3 }; [& ~7 w
double InHistory = 0 ;2 ^. i- ~# e$ k1 o* \' V) n/ c
double OutHistoy = 0 ;
7 w+ @( j- U3 X9 O9 t& H9 J6 e* F
- h2 N2 G+ u7 d8 j/ ?1 @2 y1 Ptempin =  (float)raw * 10.0 / 65536.0 ;- W3 _, U9 `3 U5 b3 ?6 ~# F( j: o
tempout = alpha*(InHistory + tempin) + gamma*OutHistoy ;4 I2 T8 C% g+ r: u, t
InHistory = tempin;! K' I! _4 r6 b' G
OutHistoy = tempout ;
6 Q) t7 W# _) \& o9 q8 b( N3 |+ G# H

作者: 希望缄默    时间: 2016-11-24 08:52
编译时加上 -k 参数就可以看到生成的同名汇编文件




欢迎光临 嵌入式开发者社区 (https://www.51ele.net/) Powered by Discuz! X3.4