.TITLE UUDX uuencode RX01 floppy .IDENT /01/ .LIST ME .ENABL REG ; ; UUDX dumps the contents of a RX01 floppy in uuencoded form. ; It is supposed to run standalone, without the assistance of an operating ; system. ; Note that the name of the uu-decoded file is fixed to "diskimage.img". ; ; 15-JUL-2004 H. Rosenfeld ; .GLOBL UUENC .GLOBL PRINT .GLOBL DXREAD .MACRO .PRINT STR MOV STR,R0 JSR PC,PRINT .ENDM .MACRO .READW IOBLK,CHAN,BUF,SIZ,BLKNO MOV CHAN,R0 MOV BLKNO,R1 MOV BUF,R2 JSR PC,DXREAD .ENDM START: RESET MOV #1000,SP CLR BLKNO .PRINT #BEGIN READ: .READW #IOBLK,#0,#BUFFER,#100,BLKNO BCC BLOCK .PRINT #END HALT BLOCK: MOV #BUFFER,R1 MOV #LINBUF,R2 MOV #2,R3 ; 2 full lines per block LINE: MOV #55,R0 ; 55(8) bytes per encoded line JSR PC,UUENC .PRINT #LINBUF SOB R3,LINE MOV #46,R0 JSR PC,UUENC .PRINT #LINBUF INC BLKNO BR READ .PSECT DATA BEGIN: .BYTE 15,12 .ASCIZ /begin 644 diskimage.img/ END: .BYTE '`,15,12 .ASCIZ /end/ .EVEN LINBUF: .BLKW 40 BUFFER: .BLKW 100 BLKNO: .BLKW 1 .END START