============================================================================== FROMBIT, FROMBIT_R -- Binary File Generation Utilities ============================================================================== This utility takes a textual bit-dump (such as what 'tobit' and friends produce) and generates a binary file as its output. This can be useful for editing binary files with an ordinary text editor. Also, it can be useful for creating new binary files from scratch using a human-readable source format. Usage: frombit [input [output]] frombit_r [input [output]] Where 'input' is the input filename, and 'output' is the output filename. If the input filename is not specified, or is given as '-', then the input is taken from stdin. If the output filename is not specified, or is given as '-', then the output will go to stdout. The input format is quite simple. Frombit and frombit_r expect 1 digit binary numbers separated by zero or more characters of whitespace. All text to the right of a '#' is ignored. This can be useful for writing comments, or whatever. The astute reader will notice that the above rules allow 'frombit' to take the output from 'tobit' seamlessly. This is purposeful. Fromhex does not require rigid adherence to the 'tobit' output format though. The frombit_r utility differs from frombit in that bits are packed into each byte from right to left, rather than from left to right. Frombit will place the first bit into bit 7 of byte 0. Frombit_r will place the first bit in bit 0 of byte 0. Example: ## FONT FILE 00000001 # Slash character 00000010 # 00000100 # 00001000 # 00010000 # 00100000 # 01000000 # 10000000 # 00000000 # Heart character 01100110 # 11111111 # 11111111 # 01111110 # 00111100 # 00011000 # 00000000 # The above will generate a 16-byte file.