! ! ! Teco macro to convert ASCII text into octal binary bytes. ! ! Instructions: ! ! >tec ! ! *ervtl.pad$$ ! ! *eipad$$ ! ! Wake up, finished ... ! ! *ewvtlpad.mac$$ ! ! *ex$$ ! ! > ! ! ! ^o 0j ! Set radix to octal. ! 16ua ! Initialize the bytes per line counter. ! 0j ! Position to the start of the buffer. ! @i/PAD::/ ! Insert the global label. ! < ! Put up to 17 bytes per line. ! %a ! Adjust the bytes per line counter. ! qa-17"e ! If EQ, reached limit (break the line). ! @i/ .BYTE / 0ua ! Reinitialize the bytes per line counter. ! | @i/,/ ! Else, insert the byte delimiter. ! ' ! Do the end of buffer / end of file processing. ! .-z"e "t !eof! -1a-^^,"e -d ' @i/ .BYTE 0 .EVEN .END / ! Remove CR/LF following cursor positioning for keys. ! j @s/50,102/ <@:fs/15,12//; 0a-^^,"e d | -1a-^^,"e -d ' ' > zj 0; ! Exit, we are all done. ! | 1:a ! Read the next record. ! .-z"e ! If nothing was read, presume end of file. ! @o!eof! ' ' ' 0a\d ! Insert octal ASCII and then delete original. ! > @^A%Wake up, finished ... %