十進(jìn)制與十六進(jìn)制互換

十進(jìn)制與十六進(jìn)制互換

ID:39615161

大?。?8.00 KB

頁(yè)數(shù):6頁(yè)

時(shí)間:2019-07-07

十進(jìn)制與十六進(jìn)制互換_第1頁(yè)
十進(jìn)制與十六進(jìn)制互換_第2頁(yè)
十進(jìn)制與十六進(jìn)制互換_第3頁(yè)
十進(jìn)制與十六進(jìn)制互換_第4頁(yè)
十進(jìn)制與十六進(jìn)制互換_第5頁(yè)
資源描述:

《十進(jìn)制與十六進(jìn)制互換》由會(huì)員上傳分享,免費(fèi)在線閱讀,更多相關(guān)內(nèi)容在教育資源-天天文庫(kù)。

1、十進(jìn)制與十六進(jìn)制互換說(shuō)明:程序運(yùn)行,選擇功能。按1鍵:十進(jìn)制轉(zhuǎn)換成十六進(jìn)制,鍵入值:0-255;按2鍵:十六進(jìn)制轉(zhuǎn)換成十進(jìn)制,鍵入值:0-ff;按q鍵:退出。代碼部分:stacksegmentstack'stack'dw100hdup(?)toplabelwordstackendsdatasegmentselectdb?decimaldb5dup(?)bufferdb100dup(?)keybufferdb100db?db100dup(?)string1db'press1:deciamaltoHexadecimal',0dh,0ah,'press2:Hexadecimaltodec

2、iamal',0dh,0ah,'pressq:out',0dh,0ah,'$'string2db'pleaseinputdeciamaldata(0-255):$'string3db'pleaseinputHexadecimaldata(0-ff):$'string4db'changetoHexadecimal:$'string5db'changetodeciamal:$'dataendscodesegmentassumecs:code,ds:data,es:data,ss:stackstart:;鍵盤輸入十六進(jìn)制數(shù)(最大:ff),輸出十進(jìn)制數(shù)(255)movax,datamovd

3、s,axmoves,axmovax,stackmovss,axleasp,topmovcx,5movdx,0hleasi,decimallps:mov[si],dxincsilooplpsleadx,string1;顯示選擇功能提示movah,09hint21hmovah,01h;保存選擇項(xiàng)int21hmovselect,alcmpselect,71hjeovercalldispcrcmpselect,31h;根據(jù)選擇項(xiàng)顯示提示jekeleadx,string3jmpkrke:leadx,string2kr:movah,09hint21hmovah,0ahleadx,keybuff

4、erint21hleasi,keybuffer+1leadi,buffermovcx,[si]cmpselect,31hjekremovbx,10hjmplpkre:movbx,10lp:;取值到存儲(chǔ)單元incsideccxmoval,[si]subal,30hcmpselect,31hjedecmpal,0ahjbdesubal,27hde:add[di],almoval,0dhcmp[si],aljeovercmp[si+1],aljemp;是回車moval,[di];不是回車乘16mulbxmov[di],allooplpmp:calldispcrcmpselect,31hj

5、eucleadx,string5jmpuctuc:leadx,string4uct:movah,09hint21hmovcx,dileasi,buffersubcx,siinccxxorax,axmoval,[si]calldispaxdcalldispcr;calldispcr;jmpstart;over:movah,4chint21hdispcrprocnearpushaxpushdxmovah,02hmovdl,0ahint21hmovah,02hmovdl,0dhint21hpopdxpopaxretdispcrendpdispaxdprocnearpushcxpushsi

6、leasi,decimalmovcx,0hcmpselect,31hjetcrmovbl,10jmptrxtcr:movbl,10htrx:jmpkitc:incsiki:divblinccxmov[si],ahxorah,ahcmpselect,31hjeutcmpal,09hjmputrut:cmpal,0fhutr:jgtccmpal,0hjexoincsiinccxmov[si],alxo:movdl,[si]adddl,30hcmpselect,31hjnesdcmpdl,3ahjbsdadddl,27hsd:movah,02hint21hdecsiloopxopopsi

7、popcxretdispaxdendpcodeendsendstart運(yùn)行截圖:

當(dāng)前文檔最多預(yù)覽五頁(yè),下載文檔查看全文

此文檔下載收益歸作者所有

當(dāng)前文檔最多預(yù)覽五頁(yè),下載文檔查看全文
溫馨提示:
1. 部分包含數(shù)學(xué)公式或PPT動(dòng)畫的文件,查看預(yù)覽時(shí)可能會(huì)顯示錯(cuò)亂或異常,文件下載后無(wú)此問(wèn)題,請(qǐng)放心下載。
2. 本文檔由用戶上傳,版權(quán)歸屬用戶,天天文庫(kù)負(fù)責(zé)整理代發(fā)布。如果您對(duì)本文檔版權(quán)有爭(zhēng)議請(qǐng)及時(shí)聯(lián)系客服。
3. 下載前請(qǐng)仔細(xì)閱讀文檔內(nèi)容,確認(rèn)文檔內(nèi)容符合您的需求后進(jìn)行下載,若出現(xiàn)內(nèi)容與標(biāo)題不符可向本站投訴處理。
4. 下載文檔時(shí)可能由于網(wǎng)絡(luò)波動(dòng)等原因無(wú)法下載或下載錯(cuò)誤,付費(fèi)完成后未能成功下載的用戶請(qǐng)聯(lián)系客服處理。