7 ms·
Whenever I mention that I don't use compilers I tend to get strange looks from people who cannot imagine writing assembly with using a C or Fortran compiler. An
by __michaelg 11y ago
Whenever I mention that I don't use compilers I tend to get strange looks from people who cannot imagine writing assembly with using a C or Fortran compiler. And so I have to defend my choice and explain why, over and over. Some people will understand, most won't. Or they don't want to. But here is an attempt to explain my reasoning.
[...]
A list of reasons then:
* I don't feel the "problems" compilers intend to solve are serious enough to warrant the cost, i.e. to me the solution is worse than the problem.
* I want absolute control of my instructions, which means I want to work hands on with it, and see exactly what will be executed by the CPU (well, before it's translated into its binary form, of course.) If that means seeing the same setup of stack frames and the manual register allocation over and over again, so be it. To me, WET assembly is much more understandable and maintainable than DRY C.
* I don't want to learn and depend on a non-CPU-vendor syntax for my programs, making it require compilation before CPUs can understand it. Neither do I want my colleagues to have to.
[...]
- smoyer 11y agoI'm always shocked when I run into people who use an assembler instead of interacting directly with their target hardware. If you're dedicated to your craft, you memorize the associated byte-code and enter that directly into the computer's memory. With practice, the machine will crash with less than 50% of your changes. On a more serious note, the first computer I ever touched had six thumbwheels that were used to enter a memory address (4) and the associated byte to be placed at that location (2). The first computer I ever built/owned was a COSMAC ELF [1]. It (originally) had 8 toggle switches that could be used to enter the address and data (serially). In both cases, you still wrote assembly (on paper) and used a translation table to look up the associated byte-codes which you transcribed to the paper. Finally you actually entered it via the system's input. [1] http://www.cosmacelf.com/ http://www.cosmacelf.com/
- amelius 11y agoWhy even rely on the machine instruction decoder implemented in your microprocessor? I prefer to hook up ALUs and flipflops manually...
- 50CNT 11y agoThat's a lot of work though, I just let the verilog compiler handle that.
- marssaxman 11y agoThere was a span of a year or two when I could literally write 68000 machine code by hand, without needing an assembler, due to an obsession with sprite blitters culminating in a bit of code which would generate arbitrary custom blitmask functions as part of the image-loading process. I had very little understanding of "abstraction" at the time, so it pretty much just built instructions from the bits up via shift and mask operations. I would never do anything like that now[1] - but I'll always be proud of the day I dropped into Macsbug, picked out a section of memory, wrote myself a minimal Tetris implementation, moved the PC (aka IP register) into it, and played. It crashed, of course, but the fact that it even sort of worked felt pretty good. 1 - possibly not strictly true in the literal sense as I still have a soft spot for these sorts of hacks