Remix.run Logo
JeremyHerrman 15 hours ago

I'm interested in how these old IDEs were used during the transition from assembly to high level languages. It seems especially topical given the LLM integration into today's IDEs.

Back then was it common to have a split or interleaved view of high level and assembly at the same time?

I'm aware that you could do something like the following, but did IDEs help visualize in a unified UI?:

    $ cc -S program.c
    $ cat program.s    # look at the assembly
    $ vi program.c     # edit the C code

A quick search shows that Borland Turbo C (1987) had in-line assembly:

    myfunc ()
    {
        int i;
        int x;
        if (i > 0)
            asm mov x,4
        else
            i = 7;
    }

From the 1987 Borland Turbo C User's Guide [0] "This construct is a valid C if statement. Note that no semicolon was needed after the mov x, 4 instruction. asm statements are the only statements in C which depend upon the occurrence of a newline. OK, so this is not in keeping with the rest of the C language, but this is the convention adopted by several UNIX-based compilers."

[0]: http://bitsavers.informatik.uni-stuttgart.de/pdf/borland/tur...

cameldrv 14 hours ago | parent | next [-]

The Turbo Pascal version of this was even better, because you could do a whole block of asm instead of just a single line at a time. As I remember there were annoying limitations in the C version around labels and such. It was incredibly useful when writing performance oriented code at that time because it was very easy to write code that would outperform the compiler.

badsectoracula 11 hours ago | parent [-]

I'm pretty sure you could do asm blocks in Turbo C using brackets, e.g. asm { ... }, though it might have been a Turbo C++ thing (i never really used plain TC much).

miohtama 14 hours ago | parent | prev | next [-]

It was not very common to interleave assembly in MS-DOS IDEs. Assembler and its IDE were separate tools you paid for. But not unheard of.

You could "dump" your OBJ file for assembly.

Later C compilers got some better inline assembler support but this was towards the 32-bit era already.

Also Borland had its own compiler, linker and such as separate binaries you could run with a Makefile but you really never had to, as why would you when you can do that in the IDE in a single keypress.

int_19h 6 hours ago | parent [-]

It was quite common actually, most DOS C compilers supported asm{} blocks and Turbo Pascal also supported inline assembly. Paid assemblers like MASM were high-end tools.

On Unix though it was more common to have .s files separately.

qingcharles 13 hours ago | parent | prev [-]

I was writing game engines in Turbo C and assembler in 1988. I don't remember using inline assembler until the 90s. I just had all the graphics routines in a separate .asm file which was part of the build process and then linked in.