匯編器在微處理器的驗證和應(yīng)用中舉足輕重,如何設(shè)計通用的匯編器一直是研究的熱點之一。本文提出了一種開放式的匯編器系統(tǒng)設(shè)計思想,在匯編語言與機器語言間插入中間代碼CMDL(code mapping description language)語言,打破匯編語言與機器語言的直接映射關(guān)系,由此建立起一套描述匯編語言與機器語言的開放式映射體系。基于此開放式映射體系開發(fā)了一套匯編器系統(tǒng),具有較高層次上的通用性和可移植性。【關(guān)鍵詞】指令集,CMDL,匯編器,開放式
Design of Retargetable Assembler System Liu Ling Feng Wen Nan Wang Ying Chun Jiang An Ping Ji Li Jiu IME of Peking University, 100871【摘要】An assembler plays a very important role in the field of microprocessor verifications and applications, thus how to build a retargetable assembler system has been a hotspot in this field for long time. This paper presents a new method about the retargetable assembler system design.It provides a kind of language CMDL, code mapping description language. During the process of assembling, assembler languages are firstly translated to CMDL, and then mapped to the machine codes. In an other word, CMDL is inserted between assembler languages and machine codes during the translation procedure. As a medium code, CMDL has a lot of features, such as high extraction, strong descript capabilities. It can describe almost all attributes of assembler languages. By breaking the direct mapping relationship between assembler languages and machine codes, the complexities of machine codes are hided to the users, therefore, the new retargetable assembler system has higher retargetable level by converting the mapping from assembler languages and machine codes to assembler languages and CMDL, and implementationof it becomes easier. Based on the new mapping system structure, a retargetable assemblersystem is developed. It proved the whole system has good retargetability and implantability.【關(guān)鍵詞】instruction set, symbol table, assembler, lexical analysis, retargetability
標簽:
開放式
匯編器
上傳時間:
2013-10-10
上傳用戶:meiguiweishi
隨著單片機性能不斷提高而價格卻不斷下降, 單片機控制在越來越多的領(lǐng)域得以應(yīng)用。按照傳統(tǒng)的模式, 在整個項目開發(fā)過程中, 先根據(jù)控制系統(tǒng)要求設(shè)計原理圖, PCB 電路圖繪制, 電路板制作, 元器件的焊接, 然后進行軟件編程, 通過仿真器對系統(tǒng)硬件和軟件調(diào)試, 最后將調(diào)試成功的程序固化到單片機中。這一過程中的主要問題是, 應(yīng)用程序需要在硬件完成的情況下才能進行調(diào)試。雖然有的軟件可以進行模擬調(diào)試, 但是對于一些復雜的程序如人機交互程序, 在沒有硬件的時候, 沒有界面的真實感, 給調(diào)試帶來困難。在軟硬件的配合中如需要修改硬件, 要重新制板, 在時間和投入上帶來很大的麻煩。縱觀整個過程, 無論是從硬件成本上, 還是從調(diào)試周期上, 傳統(tǒng)開發(fā)模式的效率有待提高。能否只使用一種開發(fā)工具兼顧仿真, 調(diào)試, 制板, 以及最大限度的軟件模擬來作為單片機的開發(fā)平臺, 用它取代編程器、仿真器、成品前的硬件測試等工作是廣大單片機開發(fā)者的夢想。
PROTEUS 軟件介紹為了更加直觀具體地說明Proteus 軟件的實用價值, 本文以一具體的TAXI 的計價器和計時器電路板的設(shè)計過程為例。其電路板要實現(xiàn)的功能是:㈠計時功能(相當于時鐘);㈡里程計價功能:兩公里以內(nèi)價格為4 元, 以后每一公里加0.7 元, 不足一公里取整(如10.3 公里取11 公里);㈢通過鍵盤輸入里程, 模擬計算里程費, 實現(xiàn)Y= (X- 2)*0.7+4 的簡單計算。基于上述功能, 選用ATMEL 公司生產(chǎn)的通用芯片AT89C51 單片機構(gòu)成應(yīng)用系統(tǒng)。AT89C51 是內(nèi)含8 位4K 程序存儲器, 128B 數(shù)據(jù)存儲器, 2 個定時器/計數(shù)器的通用芯片。系統(tǒng)開發(fā)環(huán)境采用ProteusISIS 6。2.1 計價器模擬系統(tǒng)硬件構(gòu)成系統(tǒng)主要由一個AT89C51 單片機、74LS373、74LS240、矩陣鍵盤、4 位7 段數(shù)碼管等組成。通用AT89C51 單片機芯片作為整個電路的核心部分、74LS373 作為LED 段選控制、74LS240四路反相器則為4 位共陰極7 段數(shù)碼管提供位選通信號、矩陣鍵盤輸入控制信號。
標簽:
Proteus
單片機
出租車計價器
上傳時間:
2013-11-09
上傳用戶:木子葉1