国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > ASM > 正文

匯編語言簡易時鐘

2019-11-10 19:19:54
字體:
來源:轉載
供稿:網友

代碼解釋如下:

;從CMOS RAM中讀取存儲的時間信息,顯示當前的系統時間在屏幕上assume cs:codedata segment	db 'YY MM DD HH MM SS',0     	  ;時間以這個形式顯示data endscode segmentinfo: 			db 9,8,7,4,2,0			;標志年 月 日 時 分 秒不同時間的位置start:			call init_regtimeChange:		call show_clock			;一直在這里循環不斷更新時間				jmp timeChange				mov ax,4c00h				int 21h;========================================================init_reg:		mov ax,0B800h				mov es,ax				mov ax,cs				mov ds,ax				mov di,160*12 + 40*2				mov si,offset info				mov cx,6				ret;========================================================show_clock:		push dx				push es				push di				push si				push ds				push cx				showTime:		mov al,ds:[si]								out 70h,al					;向70h號端口輸出al				in al,71h					;在71h號端口讀取數據放入al				mov ah,al				shr ah,1					;這個了用4個shr,主要是為了不破壞cx的值				shr ah,1				shr ah,1				shr ah,1				and al,00001111B				add ah,30h					;add 30h 就轉為能看懂的ASCII碼				add al,30h				mov es:[di],ah				mov es:[di+2],al				inc si						;標志不同時間(月年日時分秒)的位置更新				add di,6								loop showTimeshowClockRet:	pop cx				pop ds				pop si				pop di				pop es				pop dx				ret;========================================================			code endsend start


發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表

圖片精選

主站蜘蛛池模板: 新疆| 宣武区| 绵阳市| 白银市| 新蔡县| 军事| 繁昌县| 周至县| 方正县| 江陵县| 渭南市| 马龙县| 达孜县| 菏泽市| 临桂县| 城口县| 腾冲县| 昔阳县| 开江县| 鄂托克旗| 新昌县| 莱阳市| 甘肃省| 应用必备| 宁化县| 邹城市| 贵南县| 全州县| 庆城县| 河北省| 葫芦岛市| 古蔺县| 南充市| 延川县| 炎陵县| 梅河口市| 易门县| 宁陕县| 耿马| 长兴县| 南召县|