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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? chapter 11 preprocessor directives -- valvano.htm

?? DevelopingEmbeddedSoftwareinC 嵌入式開發叢書 很不錯的
?? HTM
?? 第 1 頁 / 共 2 頁
字號:
*/<BR>#endif<BR>&nbsp;&nbsp;&nbsp;&nbsp;i=j+1;<BR>#ifdef 
Debug<BR>&nbsp;&nbsp;&nbsp;&nbsp;PORTC&amp;=~0x01; /* PC0 cleared when Sub is 
exited */<BR>#endif<BR>&nbsp;&nbsp;&nbsp;&nbsp;return(i);}<BR>void Program(){ 
int i;<BR>#ifdef Debug<BR>&nbsp;&nbsp;&nbsp;&nbsp;PORTC|=0x02; /* PC1 set when 
Program is entered 
*/<BR>#endif<BR>&nbsp;&nbsp;&nbsp;&nbsp;i=Sub(5);<BR>&nbsp;&nbsp;&nbsp;&nbsp;while(1) 
{ PORTC=2; i=Sub(i);}}<BR>void ProgB(){ int 
i;<BR>&nbsp;&nbsp;&nbsp;&nbsp;i=6;<BR>#ifdef 
Debug<BR>&nbsp;&nbsp;&nbsp;&nbsp;PORTC&amp;=~0x02; /* PC1 cleared when Sub is 
exited */<BR>#endif<BR>}</CODE><FONT 
face="Times New Roman,Times"><BR></FONT></P>
<ADDRESS><FONT face="Times New Roman,Times">Listing 11.3: Conditional 
compilation can help in removing all debugging code</FONT></ADDRESS>
<P><FONT face="Times New Roman,Times">For more information about debugging see 
Chapter 2 of Valvano's </FONT><U>Embedded Microcomputer Systems: Real Time 
Interfacing.</U></P>
<P>&nbsp;</P>
<P><B><FONT face="Times New Roman,Times"><A name=INCLUDE></A></FONT><I><FONT 
face=Helvetica,Arial>Including Other Source Files</FONT></I></B></P>
<P><FONT face="Times New Roman,Times">The preprocessor also recognizes 
directives to include source code from other files. The two 
directives</FONT></P>
<DIR>
<DIR>
<P><CODE>#include "Filename"</CODE></P>
<P><CODE>#include &lt;Filename&gt;</CODE></P></DIR></DIR>
<P><FONT face="Times New Roman,Times">cause a designated file to be read as 
input to the compiler. The difference between these two directives is where the 
compiler looks for the file. The &lt;filename&gt; version will search for the 
file in the standard include directory, while the "filename" version will search 
for the file in the same directory as the original source file. The preprocessor 
replaces these directives with the contents of the designated files. When the 
files are exhausted, normal processing resumes. </FONT></P>
<P><FONT face="Times New Roman,Times">Filename follows the normal MS-DOS file 
specification format, including drive, path, filename, and extension. 
</FONT></P>
<P><FONT face="Times New Roman,Times">In </FONT><A 
href="http://www.ece.utexas.edu/~valvano/embed/chap10/chap10.htm#PRIVATE">Chapter 
10</A><FONT face="Times New Roman,Times">, an example using #include was 
presented that implemented a feature similar to encapsulated objects of C++, 
including private and public functions.</FONT></P>
<P>&nbsp;</P>
<P><FONT face="Times New Roman,Times"><B><A 
name=PRAGMA></A></B></FONT><B><I><FONT face=Helvetica,Arial>Interrupt 
software</FONT></I></B></P>
<P><FONT face="Times New Roman,Times">The ICC11/ICC12 preprocessor also 
recognizes three pragma directives that we will use to develop interrupt 
software. We use the </FONT><CODE>interrupt_handler</CODE><FONT 
face="Times New Roman,Times"> pragma to specify a function as an interrupt 
handler. The compiler will then use the rti instruction rather than the rts 
instruction to return from </FONT><CODE>ExtHan</CODE><FONT 
face="Times New Roman,Times">.</FONT></P>
<P><CODE>#pragma interrupt_handler ExtHan()<BR>void ExtHan(void){ 
<BR>&nbsp;&nbsp;&nbsp;&nbsp;KWIFJ=0x80; // clear 
flag<BR>&nbsp;&nbsp;&nbsp;&nbsp;PutFifo(PORTJ&amp;0x7F);}<BR></CODE></P>
<ADDRESS><FONT face="Times New Roman,Times">Listing 11.4: Interrupt service 
routines are specified using a pragma in ICC11/ICC12.</FONT></ADDRESS>
<ADDRESS>&nbsp;</ADDRESS>
<P><FONT face="Times New Roman,Times">We use the 
</FONT><CODE>abs_address</CODE><FONT face="Times New Roman,Times"> and 
</FONT><CODE>end_abs_address</CODE><FONT face="Times New Roman,Times"> pragmas 
to define the interrupt vector.</FONT></P>
<P><CODE>#pragma abs_address:0xffdo<BR>void (*KeyWakupJ_interrupt_vector[])() = 
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;ExtHan}; /* 812 KeyWakeUpJ */<BR><BR>#pragma 
end_abs_address</CODE></P>
<ADDRESS><FONT face="Times New Roman,Times">Listing 11.5: Pragmas allow us to 
define interrupt vectors in ICC11/ICC12.</FONT></ADDRESS>
<P><FONT face="Times New Roman,Times">We also set the reset vector using the 
</FONT><CODE>abs_address</CODE><FONT face="Times New Roman,Times"> and 
</FONT><CODE>end_abs_address</CODE><FONT face="Times New Roman,Times"> 
pragmas.</FONT></P>
<P><CODE>extern void _start(); /* entry point in crt12.s */<BR>#pragma 
abs_address:0xfffe<BR>void (*Reset_interrupt_vectors[])() = 
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;_start }; /* fffe RESET, entry point into ICC12 
*/<BR>#pragma end_abs_address<BR></CODE></P>
<ADDRESS><FONT face="Times New Roman,Times">Listing 11.6: Pragmas allow us to 
define the reset vector in ICC11/ICC12.</FONT></ADDRESS>
<P><FONT face="Times New Roman,Times">We will not use pragmas to develop 
interrupt software with the Hiware compiler. We use the 
</FONT><CODE>interrupt</CODE><FONT face="Times New Roman,Times"> key word to 
specify a function as an interrupt handler. The Hiware compiler will then use 
the rti instruction rather than the rts instruction to return from 
</FONT><CODE>ExtHan</CODE><FONT face="Times New Roman,Times">. We start counting 
the interrupt number from reset. Some of the interrupt numbers used by Hiware 
for the MC68HC812A4 are shown in the following table.</FONT></P>
<P>
<TABLE cellSpacing=0 width=390 border=0>
  <TBODY>
  <TR>
    <TD vAlign=top width="17%">number</TD>
    <TD vAlign=top width="83%">source</TD></TR>
  <TR>
    <TD vAlign=top width="17%"><FONT face="Times New Roman,Times">24</FONT></TD>
    <TD vAlign=top width="83%"><FONT face="Times New Roman,Times">Key wakeup 
      H</FONT></TD></TR>
  <TR>
    <TD vAlign=top width="17%"><FONT face="Times New Roman,Times">23</FONT></TD>
    <TD vAlign=top width="83%"><FONT face="Times New Roman,Times">Key wakeup 
      J</FONT></TD></TR>
  <TR>
    <TD vAlign=top width="17%"><FONT face="Times New Roman,Times">20</FONT></TD>
    <TD vAlign=top width="83%"><FONT 
    face="Times New Roman,Times">SCI0</FONT></TD></TR>
  <TR>
    <TD vAlign=top width="17%"><FONT face="Times New Roman,Times">16</FONT></TD>
    <TD vAlign=top width="83%"><FONT face="Times New Roman,Times">timer 
      overflow</FONT></TD></TR>
  <TR>
    <TD vAlign=top width="17%"><FONT face="Times New Roman,Times">15</FONT></TD>
    <TD vAlign=top width="83%"><FONT face="Times New Roman,Times">timer 
      channel 7</FONT></TD></TR>
  <TR>
    <TD vAlign=top width="17%"><FONT face="Times New Roman,Times">8</FONT></TD>
    <TD vAlign=top width="83%"><FONT face="Times New Roman,Times">timer 
      channel 0</FONT></TD></TR>
  <TR>
    <TD vAlign=top width="17%"><FONT face="Times New Roman,Times">6</FONT></TD>
    <TD vAlign=top width="83%"><FONT face="Times New Roman,Times">Key wakeup 
      D</FONT></TD></TR>
  <TR>
    <TD vAlign=top width="17%"><FONT face="Times New Roman,Times">4</FONT></TD>
    <TD vAlign=top width="83%"><FONT face="Times New Roman,Times">SWI software 
      interrupt</FONT></TD></TR>
  <TR>
    <TD width="17%"><FONT face="Times New Roman,Times">0</FONT></TD>
    <TD width="83%"><FONT 
  face="Times New Roman,Times">reset</FONT></TD></TR></TBODY></TABLE></P>
