where is the rotating thing /^H-^H\^H|^H/^H-...

Dan Nelson dnelson at allantgroup.com
Sun Dec 21 12:44:53 PST 2003


In the last episode (Dec 21), Bjoern A. Zeeb said:
> Hi,
> 
> I am currently searching the  sequence (rotating thing at boot time
> when loading kernel or md_images ...):
> 
> /^H-^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|
> 
> can anybody please tell me where the code for this is (be it C or 4th) ?

It's usually implemented as something like:

    static unsigned c = 0x2d5c7c2f;
    printf("%c\b", c = c << 8 | c >> 24);

Print the first byte of 'c', then rotate it 8 bits :)

-- 
	Dan Nelson
	dnelson at allantgroup.com


More information about the freebsd-current mailing list