*************************************************************** * * * Module Name: SETTRACK.LIB Rev. 1.00 * * Function: Set a given track Last rev. 06 May 85 * * number into the 1791 port By: glh/w6bsk * * * *************************************************************** trkreg equ 0e3fdh ; Morrow DJ2B track register settrk: mov c,a ; Enter with track # in acc sui 30h ; Force binary, if not already cpi 77 ; Test for legal range. maxtrk equ $-1 ; Set in proper max track #+1 jnc trkerr cpi 00h jc trkerr ; Negatives not allowed sta curtrk ; Make it current track call notbsy ; Make sure 1791 is idle lda curtrk sta trkreg ; and load track register adi 30h ; Make it ascii for possible sta asctrk ; use elsewhere. ret trkerr: call ccrlf call spmsg db ' Track number not acceptable.',0 xra a ; Set z flag ret curtrk db 1 ; CMDREG is part of SELCTDRV.LIB asctrk db 1