News for hackers. Stuff that matters.
Re:AT&T Syntax versus Intel Syntax by WalterBright on Monday November 14, 2022 @12:41AM (#33590530)
In grade school, they showed us a movie where researchers attached special glasses to a volunteer, and the volunteer had to wear them 24/7 or a mask for sleeping. The glasses turned everything upside down.

After a few days, suddenly everything was right side up for the volunteer. Until he took the glasses off ...

The movie ended with a warning to never try this yourself.

Anyhow, I'm reminded of that movie every time I have to switch between AT&T vs Intel syntax. My brain just hurts, and the asm code I write is all wrong.

So, the dmd D compiler's inline assembler syntax is Intel regardless of the OS, and the builtin disassembler is Intel syntax.

Re:AT&T Syntax versus Intel Syntax by pjmlp on Monday November 14, 2022 @02:34AM (#33591152)
I love that dmd follows the home computer school of having inline Assembly done properly, instead of mini-languages stuffed inside strings.
Re:AT&T Syntax versus Intel Syntax by B1FF_PSUVM on Monday November 14, 2022 @05:46AM (#33592327)
> glasses turned everything upside down

https://www.madsci.org/posts/archives/mar97/858984531.Ns.r.h...

"""

[...] first investigated by George Stratton in the 1890 s

[...] he ran another experiment where he wore it for eight days in a row. On the fourth day, things seemed to be upright rather than inverted. On the fifth day, he was able to walk around his house fairly normally but he found that if he looked at objects very carefully, they again seemed to be inverted. On the whole, Stratton reported that his environment never really felt normal especially his body parts, although it was difficult to describe exactly how he felt. He also found that after removing the reversing lenses, it took several hours for his vision to return to normal.

[...]

"""

Re:AT&T Syntax versus Intel Syntax by WalterBright on Monday November 14, 2022 @02:33PM (#33599648)
Thanks for the references. I saw the black&white film around 1967.
Re:AT&T Syntax versus Intel Syntax by B1FF_PSUVM on Monday November 14, 2022 @07:55PM (#33603740)
You're welcome. I had heard the story before, but couldn't remember the attributed date, got curious and looked it up.