Live data from Hacker News

Asm-declaration – Embed assembly language code within a C++ program (2017)

en.cppreference.com

51–53 of 53 posts

Re: Asm-declaration – Embed assembly language code within a C++ program (2017)

#51
post #48
post #39

Earlier quoted context omitted.

For such corner cases using MASM on day 1 until the new VC++ release isn't much of an issue.

MASM is just an assembler, with no awareness of the C or C++ code. MASM is unable to place arbitrary bytes into the middle of functions that are written in C or C++. To fix a problem like Spectre, and generally to solve unusual problems that the compiler vendor isn't dealing with, the full capability of an inline assembler is required.

Sure it can, I really don't see any difference between that and a naked call with LTO, beyond the convenience of saving about a minute not having to write a prototype for the function being called and adding MASM into the build.

Re: Asm-declaration – Embed assembly language code within a C++ program (2017)

#52
post #50
post #47

Earlier quoted context omitted.

I've actually picked this up as a hobby since a year ago or so. I grew up in the late 80's early 90's doing exactly this type of thing as a kid. Having worked as a professional dev for the past few decades I started to notice that I've been taking my work home for all that time, and even though I like my work, I felt I needed a hobby as I'm getting older. So, I'm currently making a shooting game for the 286/16 in mod…

Cool! Got a public repo of code? What toolchain are you using?

Sorry, no public repo, yet. Once I have something coherent working I will definitely publish it.

I'm using Watcom C v11. I actually bought this somewhere in the 90's. However, the Watcom tool chain is still being developed as Open Watcom. So, great for 32bit DOS:

https://github.com/open-watcom

Re: Asm-declaration – Embed assembly language code within a C++ program (2017)

#53
post #13
post #4

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?

This is a link to a reference page, not a news report.

> This is a link to a reference page, not a news report.

I don't know about you, but to me the name "Hacker News" implies what I read here is a news report, not a reference work of any sort.

Post reply on HN