7 extrn msg.sm,msg.recv,hwl2phy
13 ;----------------------------------------------------------------------
24 ; Let all vectors point to spurious int routines.
42 ;--------------------------------------------------------------------
43 ; Spurious interrupt handler
49 sp.int.len equ $-sp.int0
77 db 13,10,'Spurious Int: '
81 ;--------------------------------------------------------------------
83 ; Get/compute CPU clock
86 ; hlde: CPU frequency (Hz)
99 ; delay ~8ms @ 18.432MHz --> 147456 clock cycles
100 ; delay ~10ms @ 18.432MHz --> 184320 clock cycles
103 ; ld hl,8192 ; 147456/18
104 ld hl,(10240-100)*5 ; 184320/18
109 jr nz,dly_lp ; 6/8 -> 18 cycles
117 ld de,036EEh ;18432000/(2**16) * 50
118 ld hl,08000h ;18432000%(2**16) * 50
131 ;--------------------------------------------------------------------
137 ld hl,1*256 + 3 ; h = subcommand, l = command
147 ld b,7 ; max receive message len
156 ;----------------------------------------------------------------------