| * Convert a data file into a .S file suitable for assembly. |
| * This reads from stdin and writes to stdout and takes a single |
| * argument for the name of the symbol in the assembly file. |
| int main(int argc, char *argv[]) { |
| * The mid-2007 version of gcc that ships with Macs requires a\n\ |
| * comma on the .section line, but the rest of the world thinks\n\ |
| * that's a syntax error. It also wants globals to be explicitly\n\ |
| * prefixed with \"_\" as opposed to modern gccs that do the\n\ |
| ", name, name, name, name); |
| amt = fread(buf, 1, sizeof(buf), stdin); |
| for (i = 0; i < amt; i++) { |
| printf((col == 0) ? ".byte %3d" : ",%3d", buf[i]); |