资源描述:
《汇编显示时钟(已调试通过)》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、汇编显示时钟(已调试通过)翾嫕嬿制作汇编显示时钟(已调试通过)显示效果程序代码段如下:;******************************************************;*堆栈段.286;******************************************************STACK_SEGSEGMENTSTACKSTACK_BUFDW120DUP(?)TOPEQU$-STACK_BUFSTACK_SEGENDS;****************
2、**************************************;*数据段;******************************************************DATA_SEGSEGMENTPARA;------------------------------------------------------;TODO:数据的定义及存储器的分配ts1DB0quitbufDB'ThisIsAClock,ProgramBySunliang,08ComputerNet
3、workClass','$'sigleDB80habsxDW0第34页共34页汇编显示时钟(已调试通过)翾嫕嬿制作absyDW0r0DW100x0DW480y0DW356count0db0count_hourDB11count_minuteDB11yuanxinxDW0yuanxinyDW0sDB0s2DB0s3DB0hourDW0hour2DW0minuteDW0minute2DW0secondDB0second2DB0sin_xDW0sin_xxDW0xDW0yDW0x1DW0xminyDW
4、0yminxDW0xmaxDW0ymaxDW0yminDW0xminDW0sjx_xminyDW0sjx_yminxDW0sjx_xmaxDW0sjx_ymaxDW0sjx_yminDW0sjx_xminDW0yuanxDW0yuanyDW0y1DW0x2DW0y2DW0x3DW0y3DW0第34页共34页汇编显示时钟(已调试通过)翾嫕嬿制作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;设置显示方式(彩色)MOVDX,0010hCALLb1002;入口DX-光标定位LEABP,quitbuf;取buff有效的地址MOVDX,BPMOVAH,9INT21Hbeg2:CALLskin;数字加圆CALLskin2;12根CALLCLk;设置时间计数器第34页共34页汇编显示时钟(已调试通过)翾嫕嬿制作MOVsecond,DHMOVsecond2,DHMOVcount_minute,11CALLminute_lin;分针XORDX,DX;逻辑
8、异或MOVAX,minute2MOVCX,12DIVCXMOVCX,AX;minute2/12POPAXADDAX,CXMOVhour2,AXMOVcount_hour,11CALLhour_lin;时针CALLCLkMOVDL,DHCALLbcd2XORAH,AH;逻辑异或MOVCL,12DIVCL;除法指令MOVcount_minute,AH;second%12初始值DECcount_minuteXORDX,DXMOVAX,minute2MOVCX,12DIVCX;minurte2%12MO