; Routine for displaying the time on CRT: VIO/C, Morrow 56k ; with QT Clock time board. Title: 'Clock display program for VIO/C' ; Set EQU values clock equ 0080h ;Clock port address screen equ 0F046h ;Display address org 0DD60h time: push psw ! push b ! push d ! push h lxi h,screen ;Point to hour mvi d,0 ;Select hour tens digit call ddigit ;Read hour tens and unit inx h ;step over ":" call ddigit ;read minutes tens and unit inx h ;step over ":" call ddigit ;read seconds tens and unit pop h ! pop d ! pop b ! pop psw ret ddigit: call digit ;read and store two digits digit: mov a,d ;move digit seclect code to a call rdigit ;read a clock digit ori 30h ;convert digits to ascii cpi 03fh ;test for blanked leading zero jnz store ;store digit if not blanked mvi a,030h ;restore blank to ascii 0 store: mov m,a ;store the digit in message buffer inx h inr d ;step to next digit ani 00fh ;mask off high nibble ret ;return with digit in a rdigit: out clock ;select digit mvi a,0 dcr a ;....some delay time for settling. jnz $-1 dcr a jnz $-1 dcr a jnz $-1 in clock ;read a digit ret ;return with digit in a end