http://stingray.untergrund.net/ShadeBobs.s
That's my Shadebob routine from 1992, I've only changed/updated the startup code and "one filed" it :) It's heavily explained (seems I had way too much time back then :D), not optimized at all and could be done much better but should be easy enough to understand.