Ah yes. And Borland Pascal. Mode X VGA hackery in unreal mode. Later, when I worked for a software store in high school, I acquired Borland C++ 3.1, the physically-largest and heaviest (27 lbs / 12.2 kg) retail software package that I know of. It was a small software shop, they gave us crazy discounts, vendors gave us NFRs and they let us borrow anything on the shelf (trusty-dusty shrinkwrap machine). The profiler, debugger, and assembler were also good as there were protected-mode variants that could sometimes keep the machine from crashing.
It's a thing literal as it is literally dumped straight into the generated .s file by the compiler, as most C compilers don't do the actual assembly or generation of object file.
Of course these days it's not literally dumped in unmodified -- various compilers do substitutions for you. But that's the legacy.
Odd bit of news reporting on something that was part of a standard published in 1997. What's next, breaking news on a standard 7-bit code used by Americans for information interchange?
I don't see anything on that page referencing C++20. Am I missing something?
On a related note, I always find the official docs for GCC inline assembly are insufficient for figuring out what I am trying to do. I nearly always have to resort to dumb trial and error. I was just recently planning to write some docs of my own on the subject. Not tutorial docs, but reference docs.
Trial and error is valuable, but if you go to github and search for "movq", "ld a,(hl)", or similar string you can often find examples of code that is presumably working.
I'm reminding myself of Z80 assembly at the moment, building a simple computer and I've done a bit of that.
On-Topic: Anything that good hackers would find interesting. That includes more than hacking and startups. If you had to reduce it to a sentence, the answer might be: anything that gratifies one's intellectual curiosity.
It's not technically a feature of the language, as it is not standardized and is compiler-specific.
But thing you are talking about indeed recurs here. The way I typically guess is that new generations of programmers are coming up all the time and may be unfamiliar with some old stuff. Or, maybe even some experienced people who never happened to touch c or c++ [there are more of those as time goes on].
I am not a kernel programmer, though, so I can't say whether it's being used in any capacity on modern, x64 systems or whether it's a compatibility mode for low-powered embedded architectures. Maybe someone more knowledgeable can chime in.
I wonder if that has anything to do with not having to then use escaped newlines and tabs. Without newlines, multiple instructions may fail to parse in the assembler, tabs are just for readability when printing asm rather than assembling.
I was a Forth dev a long time ago (on a planet far away...). Switching to & from assembly seemed as natural as breathing. Oh for the days of 16bit cores and minuscule register banks.
[+] [-] siempreme|6 years ago|reply
[+] [-] pjmlp|6 years ago|reply
PC compilers always followed that path.
The same in Turbo C would be:
[+] [-] snarfy|6 years ago|reply
[+] [-] dfeojm-zlib|6 years ago|reply
[+] [-] gumby|6 years ago|reply
It's a thing literal as it is literally dumped straight into the generated .s file by the compiler, as most C compilers don't do the actual assembly or generation of object file.
Of course these days it's not literally dumped in unmodified -- various compilers do substitutions for you. But that's the legacy.
[+] [-] childintime|6 years ago|reply
https://idea.popcount.org/2013-07-24-ir-is-better-than-assem...
[+] [-] clouddrover|6 years ago|reply
- Free Pascal: https://www.freepascal.org/docs-html/prog/progch3.html#progs...
- Delphi: http://docwiki.embarcadero.com/RADStudio/Rio/en/Inline_Assem...
You can even do assembly in batch files via Debug if you really want to:
https://thestarman.pcministry.com/asm/debug/debug2.htm
https://www.robvanderwoude.com/debug.php
[+] [-] tyingq|6 years ago|reply
[+] [-] mhh__|6 years ago|reply
[+] [-] bregma|6 years ago|reply
[+] [-] mikeash|6 years ago|reply
[+] [-] haberman|6 years ago|reply
On a related note, I always find the official docs for GCC inline assembly are insufficient for figuring out what I am trying to do. I nearly always have to resort to dumb trial and error. I was just recently planning to write some docs of my own on the subject. Not tutorial docs, but reference docs.
[+] [-] ____Sash---701_|6 years ago|reply
Quite a meaty document, should provide you with help for material on the subject.
[+] [-] stevekemp|6 years ago|reply
I'm reminding myself of Z80 assembly at the moment, building a simple computer and I've done a bit of that.
[+] [-] dvt|6 years ago|reply
The syntax looks like this:
[+] [-] basementcat|6 years ago|reply
https://stackoverflow.com/questions/48593734/calling-goto-on...
https://codegolf.stackexchange.com/questions/2203/tips-for-g...
This is not recommended for anything in production but is an amusing parlor trick.
Edit: Recent toolchains may require the -zexecstack flag to avoid a segfault.
[+] [-] mbel|6 years ago|reply
[+] [-] mikeash|6 years ago|reply
What to Submit
On-Topic: Anything that good hackers would find interesting. That includes more than hacking and startups. If you had to reduce it to a sentence, the answer might be: anything that gratifies one's intellectual curiosity.
[+] [-] asveikau|6 years ago|reply
But thing you are talking about indeed recurs here. The way I typically guess is that new generations of programmers are coming up all the time and may be unfamiliar with some old stuff. Or, maybe even some experienced people who never happened to touch c or c++ [there are more of those as time goes on].
[+] [-] AdmiralAsshat|6 years ago|reply
EDIT: I see several, just from doing a simple search against 'movq'
https://github.com/torvalds/linux/search?q=movq&unscoped_q=m...
I am not a kernel programmer, though, so I can't say whether it's being used in any capacity on modern, x64 systems or whether it's a compatibility mode for low-powered embedded architectures. Maybe someone more knowledgeable can chime in.
[+] [-] raviolo|6 years ago|reply
[+] [-] nurettin|6 years ago|reply
[+] [-] bla3|6 years ago|reply
[+] [-] ndesaulniers|6 years ago|reply
[+] [-] mud_dauber|6 years ago|reply
[+] [-] lawlessone|6 years ago|reply