7a8 ;****************************************** ;* Routine to send a DAYTIME command * ;* to your TNC with the setting of * ;* the real time clock in your PC * ;****************************************** jmp start outstr: db 'DAYTIME ' val: db 10 dup 0,0D ;Space for year,month,day,time and a CR length equ $-outstr start: mov ah,04H ; Read real time clock date int 1aH mov bp,val mov bl,cl ;Year call calc mov bl,dh ;Month call calc mov bl,dl ;Day call calc mov ah,02H ;Read real time clock time int 1aH mov bl,ch call calc mov bl,cl call calc jmp output calc: mov al,bl shr al,4 ;We want the high nibble... and al,0f add al,030 mov b[bp],al ;first character in year inc bp mov al,bl and al,0f add al,030 mov b[bp],al ;second character in year inc bp ret output: mov bp,outstr ;Pointer to the daytime string mov si,0 mov dx,02e8H ;COM4 port address mov cx,19 ;19 characters to output loopi: mov al,b[bp+si] out dx,al ;output character to COM4 port inc si ;and advance SI push dx flush: mov dx,02ed in al,dx test al,32 ;wait for output buffer to be empty jz flush pop dx loop loopi ;next character mov ax,04c00 ;That's it! int 21H . 0