W
W
WYBM2020-12-12 18:00:12
C++ / C#
WYBM, 2020-12-12 18:00:12

Can you help with assembler insertion in c++?

I got an old teacher who decided that we really need to do exercises with an assembler insert.
In the task, you need the insert to calculate the equation, but I don’t understand how to even set it
n = (q^2)/3 - a*d +5
with ++ code, I will insert it, and I will be grateful if you help me with the assembler insert

#include <iostream> 
#include <math.h> 
using namespace std; 
 
int main() { 
    short q = 9, a = 5, d = -3, b, temp; 
    __asm 
    { 
        //n = (q^2)/3 - a*d +5        
Ассемблерная вставка
    } 
    cout << "n = (q^2)/3 - a*d +5 = " << b << "\n\n"; 
}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Kuts, 2020-12-12
@fox_12

Close question . There I also gave the code with an example.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question