I seem to remember using an assembler with the following interesting workflow: You'd write an assembly language file and assemble it. The output overwrote your source code by placing the executable code after the source code. You could run it as any other program. Then you'd load your program into an editor - you'd see your source code at the top and following your END statement there'd be arbitrary binary gibberish. You edit your assembly source, reassemble, and again: your single file would be replaced with a new file that had your assembly source at the front and the assembled binary at the end.

(Obviously there must have been a few bytes of binary gibberish at the front of the file too, after assembly, but I can't say I remember that.)

Can't remember if it was CP/M or DOS. Or 8080 or what. (I put both cp-m and dos tags on this Q.)

Ring a bell?

  • 2
    Interesting. Sure it could be started from regular command line without any helper? And sure it was an otherwise normal ASCII file, except for the added code? While it seems possible to hide additional code behind a closing CTRL-Z, I wouldn't know how the defautlt OS-loader could be made to ignore it. Under CP/M and DOS (COM) one would expect at least a jump around the source text (which in turn must be considerable smaller than 64 KiB), while DOS EXE-files require a binary header to do so. Either would rather collide with the source being unchanged at the start of the file.
    – Raffzahn
    Mar 12 at 1:35
  • 6
    The question I have is, why?. I'd run a mile from a language processor that thought it was ok to modify the source file while compiling/assembling it. Mar 12 at 4:41
  • 3
    @another-dave - I don't actually remember but I think the author probably considered it an advantage in the floppy disk era. The really low capacity floppy disk era. Or maybe it had to do with copying files about - you only needed one. It was certainly an outlier - I'm pretty sure the idea hasn't been picked up anywhere else!
    – davidbak
    Mar 12 at 5:24
  • 2
    "You'd write an assembly language file and assemble it" - What editor did you use to write the source code, and how did you assemble it? Can you remember any of the commands or procedures involved? Mar 12 at 17:08
  • 1
    Right. I can lay out code the way I want it, thanks very much. Sometimes I have to point out to younger programmers that fixing "bug X" does not necessitate running the entire file through their IDE's meaning-destruction module. Mar 18 at 19:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.