;; INCLUDE USEFUL.INC INCLUDE DOS.INC ; INCLUDE PCMAC.INC .MODEL SMALL .STACK 100h .DATA Prmpt DB "Filename: $" FileA DB 30 dup (0) FileAH DW ? FileB DB "~~TEMP~~.TMP",0 FileBH DW ? Dat DB ? .CODE Main PROC EXTRN PutDec : NEAR, PutHex : NEAR mov ax, @data mov ds, ax ;@Read ofset, bytes, handle, segmnt ;@Write ofset, bytes, handle, segmnt ;@MakeFile path, atrib, segmnt, kind ;@OpenFile path, access, segmnt ;@CloseFile handle ;@DelFile path, segmnt ;@MoveFile old, new, segold, segnew @ShowStr Prmpt @Read FileA, 30 @ShowChar 13,10 mov bx, OFFSET FileA FixFileA: mov ah, [bx] cmp ah, 13 je FileAFix inc bx jmp FixFileA FileAFix: ; mov [bx], 0 @ShowChar 13, 10 @OpenFile FileA, 0 mov FileAH, ax call PutDec @OpenFile FileB, 1 mov FileBH, ax call PutDec ;DoUntilEOF: ; @Read Done: mov al, 0 ; Return code of 0 mov ah, 4ch ; Exit back to MS/PCDOS int 21h Main ENDP END Main