Something I wrote once to detect 50/60Hz and CPU frequency on Coco1/2/Dragon: https://gitlab.com/m6809-computer-tools/various-6809/-/blob/master/bogomips.asm?ref_type=heads