Those could be a nice start point, directly from Melabs website
http://melabs.com/resources/samples.htm

spimast.bas
http://melabs.com/resources/samples/pbp/spimast.bas

spislave.bas
http://melabs.com/resources/samples/pbp/spislave.bas

Still possible to use a software version instead of the internal hadware, do a search here for ****FTIN/SHIFTOUT, or for your specific device.

HTH