.Title SPINDN - Cause MSCP drive to spin down. ; This requires routines from CVLLIB (by Chester Wilson). ; tcrlf - types a ; w8t - types octal value (in r0) to the terminal ; w8pt - as per w8t, but in number of positions specified in r2 .macro type arg .save .psect mesage con $$$=. .ascii arg .restore mov r0,-(sp) mov #$$$,r0 emt ^o351 mov (sp)+,r0 .endm type sp.byp = 360 ;BYPASS Spfun op.avl = 10 ;opcode for AVAIL md.spd = 1 ;modifier for SPIN DOWN cr=15 lf=12 .mcall .sreset,.spfun,.csigen,.exit,.ttyou limit: .limit hlimit: 0 defext: .rad50 / / area: .blkw 7 ;Note both a response and a command buffer, contiguous, with the size in ; the first word (the second is the flag word). buffer: response: 60 0 .blkb 60 mesage: 60 0 p.crf: 0 0 p.unit: 0 0 p.opcd: op.avl p.mod: md.spd p.bcnt: 0 0 p.buff: .blkb 12 p.lbn: 0 start: .sreset .csigen limit+2,#defext,#0 mov r0,hlimit ; .spfun #area,#3,#sp.byp,#buffer,#0,#1,#0 ; (If use block number 1, and is spun down, it spins it up first!) .spfun #area,#3,#sp.byp,#buffer,#0,#0,#0 bcc ok movb @#52,r1 type <0>> mov r1,r0 call w8t call tcrlf clr r1 mov #response,r3 mov #8.,r2 10$: mov r1,r0 call w8pt .ttyou #11 mov (r3)+,r0 call w8pt call tcrlf inc r1 cmp r1,#10. blt 10$ call tcrlf ok: .exit .end start