国产探花免费观看_亚洲丰满少妇自慰呻吟_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


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

圖片精選

主站蜘蛛池模板: 周至县| 昌黎县| 遂平县| 阿拉善盟| 昌江| 九江县| 瑞丽市| 上栗县| 竹溪县| 青河县| 当雄县| 新晃| 扎鲁特旗| 广宗县| 聂拉木县| 东平县| 昌乐县| 曲阜市| 桐梓县| 大竹县| 濮阳市| 武安市| 福建省| 徐水县| 陵川县| 巫山县| 丹寨县| 化州市| 肥城市| 岑巩县| 清河县| 涿州市| 陇南市| 特克斯县| 仁化县| 五家渠市| 新兴县| 西吉县| 天镇县| 天镇县| 秀山|