1 title 'Time module for the Modular CP/M 3 BIOS'
7 extrn @date,@hour,@min,@sec
17 ;----------------------------------------------------------------------
21 cseg ; time must be done from resident memory
38 ;----------------------------------------------------------------------
54 ld b,a ;b = sec, c = subcommand
58 ld hl,3 * 256 + 0 ;h = command, l = 0
70 ld b,8 ; max receive message len
73 pop hl ;len/command (discard)
89 ;----------------------------------------------------------------------
91 ;uint32_t get_timer(uint32_t base)
94 ; ATOMIC_BLOCK(ATOMIC_FORCEON)
101 dseg ; called from banked only
111 ;----------------------------------------------------------------------
130 ;----------------------------------------------------------------------
131 ; intit timer interrupt
138 and ~(M_TIE0+M_TDE0) ;stop timer 0
154 ld bc,PRT_PRE * 800 ;1/800 s == 1,25 ms interrupt rate
167 ;----------------------------------------------------------------------
176 in0 a,(tcr) ;reset TIF0 flag