; GETBYT JSR LOCNXB ;LOCATE NEXT BYTE BCS EOFIN ;BR IF EOF LDA (ZPGFCB),Y ;BR IF EOF PHA ;SAVE IT JSR INCRRB ;INCR REC BYTE JSR INCSCB ;INCR SAVED BYTE PLA ;GET SAVED BYTE RTS ;RETURN ; JMP ERROR5 ;GO TO EOF RTN PAGE ; ; WSPBYT WRITE SPECIFIC BYTE – ; WSPBYT JSR LOCSEC ;GO LOCATE SECTOR ; ; WNXBYT WRITE NEXT BYTE – ; WNXBYT LDA CCBDAT ;GET THE BYTE JSR PUTBYT ;GO WRITE BYTE JMP GOODIO ;DONE ; ; WSPBLK WRITE NEXT BLOCK – ; WSPBLK JSR LOCSEC ;GO LOCATE SECTOR ; ; WNXBLK BLOCK – ; WNXBLK JSR MIBDA ;GO MOVE ADR TO ZPG AND DEC LDY #0 LDA (ZPGFCB),Y ;GET DATA BYTE JSR PUTBYT ;GO PUT IT JSR DTBLN ;GO DEC BLK LEN (NOT RTN IF = 0) JMP WNXBLK ; ; PUTBYT PUT OUT ONE BYTE – ; PUTBYT PHA ;SAVE DATA BYTE JSR LOCNXB ;GO LOCATE NEXT BYTE ; PB0 PLA ;GO SAVED BYTE STA (ZPGFCB),Y ;PUT THE BYTE LDA #$40 ;SET WRITE SECTOR REQD ORA DCBWRF STA DCBWRF ; JSR INCRRB ;INCR REL REC BYTE JMP INCSCB ;INCR SECTOR BYTE PAGE ; ; FLOCK LOCK A FILE – ; FUNLOCK LDA #$80 ;REMEMBER LOCK STA BNE
; GETBYT JSR LOCNXB ;LOCATE NEXT BYTE BCS EOFIN ;BR IF EOF LDA (ZPGFCB),Y ;BR IF EOF PHA ;SAVE IT JSR INCRRB ;INCR REC BYTE JSR INCSCB ;INCR SAVED BYTE PLA ;GET SAVED BYTE RTS ;RETURN ; JMP ERROR5 ;GO TO EOF RTN PAGE ; ; WSPBYT – WRITE SPECIFIC BYTE ; WSPBYT JSR LOCSEC ;GO LOCATE SECTOR ; ; WNXBYT – WRITE NEXT BYTE ; WNXBYT LDA CCBDAT ;GET THE BYTE JSR PUTBYT ;GO WRITE BYTE JMP GOODIO ;DONE ; ; WSPBLK – WRITE NEXT BLOCK ; WSPBLK JSR LOCSEC ;GO LOCATE SECTOR ; ; WNXBLK – BLOCK ; WNXBLK JSR MIBDA ;GO MOVE ADR TO ZPG AND DEC LDY #0 LDA (ZPGFCB),Y ;GET DATA BYTE JSR PUTBYT ;GO PUT IT JSR DTBLN ;GO DEC BLK LEN (NOT RTN IF = 0) JMP WNXBLK ; ; PUTBYT – PUT OUT ONE BYTE ; PUTBYT PHA ;SAVE DATA BYTE JSR LOCNXB ;GO LOCATE NEXT BYTE ; PB0 PLA ;GO SAVED BYTE STA (ZPGFCB),Y ;PUT THE BYTE LDA #$40 ;SET WRITE SECTOR REQD ORA DCBWRF STA DCBWRF ; JSR INCRRB ;INCR REL REC BYTE JMP INCSCB ;INCR SECTOR BYTE PAGE ; ; FLOCK – LOCK A FILE ; FUNLOCK LDA #$80 ;REMEMBER LOCK STA BNE
Apple_DOS_6Oct1978_retyped.docx