4 ms·
Consider a minimal install of linux/unix with no C compiler and no binutils. Editing text. Construct an ed-like editor in shell - the first character/token of
by cturner 3y ago
Consider a minimal install of linux/unix with no C compiler and no binutils.
Editing text. Construct an ed-like editor in shell - the first character/token of each input line is a command. You could use awk or shell for this.
Creating binary files. If you have gnu coreutils, it has a powerful echo option to output bytes. If you have posix/busybox/toybox, use od(1), head and tail to extract a library of 1-byte files from existing binaries. Cat these together to create multibyte binaries.
Assembler and linker. You don't need to use conventional notation. Create an assembly syntax around the same first-token-is-command approach used for the text editor. Implement an assembler that reads that notation and outputs binary. You would need to create elf headers. You would need to map system calls.