Debugging Segmentation Fault in Loop for String Comparison and Compression in x86 Assembly
#include <string> #include <vector> using namespace std; int Min(int A, int B) { return A < B ? A : B; } int solution(string s) { int answer = s.length(); for (int Len = 1; Len <= s.length() / 2; Len++) { string Result = “”; string Temp = s.substr(0, Len); int Cnt = 1; […]
I am attempting to print out a list of prime numbers, but nothing is printing out, what is wrong / what could I change in my code?
I have written an assembly program where my goal is to print out prime numbers the amount of times that the user enters. The user only has to enter one number, say, 15, and the first 15 prime numbers will be printed. The range the user can enter in is between 1 and 200.
Assembler code which calculates scalar product of vectors
I’m new with assembler and trying to get how it works, i’ve got task to write a DotProduct function that calculates the scalar product of two
vectors of signed 16-bit integers (of the short int type). Vectors can be set as static
or dynamic arrays of the same length. The result of the function is a 32-bit
signed integer (type long). The function has the following header:
I can’t figure it out :( “Frame not in module. The current stack frame was not found in a loaded module. Source cannot be shown for this location.”
I just wrote this program in assembly (IA-32, MASM) and I am struggling to fix the issue that I am facing. The program compiles and I can enter my name and one singular value, then the program crashes and says “Frame not in module. The current stack frame was not found in a loaded module. Source cannot be shown for this location”. It also says “Exception thrown at 0x0019FFDC in Project.exe: 0xC0000005: Access violation executing location 0x0019FFDC” as the error. I have tried everything I can think of but I have no idea what to do.
I am wondering why my MASM (IA-32) program will not let me enter a name
I am trying to get a string from the user that I can store as a name and print back later, but for some reason whenever I run my program, it skips past any opportunity to enter a name and just prints out the next line, I am new to assembly and I am not sure what I am doing wrong.
How would I make a do while loop in IA-32 assembly language?
I am trying to write a program in IA-32 that continuously asks a user for numbers, and once the number that they enter is above 0, the loop terminates.
Is it possible to swap the most significant bit and the least significant bit of a register in x86 assembly without using conditional jumps?
Here is how it is done in PicoBlaze assembly:
I am new to assembly language and am curious why my program is not working how I want
I am a student and need help learning assembly language. I simply want to print out 3 the values that I entered to the console. The goal of the program is to get 3 positive integers, A, B and C, in descending order from the console. When I run the program and enter 20 for the first value, 10 for the second value, and 5 for the third value, the expectation is that those values will each be printed out. However, 20 is the only value that seems to be printed out.