Sector Editor for the Commodore 128 is a straight forward, no frills track & sector editor written 100% in BASIC, so if you want some sample code, here's a good place to look.
Data
Download