Quantcast
Channel: Active questions tagged assembly - Stack Overflow
Browsing all 684 articles
Browse latest View live

Linking error [undefined reference to `asm_main()'] in linking Assembly to C

My exact issue is that am trying to get the linked final exe from 3 files namely:The main c loaderThe main asm fileThe accessory asm file that holds the functions.I manage to convert them all...

View Article



Confusion regarding CS and DS segment registers during bootloading process

I've been learning about OS development by following the MIT course with JOS.Right now, I'm digging into how bootloaders work and the details of x86 computer architecture, especially memory...

View Article

How to do a sorting algorithm

My teacher gave us an assignment to write source code that sorts numbers.The code is supposed to be made out of 2 procedures.Procedure 1 (Minimum) receives the address of the first element in a list...

View Article

v3 ) called from C#">"Simple" Vector SIMD operations in Assembly ( v1 + v2 -> v3 ) called from C#

I am having thought time performing - i believe - simple operation in Assembly, its required for me to use SIMD operation in Assembly for my Uni project.I have Windows Forms Application in which i...

View Article

Differences in .s assembly between GCC and mingw: How to compile QBE output...

I want to use QBE (a simple compiler backend) which I have compiled for windows.To try it out I wanted to compile the example file hello.ssa:function w $add(w %a, w %b) { # Define a function add@start...

View Article


how to fix "program.exe has stopped working" after run a C++ code

I'm trying to learn some new things about C++, such as WinAPI.So basically, I found a problem when I was trying to run this code:#include <iostream>#include <string.h>#include...

View Article

Create an iso from a .bin file

I created many assembly programs with nasm and I always tested them with qemu (system-x86_64). I would like to create a bootable disk image that I can burn on an USB stick and plug it in my second...

View Article

MIPS Assembly Language invalid program counter value error

Please help, I get this error all the time and have been able to 'mysteriously' fix the issue. However i'm continuously getting this error:Go: running mips1.asmError in : invalid program counter value:...

View Article


My asm in MASM is not working, what is the problem? [closed]

When I run my code, the two math problems do not compute. I do not know if this is an error in my code or something else.#include <iostream> #include <iomanip> #include <ctime>...

View Article


Image may be NSFW.
Clik here to view.

OllyDbg not properly interpreting SSE2 instructions and operands

Note: using OllyDbg v1.1I'm attempting to reverse engineer a subroutine in a program that likely employs some sort of techniques to frustrate the process beyond the basic 'IsDebuggerPresent'.I have the...

View Article

How does the label in an ADRP instruction work in arm64?

Im trying to figure out how ADRP works. I have this line of code:0x100595c74 <+0>: adrp x17, 13159My initial understanding of ADRP is that the program adds 0x100595c74 with an integer 13159 then...

View Article

x86-64 Linux "No such file" error in asm program where file exists [duplicate]

I'm writing a basic asm todo application and I'm running into issues with the open syscall. The call returns -2 in rax, the "No such file or directory" errno, despite the fact that the file exists. At...

View Article

Memory Leak caused by Roslyn, how do I contain it?

So I have this NET6.0 console application that acts as a sort of bridge between other apps for UDP messages.To define how to send data out of my application have this profile system that consists in a...

View Article


Why this generate a line of 3 pixels (One red, one green and one blue)...

Ok I have made good progress with the translation because now I can see pixels appear on the bitmap however what I don't understand is where the error is I have rechecked several times and I think I...

View Article

ARM Cortex M0+ unexplained Hard Fault exception

I'm working with the Rasberry PI Pico RP2040 with ARM Cortex M0+.Writing some assembler glue code for some c-code.I'm getting an unexplained Hard Fault exception when trying to push a few registers on...

View Article


Does the assembler choose where a program object file is stored in memory?

My textbook (Computer Organization by Hamacher et al.) says the following:The loader transfers the object program from the disk into a specified place in the memory. It must know the length of the...

View Article

What's the relation between ss:sp and extended BIOS(int 0x13, ah = 0x42)?

If I don't initialized the the ss and sp or initialize correctly(for example ss:sp = 0xA000:0x0000), the code as below picture will not jump correctly.boot sectorI want to copy 244 sectors from disk to...

View Article


How does in assembly does assigning negative number to an unsigned int work?

I Learned About 2's Complement and unsigned and signed int. So I Decided to test my knowledge , as far as i know that a negative number is stored in 2's complement way so that addition and subtraction...

View Article

taking inputs which are larger than 8 bit from keyboard on 8051...

I need to get an input from a keyboard by using port 0 or port 1 on microcontroller 8051 in assemly language. However input interval is [1,366] so one register is not enough. I couldnt find a way to...

View Article

Ensuring unbiased number generation within a range using RDRAND instruction

Working on a code golf challenge which requires using the RDRAND hardware random number generator.ExamplesSet r12 to a random number [0,255]rdrand axmovzx r12,alSet r8 to a random number [0,1]rdrand...

View Article
Browsing all 684 articles
Browse latest View live




Latest Images