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

首頁 > 編程 > ASM > 正文

匯編語言簡易時鐘

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

代碼解釋如下:

;從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


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

圖片精選

主站蜘蛛池模板: 三原县| 迭部县| 澄城县| 巴中市| 上思县| 武汉市| 札达县| 肃北| 白玉县| 大新县| 山阳县| 景德镇市| 恭城| 佛冈县| 崇阳县| 井研县| 苗栗县| 库伦旗| 德钦县| 石阡县| 城固县| 邵阳县| 郑州市| 兴国县| 容城县| 合阳县| 九江市| 时尚| 屏山县| 宝坻区| 铜鼓县| 安岳县| 炉霍县| 合江县| 德阳市| 麻城市| 海阳市| 泾川县| 靖安县| 龙州县| 丹巴县|