![]() |
China DOS Union-- Unite DOS · Advance DOS · Grow DOS --Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum |
| Guest | Log in | Register | Members | Search | China DOS Union |
|
中国DOS联盟论坛 The time now is 2026-09-15 00:41 |
47,812 topics / 349,917 posts / today 0 new / 48,268 members |
| DOS开发编程 & 发展交流 (开发室) » Source code for a tiny program that displays the current time |
| Printable Version 1,633 / 0 |
| Floor1 ko20010214 | Posted 2003-06-01 00:00 |
| 版主 Posts 1,628 Credits 7,296 | |
|
Sender: JiLiu (紀柳~~Short Day Fan), Board: DOS
Title: Display Current Time Posted at: BBS Shuimu Tsinghua Station (Mon May 19 17:17:33 2003), forwarded I just looked through some of my old programs and found that this one was written very short and compact so I'm posting it here for everyone to see data segment string db 4 dup(?),"-",2 dup(?),"-",2 dup(?)," ",2 dup(?),":",2 dup(?),":",2 dup(?),0dh,0ah,"$" data ends code segment assume cs:code,ds:data doo macro n mov al,n out 70h,al in al,71h and al,0f0h shr al,cl add al,30h mov ,al inc bx in al,71h and al,0fh add al,30h mov ,al inc bx endm main proc mov ax,data mov ds,ax mov bx,offset string mov cl,4 doo 32h doo 9 inc bx doo 8 inc bx doo 7 inc bx doo 4 inc bx doo 2 inc bx doo 0 mov dx,offset string mov ah,9 int 21h mov ax,4c00h int 21h main endp code ends end main -- ※ Source: ·BBS Shuimu Tsinghua Station smth.org· (This article was copied using the S-Term article copy script) ================================================== |
|
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |