News for hackers. Stuff that matters.
Re:Modern C [pdf] by vram22 on Monday November 28, 2016 @11:25AM (#13056398)
Interesting. Though I used Turbo Pascal quite a lot earlier, I either don't remember that feature (being able to mix in assembly) or may have known of it then but forgotten it later. Getting a vague recollection - was it something like a function call of sorts (syntax-wise)? Start with a $something, then open parens, then some assembly statements, then close parens)?

If that was the way it was done in TP, the BBC micro (which was mentioned quite a bit in the recent HN thread about BASICs on personal computers of earlier years), also had a similar feature. I did use that one a bit. You had to open a square bracket in the middle of your BASIC program (though probably not in the middle of a BASIC statement), write your assembly code (6502 instruction set), and then close the square bracket, IIRC.

D (language) these days also has the ability to mix in assembly, though I haven't tried it yet.

Edited for typos and wording.

Re:Modern C [pdf] by pjmlp on Monday November 28, 2016 @12:10PM (#13056766)
In TP you could use inline Assembly in several ways.

It could be just a block, a complete procedure/function with or without prolog.

Also it was quite comfortable to write, just as a plain macro Assembler with Intel syntax, not those asm functions with strange syntax used in gcc/clang.