* Removes line numbers from a file by dropping * the first five characters from each line. * Syntax -- REMNUM filein,fileout * XEQ START COPY NPTDEFS START EQU $ MVI A,PSOP open file only LXI D,BUFF1 point to filename CALL PSCAN scan first parm JC ERROR JZ ERROR CPI ',' must be , JNZ ERROR MOV A,E CPI -1 file opened? JZ ERROR no STA FNBR1 save file number MVI A,PSCO create/open LXI D,BUFF2 CALL PSCAN scan second parameter JC ERROR JZ ERROR MOV A,E CPI -1 file opened JZ ERROR STA FNBR2 save file number * LOOP LDA FNBR1 delimited read LXI B,-1 LXI D,LINE point to buffer MVI L,13 read until CR CALL SYS DB DRDOP JMP RDERR error LXI B,-1 LDA FNBR2 delimited write LXI D,LINE+5 skip first 5 MVI L,13 stop on CR CALL SYS DB DWROP JMP RWERR error JMP LOOP * RDERR CPI EREOF eof? JNZ RWERR LDA FNBR2 CALL SYS write eof DB EOFOP JMP RWERR JMP ABORT done * CLOALL MVI A,-1 CALL SYS close all files DB CAOP JMP RWERR CALL SYS DB RETOP * ERROR MOV A,E get error number RWERR STA ERCODE MVI A,84H LXI H,BUFF1 CALL UTIL DB UXOP JMP ABORT DB -1 ERCODE DB -1 ABORT CALL CLOALL CALL SYS DB SREOP * BUFF1 DS 20 DB '.'+80H DW 380H DB 0 BUFF2 DS 20 FNBR1 DS 1 FNBR2 DS 1 LINE DS 1 *