Category : assembly

Today I have found sample code which slowed down by 50%, after adding some unrelated code. After debugging I have figured out the problem was in the loop alignment. Depending of the loop code placement there is different execution time e.g.: Address Time[us] 00007FF780A01270 980us 00007FF7750B1280 1500us 00007FF7750B1290 986us 00007FF7750B12A0 1500us I didn’t expect previously ..

Read more

My task is to make assembly realization and c++ realization and compare their results: "Find the sum of cubes of all positive elements of the array A={a[i]}, satisfying the condition: a[i] >= b." When number of elements is greater than 0, the problem occurs: EXC_BAD_ACCESS in __asm part. LLDB stops in this place: -> 0x7fff20355621 ..

Read more

The page https://software.intel.com/content/www/us/en/develop/blogs/haswell-new-instruction-descriptions-now-available.html mentions BLSR instruction that can efficiently clear the least significant bit set. Is there an efficient equivalent of such instruction for clearing the most significant bit? For example 001001010101000 should be turned to 000001010101000. Is it possible (and how) to implement it in C++ more efficiently than just with a bit shifts? ..

Read more

I’m currently trying to make a basic compiler on Windows using C++. And I was thinking about how to turn assembly into machine code or an exe file. If this were to be downloaded by another computer I think it wouldn’t work without having to attach an assembler and linker with it, like nasm and ..

Read more

Помогите найти книгу Пирогов Ассемблер на примерах / Пирогов, Владислав. – М.: СПб: БХВ, вот ссылка как выглядет и детали книги: https://www.books.ru/books/assembler-na-primerakh-336840/ Source: Windows..

Read more