<P><I>Table 11-1: Interrupt numbers for the MC68HC812A4 used by Hiware</I></P>
<P><FONT face="Times New Roman,Times">Hiware will automatically set the 
interrupt vector for KeyWakeup J to point to the ExtHan routine.</FONT></P>
<P><CODE>void interrupt 23 ExtHan(void){ <BR>&nbsp;&nbsp;&nbsp;&nbsp;KWIFJ=0x80; 
// clear 
flag<BR>&nbsp;&nbsp;&nbsp;&nbsp;PutFifo(PORTJ&amp;0x7F);}<BR></CODE></P>
<ADDRESS><FONT face="Times New Roman,Times">Listing 11.7: Interrupt service 
routines are specified in Hiware.</FONT></ADDRESS>
<ADDRESS>&nbsp;</ADDRESS>
<P><FONT face="Times New Roman,Times">We use the prm linker file to define the 
reset vector.</FONT></P>
<P><CODE>LINK keywake.abs<BR>NAMES keywake.o start12s.o ansis.lib 
END<BR>SECTIONS <BR>MY_RAM = READ_WRITE 0x0800 TO 0x0AFF;<BR>MY_ROM = READ_ONLY 
0xF000 TO 0xFF00;<BR>MY_STK = READ_WRITE 0x0B00 TO 
0x0BFF;<BR>PLACEMENT<BR>DEFAULT_ROM INTO MY_ROM;<BR>DEFAULT_RAM INTO 
MY_RAM;<BR>SSTACK INTO MY_STK;<BR>END<BR>/* set reset vector to function 
_Startup defined in startup code start12.c */<BR>VECTOR ADDRESS 0xFFFE 
_Startup<BR></CODE></P>
<ADDRESS><FONT face="Times New Roman,Times">Listing 11.8: The last line of the 
PRM linker file defines the reset vector in Hiware.</FONT></ADDRESS>
<P><FONT face="Times New Roman,Times"><BR>&nbsp;</FONT></P>
<P><FONT face="Times New Roman,Times">For more information about interrupts see 
Chapter 4 of Valvano's </FONT><U>Embedded Microcomputer Systems: Real Time 
Interfacing.</U></P>
<P>&nbsp;</P>
<P>Go to <A 
href="http://www.ece.utexas.edu/~valvano/embed/chap12/chap12.htm">Chapter 12 on 
Assembly Language</A> <FONT face="Times New Roman,Times">Return to <A 
href="http://www.ece.utexas.edu/~valvano/embed/toc1.htm">Table of 
Contents</A></FONT></P></BODY></HTML>

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美在线观看视频一区二区| 欧美一级日韩一级| 欧美一区二区播放| 国产精品成人在线观看| 免费欧美高清视频| 色悠久久久久综合欧美99| 日韩美女主播在线视频一区二区三区 | 国产.精品.日韩.另类.中文.在线.播放| 99精品欧美一区二区三区综合在线| 欧美videofree性高清杂交| 一区二区三区四区国产精品| 懂色av中文字幕一区二区三区 | 99久久精品国产麻豆演员表| 日韩欧美国产不卡| 亚洲第一久久影院| 色婷婷亚洲一区二区三区| 久久久久久久久免费| 日韩av不卡在线观看| 欧美三级乱人伦电影| 亚洲精品水蜜桃| 成人av在线播放网址| 久久噜噜亚洲综合| 另类小说色综合网站| 91精品国产色综合久久不卡蜜臀 | 国产成人av一区二区三区在线观看| 91麻豆精品国产91久久久久久| 亚洲欧美偷拍三级| 91香蕉国产在线观看软件| 国产精品麻豆久久久| 丁香六月久久综合狠狠色| 久久一区二区三区国产精品| 日本不卡一区二区| 日韩午夜三级在线| 国产一区不卡视频| 久久精品人人做人人爽人人| 国产电影一区在线| 中文字幕欧美区| 91在线视频免费观看| 亚洲精品成人少妇| 欧美日韩国产首页| 秋霞国产午夜精品免费视频| 精品播放一区二区| 国产在线精品视频| 中文字幕亚洲成人| 一本大道久久a久久综合| 亚洲精品成人天堂一二三| 欧美在线综合视频| 午夜精品久久一牛影视| 欧美xxxxx牲另类人与| 国产激情精品久久久第一区二区| 国产精品网友自拍| 一本色道久久综合亚洲aⅴ蜜桃| 亚洲国产一区二区三区青草影视| 欧美精品久久99| 激情五月播播久久久精品| 国产三级一区二区三区| av欧美精品.com| 调教+趴+乳夹+国产+精品| 精品日韩99亚洲| 色综合久久久久综合体| 日韩黄色片在线观看| 久久久亚洲高清| 99国产精品国产精品毛片| 丝袜美腿亚洲色图| 久久精品人人做| 欧美影院午夜播放| 极品美女销魂一区二区三区| 自拍视频在线观看一区二区| 欧美一级夜夜爽| 91在线免费看| 捆绑紧缚一区二区三区视频 | 色婷婷精品久久二区二区蜜臀av| 亚洲国产精品久久不卡毛片 | 日韩精品一卡二卡三卡四卡无卡| 精品国产网站在线观看| 91视频精品在这里| 精品一区免费av| 亚洲老司机在线| 久久一二三国产| 欧美精品1区2区3区| 99精品国产热久久91蜜凸| 六月丁香婷婷久久| 亚洲图片欧美视频| 国产精品视频yy9299一区| 日韩欧美卡一卡二| 欧美午夜在线一二页| 高清不卡在线观看| 天天影视涩香欲综合网| 一区在线播放视频| 久久精品人人做人人综合| 欧美一区二区三区的| 91老司机福利 在线| 国产成人免费av在线| 美女在线观看视频一区二区| 一区二区日韩av| 亚洲欧美日韩小说| 欧美激情一区二区三区不卡 | 亚洲一区二区三区四区的| 久久精品夜夜夜夜久久| 欧美一区二区三区视频| 精品视频一区二区三区免费| 一本一道波多野结衣一区二区| 国产91精品精华液一区二区三区| 秋霞国产午夜精品免费视频| 丝袜美腿亚洲一区二区图片| 亚洲国产精品一区二区www在线| 一区二区三区在线高清| 日韩一区日韩二区| 17c精品麻豆一区二区免费| 国产精品午夜在线观看| 国产精品人人做人人爽人人添| 久久精品一区二区三区不卡| 国产亚洲一二三区| 久久久久久99久久久精品网站| 久久午夜色播影院免费高清| 欧美不卡视频一区| 久久午夜电影网| 久久久综合精品| 国产精品人人做人人爽人人添| 国产精品久久久久久福利一牛影视 | av中文字幕一区| av在线综合网| 欧美亚日韩国产aⅴ精品中极品| 日本韩国精品在线| 欧美日韩电影在线播放| 日韩写真欧美这视频| 久久久久99精品国产片| 欧美国产日韩亚洲一区| 中文字幕综合网| 亚洲一区电影777| 蜜臀久久久久久久| 国产激情精品久久久第一区二区| 99久久99久久综合| 欧美中文字幕一区二区三区亚洲| 制服视频三区第一页精品| 精品国产乱码久久久久久浪潮 | 午夜精品久久久久久久99水蜜桃| 蜜桃一区二区三区在线观看| 国产一区二区导航在线播放| 不卡的电影网站| 欧美吞精做爰啪啪高潮| 欧美大尺度电影在线| 中文欧美字幕免费| 丝袜美腿高跟呻吟高潮一区| 国产大陆亚洲精品国产| 91成人网在线| 日韩精品中午字幕| 亚洲人成精品久久久久久| 日av在线不卡| 99精品视频一区| 日韩小视频在线观看专区| 综合久久一区二区三区| 免费三级欧美电影| 色综合网站在线| 欧美不卡一区二区| 亚洲综合一区在线| 国产99久久久国产精品免费看| 欧美视频一区在线| 欧美国产精品久久| 日本女优在线视频一区二区| 成人性生交大合| 日韩视频一区二区三区在线播放| 亚洲欧洲性图库| 精品影视av免费| 欧美高清你懂得| 亚洲天堂av一区| 国产成人午夜精品5599| 91麻豆精品国产91久久久久| 1024成人网| 国产乱码精品一区二区三区忘忧草| 欧美性大战久久| 中文字幕一区二区三区在线播放| 午夜精品一区二区三区电影天堂| 不卡一区二区三区四区| 日韩精品影音先锋| 亚洲mv在线观看| 色噜噜狠狠色综合中国| 日本一区二区三区四区 | 欧美男生操女生| 国产精品高潮呻吟久久| 国内精品伊人久久久久影院对白| 成人av片在线观看| 另类专区欧美蜜桃臀第一页| 久久超碰97中文字幕| 成人高清在线视频| 精品少妇一区二区三区免费观看| 亚洲综合激情网| 91美女片黄在线观看91美女| 国产嫩草影院久久久久| 久久99精品国产麻豆不卡| 欧美人与z0zoxxxx视频| 亚洲国产精品尤物yw在线观看| 色激情天天射综合网| 亚洲欧美色图小说| 色婷婷一区二区三区四区| 亚洲精品免费视频| 在线观看国产91| 亚洲午夜免费福利视频| 欧美日韩综合在线| 亚洲高清中文字幕|