The disk doesn't know or care who's giving it instructions: BASIC or machine language. All you really need to do is to send to the disk (or receive from disk) exactly the same information that BASIC would send. Some commands go to the command channel (secondary address 15) and some to the data channel, so you'll need to keep things sorted out and know the command channel formats.