資源描述:
《匯編顯示時(shí)鐘(已調(diào)試通過)》由會員上傳分享,免費(fèi)在線閱讀,更多相關(guān)內(nèi)容在教育資源-天天文庫。
1、匯編顯示時(shí)鐘(已調(diào)試通過)翾嫕嬿制作匯編顯示時(shí)鐘(已調(diào)試通過)顯示效果程序代碼段如下:;******************************************************;*堆棧段.286;******************************************************STACK_SEGSEGMENTSTACKSTACK_BUFDW120DUP(?)TOPEQU$-STACK_BUFSTACK_SEGENDS;****************
2、**************************************;*數(shù)據(jù)段;******************************************************DATA_SEGSEGMENTPARA;------------------------------------------------------;TODO:數(shù)據(jù)的定義及存儲器的分配ts1DB0quitbufDB'ThisIsAClock,ProgramBySunliang,08ComputerNet
3、workClass','$'sigleDB80habsxDW0第34頁共34頁匯編顯示時(shí)鐘(已調(diào)試通過)翾嫕嬿制作absyDW0r0DW100x0DW480y0DW356count0db0count_hourDB11count_minuteDB11yuanxinxDW0yuanxinyDW0sDB0s2DB0s3DB0hourDW0hour2DW0minuteDW0minute2DW0secondDB0second2DB0sin_xDW0sin_xxDW0xDW0yDW0x1DW0xminyDW
4、0yminxDW0xmaxDW0ymaxDW0yminDW0xminDW0sjx_xminyDW0sjx_yminxDW0sjx_xmaxDW0sjx_ymaxDW0sjx_yminDW0sjx_xminDW0yuanxDW0yuanyDW0y1DW0x2DW0y2DW0x3DW0y3DW0第34頁共34頁匯編顯示時(shí)鐘(已調(diào)試通過)翾嫕嬿制作DIancolorDB0colorDB2color_hourDB2color_minDB6color_secondDB9color4DB10color5DB
5、11color6DB12page1DB0y2y1DW0x2x1DW0sjx_y2y1DW0sjx_x2x1DW0DATA_SEGENDS;******************************************************;*代碼段;******************************************************CODE_SEGSEGMENTPARA;-----------------------------------------------
6、-------MAINPROCFARASSUMECS:CODE_SEG,DS:DATA_SEGASSUMESS:STACK_SEGSTART:MOVAX,STACK_SEGMOVSS,AXMOVSP,TOPMOVAX,DATA_SEGMOVDS,AX;------------------------------------------------------;TODO:從這里開始您的代碼;------------------------------------------------------
7、beg:MOVAX,0012hINT10h;設(shè)置顯示方式(彩色)MOVDX,0010hCALLb1002;入口DX-光標(biāo)定位LEABP,quitbuf;取buff有效的地址MOVDX,BPMOVAH,9INT21Hbeg2:CALLskin;數(shù)字加圓CALLskin2;12根CALLCLk;設(shè)置時(shí)間計(jì)數(shù)器第34頁共34頁匯編顯示時(shí)鐘(已調(diào)試通過)翾嫕嬿制作MOVsecond,DHMOVsecond2,DHMOVcount_minute,11CALLminute_lin;分針XORDX,DX;邏輯
8、異或MOVAX,minute2MOVCX,12DIVCXMOVCX,AX;minute2/12POPAXADDAX,CXMOVhour2,AXMOVcount_hour,11CALLhour_lin;時(shí)針CALLCLkMOVDL,DHCALLbcd2XORAH,AH;邏輯異或MOVCL,12DIVCL;除法指令MOVcount_minute,AH;second%12初始值DECcount_minuteXORDX,DXMOVAX,minute2MOVCX,12DIVCX;minurte2%12MO