freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

用vhdl語(yǔ)言編寫(xiě)的數(shù)字鐘程序5篇(文件)

 

【正文】 c: out std_logic。該位為1表示該月為30天day31: in std_logic該位為1表示該月為31天)。begin days“00101001”when day29=39。else“00110001”when day31=39。139。該位為1表示該月為28天day29: out std_logic。architecture arch of days_control is begin process(month,year2,year1)begin case month is when “00000001”=day28if(year2=39。and year1=“10”)thenday28elseday28end if。閃爍脈沖setlap:in std_logic_vector(1 downto 0)。年月日計(jì)數(shù)值輸入dis: out std_logic_vector(23 downto 0)。139。調(diào)整輸入set1:out std_logic。q2: out std_logic_vector(7 downto 0)。139。調(diào)整位選擇d:in std_logic_vector(7 downto 0)。小時(shí)輸出qh:out std_logic。set:in std_logic。end ponent。q: out std_logic_vector(7 downto 0)。setlap: in std_logic_vector(1 downto 0)。set3:out std_logic。end ponent。begin u1:dmux port map(set,setlap,d,secset,minset,hourset,secin,minin,hourin)。qhport(clk: in std_logic。小時(shí)輸出qc:out std_logic進(jìn)位)。139。調(diào)整輸入month_out: out std_logic_vector(7 downto 0)。begin process(clk,set,month_in)begin if set=39。調(diào)整時(shí)間輸入q:out std_logic_vector(7 downto 0)。begin process(clk,set)begin if set=39。啟動(dòng)/停止centsec: out std_logic_vector(7 downto 0)。architecture arch of stopwatch is ponent counter99 port(clk: in std_logic。qc: out std_logic)。q: out std_logic_vector(7 downto 0)。signal tcentsec,tsec,tmin,thour:std_logic_vector(7 downto 0)。u4:counter60 port map(qc3,reset,thour,qc4)。end weekcounter。計(jì)數(shù)脈沖set: in std_logic。日輸出month: out std_logic_vector(7 downto 0)。set: in std_logic。day28: in std_logic。end ponent。month_out: out std_logic_vector(7 downto 0)。set: in std_logic。ponent dmuxport(set:in std_logic。set2:out std_logic。q3: out std_logic_vector(7 downto 0))。year1: in std_logic_vector(1 downto 0)。day31: out std_logic)。signal dayin,monthin,yearin: std_logic_vector(7 downto 0)。u2:daycounter port map(clk,dayset,dayin,day,qcday,day28,day29,day30,day31)。monthend arch。use 。調(diào)整輸入year_out: out std_logic_vector(7 downto 0)年輸出)。139。t第四篇:數(shù)字鐘程序c語(yǔ)言課程設(shè)計(jì)include“” void clock(int t)。常用的有 MSDOS 下的 EDIT 文本編輯程序,Windows 下的寫(xiě)字板()等。匯編系統(tǒng)盤(pán)應(yīng)包含如下文件: MASM 宏匯編程序文件 LISK 連接程序文件CRFF 索引程序文件(也可不用)匯編源程序編寫(xiě))源程序的書(shū)寫(xiě)格式當(dāng) CPU 訪(fǎng)問(wèn)內(nèi)存時(shí),是把存儲(chǔ)器分成若干個(gè)段,通過(guò) 4 個(gè)段寄存器中存放的地址對(duì)內(nèi)存儲(chǔ)器訪(fǎng)問(wèn),因此在編源程序時(shí)必須按段的結(jié)構(gòu)來(lái)編制程序。堆棧段名 ENDS 邏輯數(shù)據(jù)段 數(shù)據(jù)段名 SEGMENT 用變量定義預(yù)置的數(shù)據(jù)空間 過(guò)程名 ENDP 代碼段名 ENDS END 過(guò)程名或起始標(biāo)號(hào)在源程序中最少要有一個(gè)代碼段,數(shù)據(jù)段根據(jù)需要可有可無(wú),也可以增設(shè)附加段。(1)DS、ES、SS 的裝入由于段寄存器不能用立即數(shù)尋址方式直接傳送,所以段地址裝入可通過(guò)通用寄存器傳送給段寄存器。②在程序運(yùn)行過(guò)程中,當(dāng)執(zhí)行某些指令和操作時(shí),CPU 自動(dòng)修改 CS 和 IP 的值,使它們指向新的代碼段。(1)變量與數(shù)據(jù)的定義變量與數(shù)據(jù)的定義可以通過(guò)符號(hào)定義偽指令 EQU、=和數(shù)據(jù)定義偽指令 DB 或 DW 或 DD 來(lái)實(shí)現(xiàn)。當(dāng)然,用立即數(shù)的方法只是將一個(gè)數(shù)據(jù)傳送到通用寄存器中,它只是通過(guò)通用寄存器傳送數(shù)據(jù)。②在打印機(jī)上輸出一個(gè)字符調(diào)用 05H 號(hào)功能調(diào)用號(hào),發(fā) 21H 號(hào)中斷,將要打印字符的 ASCII 碼送入 DL,就可在打印機(jī)上打印出 DL 中的字符。為了完成匯編任務(wù),匯編程序一般采用兩遍掃描的方法,第一遍掃描源程序產(chǎn)生符號(hào)表、處理偽指令等,第二遍掃描產(chǎn)生機(jī)器指令代碼、確定數(shù)據(jù)等。其中目標(biāo)文件是必須產(chǎn)生的,而其它兩個(gè)文件在需要時(shí)給予命令就可產(chǎn)生,對(duì)連接和執(zhí)行匯編程序無(wú)直接的關(guān)系。在匯編過(guò)程中,如果發(fā)現(xiàn)源程序中有語(yǔ)法錯(cuò)誤,則提示出錯(cuò)信息,指出是什么性質(zhì)的錯(cuò)誤,錯(cuò)誤類(lèi)型,最后列出錯(cuò)誤的總數(shù)。如果 4 個(gè)文件都需要,用簡(jiǎn)便的操作方法是在分號(hào)前用了 3 個(gè)逗號(hào)。(2)段信息匯總表在段信息匯總表中列出該程序用了哪幾個(gè)段,如:代碼段 CODE、數(shù)據(jù)段 DATA 和堆棧段 STACK ;每個(gè)段所占存儲(chǔ)空間的長(zhǎng)度(字節(jié)數(shù));每個(gè)段的定位類(lèi)型,包括 PAGE(頁(yè))、PARA(節(jié))、WORD(字)和 BYTE(字節(jié)),它們表示此段的起始邊界要求,即起始邊界地址應(yīng)分別可以被 2512 和 1 除盡。是隱含組合類(lèi)型。如果在源程序中存在某些語(yǔ)法錯(cuò)誤時(shí),列表文件可提示某條語(yǔ)句有哪些錯(cuò)誤,出錯(cuò)提示顯示在出錯(cuò)指令行的下面,因此用戶(hù)可借助列表文件很快地找到錯(cuò)誤行,以便調(diào)試。具體操作方法如下: D CREF ↓cref filename [.CRF] : MYFILE ↓ list filename [] : ↓ D TYPE ↓用匯編語(yǔ)言編寫(xiě)的源程序經(jīng)過(guò)匯編程序(MASM)匯編后產(chǎn)生了目標(biāo)程序(.OBJ),該文件是將源程序操作碼部分變成了機(jī)器碼,但地址是可浮動(dòng)的相對(duì)地址(邏輯地址),因此必須經(jīng)過(guò)連接程序 LINK 連接后才能運(yùn)行。其中 MAP 文件是否需要建立,由用戶(hù)決定,需要?jiǎng)t鍵入文件名,不需要?jiǎng)t直接送入一個(gè)回車(chē)鍵。如果除 文件外還要產(chǎn)生 文件,則在分號(hào)前加兩個(gè)逗號(hào)。應(yīng)用程序執(zhí)行當(dāng)用連接程序 LINK 將目標(biāo)程序(.OBJ)連接定位后,可產(chǎn)生可執(zhí)行的應(yīng)用程序文件(.EXE),可以在 DOS 狀態(tài)下執(zhí)行該程序。在 DOS 狀態(tài)下,用 TYPE 命令顯示打印出來(lái)。與匯編程序一樣,可以在連接時(shí)用分號(hào)結(jié)束后續(xù)詢(xún)問(wèn)。此外還可以產(chǎn)生一個(gè)內(nèi)存映象文件。)交叉索引文件(.CRF)匯編后產(chǎn)生的交叉索引文件,, 它列出了源程序中定義的符號(hào)(包括:標(biāo)號(hào)、變量等)和程序中引用這些符號(hào)的情況。在列表程序的源程序中只有一個(gè)棧段,在棧段定義中給出了組合類(lèi)型為 STACK,因此在段信息匯總表中列出了該項(xiàng),在本程序中它沒(méi)有任何意義,因?yàn)闆](méi)有其它棧段與它連接,只是為了說(shuō)明這個(gè)問(wèn)題而設(shè)置的。最后一列為段的組合類(lèi)型;段的組合類(lèi)型是告訴連接程序,本段與其它段的關(guān)系,組合類(lèi)型有 NONE、PUBLIC、COMMOM、AT 表達(dá)式、STACK 和 MEMORY。如顯示 D 盤(pán)上已存在的列表文件 操作方法如下: D TYPE ;↓ 列表程序由三部分組成:(1)源程序和目標(biāo)程序清單列表程序同時(shí)列出源程序和對(duì)應(yīng)的機(jī)器語(yǔ)言清單。如果在匯編時(shí)不需要產(chǎn)生列表文件(.LST)和交叉索引文件(.CRF),調(diào)用匯編程序時(shí)可用分號(hào)結(jié)束。如果不想要列表文件和交叉索引文件,則可在 [ ] 和 [] 后不鍵入文件名只鍵入回車(chē)符。第二個(gè)文件是列表文件,它把源程序和目標(biāo)程序列表,以供檢查程序用。匯編處理 — 執(zhí)行宏匯編程序 用匯編語(yǔ)言編寫(xiě)的源程序必須是一個(gè)完整的源程序。④用鍵盤(pán)提供數(shù)據(jù)當(dāng)原始數(shù)據(jù)為任意數(shù)據(jù)時(shí),一般用鍵盤(pán)輸入方法,調(diào)用 DOS 21H 中斷。(2)匯編程序中數(shù)據(jù)的提供方法 ①用數(shù)據(jù)定義偽指令提供數(shù)據(jù)如果程序要求原始數(shù)據(jù)為一批數(shù)據(jù)時(shí),用數(shù)據(jù)定義偽指令 DB、DW 和 DD 來(lái)提供較為方便。在數(shù)據(jù)定義的同時(shí)還可以定義變量,將變量與數(shù)據(jù)結(jié)合在一起。(2)CS 的裝入代碼段寄存器是裝當(dāng)前執(zhí)行目標(biāo)代碼的段地址,IP 是提供下一條要執(zhí)行的目標(biāo)代碼的偏移量,為了保證程序的正確執(zhí)行,CS 和 IP 裝入新值時(shí)是一起完成的。其中: SEGMENT、ASSUME、PROC … ENDP 為偽指令,偽指令是發(fā)給匯編程序 ASM 的,而不和微處理器打交道,在匯編時(shí)不產(chǎn)生目標(biāo)代碼,只是把源程序中各段的設(shè)置情況告訴匯編程序。數(shù)據(jù)段名 ENDS 邏輯代碼段 代碼段名 SEGMENT ASSUME 定義各段尋址關(guān)系 過(guò)程名 PROC … 程序 源程序的書(shū)寫(xiě)一般有如下形式:邏輯堆棧段 堆棧段名 SEGMENT STACK 用變量定義預(yù)置的堆??臻g ASM。for(t=0。void main(){ int t,i,j,n。architecture arch of yearcounter is signal temp1,temp2:std_logic_vector(3 downto 0)。計(jì)數(shù)脈沖set: in std_logic。use 。u4:yearcounter port map(qcmonth,yearset,yearin,syear)。signal day28,day29,day30,day31:std_logic。signal dayset,monthset,yearset: std_logic。day29: out std_logic。ponent days_controlport(month: in std_logic_vector(7 downto 0)。q1: out std_logic_vector(7 downto 0)。d: in std_logic_vector(7 downto 0)。year_out: out std_logic_vector(7 downto 0))。end ponent。set: in std_logic。day30: in std_logic。day_out: out std_logic_vector(7 downto 0)。end y_m_d_count。調(diào)整位選擇data_in: in std_logic_vector(7 downto 0)。signal cp:std_logic。天脈沖clk2: in std_logic。u2:counter60 port map(qc1,reset,tsec,qc2)。end ponent。ponent counter60 port(clk: in std_logic。clr: in std_logic。秒輸出,當(dāng)超過(guò)60分轉(zhuǎn)為分min: out std_logic_vector(7 downto 0)分輸出,當(dāng)超過(guò)60分轉(zhuǎn)為小時(shí))。then temp2temp1reset: in std_logic。end sec_mincounter。 then temp2temp1set:in std_logic。end monthcounter。計(jì)數(shù)脈沖set: in std_logic。architecture arch of hourcounter is signal temp1,temp2:std_logic_vector(3 downto 0)。調(diào)整信號(hào)d:in std_logic_vector(7 downto 0)。u3:sec_mincounter port map(qcsec,minset,minin,min,qcmin)。signal secin,minin,hourin:std_logic_vector(7 downto 0)。q2: out std_logic_vector(7 downto 0)。set1:out std_logic。end ponent。set:in std_logic。q:out std_logic_vector(7 downto 0)。end h_m_s_count。秒輸出min:out std_logic_vector(7 downto 0)。1hz脈沖set: in std_logic。end dmux。set3:out std_logic。調(diào)整信號(hào)setlap: in std_logic_vector(1 downt
點(diǎn)擊復(fù)制文檔內(nèi)容
數(shù)學(xué)相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1