這個例子如果運行,將在仿真的PC窗口中的第1,2,3行顯示一些信息后,在隨機位置顯示 1 ~ 5 .由于keil c51默認不支持重入函數,它的重入函數使用仿真的重入棧而不使用系統棧,而Small RTOS 51沒有進行重入棧管理,所以在TaskA~TaskE雖然及其相似,但不能合并.
注意:(1)在KEIL C51 工程中,我已經把輸出文件目錄設在e:\temp中,您可以在Project->Options for Target "Target 1"的output頁點擊Select Folder for Objects...和Listing頁點擊Select Folder for Listing...改變.
(2)編譯時會有5個警告,其中一個是因為沒有使用一個系統函數OSSendSignal引起,它可以忽略.另4個是禁止任務間變量覆蓋分析引起,必須忽略.感謝網友John X. Liu,在這個例子中我使用了他編寫的仿真(dllPc51Emu.dll),這個dll原來是為他移植的Ucos-ii for keil c51的例子編寫.
(3)Pc51Emu.dll在KEIL C51 V6.23 V7.00工作不正常.
標簽:
Small
keil
c51
仿真
上傳時間:
2015-05-29
上傳用戶:無聊來刷下
The government of a small but important country has decided that the alphabet needs to be streamlined and reordered. Uppercase letters will be eliminated. They will issue a royal decree in the form of a String of B and A characters. The first character in the decree specifies whether a must come ( B )Before b in the new alphabet or ( A )After b . The second character determines the relative placement of b and c , etc. So, for example, "BAA" means that a must come Before b , b must come After c , and c must come After d .
Any letters beyond these requirements are to be excluded, so if the decree specifies k comparisons then the new alphabet will contain the first k+1 lowercase letters of the current alphabet.
Create a class Alphabet that contains the method choices that takes the decree as input and returns the number of possible new alphabets that conform to the decree. If more than 1,000,000,000 are possible, return -1.
Definition
標簽:
government
streamline
important
alphabet
上傳時間:
2015-06-09
上傳用戶:weixiao99