title 'Realtime display for VIO/C' ; This program will use the QT time board to display the real- ; time date/time on the display driven by a VIO/C video card. ; clock equ 080h ; real time clock base port address screen equ 0f038h ;Display address org 100h push psw ! push b ! push d ! push h time: lxi h,hour ; point to hour mvi d,0 ; select hour tens digit call ddigit ; read hour tens and units inx h ; step over ":" call ddigit ; read minutes tens and units inx h ; step over ":" call ddigit ; read second tens and units done: lxi d,hour lxi h,screen+9 call itgoes pop h ! pop d ! pop b ! pop psw jmp 100h ;All done. itgoes ldax d ;get the characters cpi '$' ;until exhausted rz mov m,a inx h inx d jmp itgoes ddigit: call digit ; read and store two digits digit: mov a,d ; move digit select code to a reg. call rdigit ; read a clock digit ori 030h ; convert digit to ASCII cpi 03fh ; test for blanked leading zero jnz store ; go store digit, if not blanked mvi a,020h ; convert to a blank store: mov m,a ; store the digit in message buffer inx h ; bump message pointer buffer location inr d ; step to next digit ani 00fh ; mask off high ASCII nibble ret ; return with digit in a reg. rdigit: out clock ; select digit mvi a,0 ; ...some delay time for settling dcr a jnz $-1 dcr a jnz $-1 in clock ; read a digit ret ; return with digit in a reg. ; Š; message buffers ; hour: db 'xx:' ; the hour... db 'xx:' ; the minute... db 'xx$' ; the second... end