Skip to main content

Questions tagged [assembly]

Assembly language questions. Please tag the processor and/or the instruction set you are using, as well as the assembler, a valid set should be like this: ([assembly] [x86] [gnu-assembler] or [att]). Use the [.net-assembly] tag instead for .NET assemblies, [cil] for .NET assembly language, [wasm] for web assembly, and for Java bytecode, use the tag java-bytecode-asm instead.

0 votes
1 answer
32 views

When an embedded c program is created, why is there extra machine code around my compiled c program?

This C program blinks an LED attached to an AVR ATmega32u4. ISR(TIMER1_OVF_vect) // attach Interrupt Sub Routine to TIMER1 { // toggle LED PIND = (1 << PIND5); // #define PIND (*(...
-1 votes
0 answers
23 views

Difference between comiss and comisd in x64 asm

I wrote some code to compare the value of xmm10 and xmm6 using: comiss xmm10, xmm6 and then comisd xmm10, xmm6 The first one works, and the second one doesn't. I tried using subss xmm10, xmm6 followed ...
0 votes
0 answers
39 views

Why is my array value not equal to a literal?

I am new to assembly and was trying to work with an array. However, I was geting caught when try to compare the array value to a constant stored in a register. From the following code I was expecting ...
2 votes
0 answers
23 views

Printing 2D array in MIPS

I have been using a few other posts on here to try and figure out what I am doing wrong but I am stuck and could use some help. I am making a game that has an 8x8 "board" (2d array) similar ...
2 votes
1 answer
50 views

Why does the code show only some white lines when you compiled it?

.MODEL SMALL .STACK 100h .DATA COLUMNA DW ? FILA DW ? AVANCEH DW ? AVANCEV DW ? .CODE DETENER_POR_TIEMPO PROC MOV CX, 2000h MOV DX, 2000h MOV BX, 2000h NOP RET DETENER_POR_TIEMPO ...
0 votes
0 answers
49 views

How can I get this STDIN to work in GAS Assembler running on Linux?

I am new to Assembler and am currently reading a book about it by Jonathan Bartlett called 'Learn to Program with Assembly'. On pages 160-1 he gives the following sample program to demonstrate the use ...
-1 votes
1 answer
29 views

What is wrong with this control for the brightness of a lamp in ATmega328P?

I'm new to assembly and I'm trying to develop a control for the brightness of a lamp for my college. The lamp must have 5 distinct levels of brightness, one off and four levels with gradual increase. ...
3 votes
1 answer
225 views

Are there any negative side-effects to using -mmacosx-version-min and -segalign flags to reduce padding space in an executable?

I noticed that if I compile a C program with the gcc or clang command on macOS 10.15.7 the executable will be around 50 KB, no matter how simple the program. In older versions, the same program ...
1 vote
1 answer
88 views

multidimensional slice access performance in golang

I am working on a little and simple game-of-life in Golang and stumbled on a performance problem during slice access. This is the primary data structure for the game: type Neighbor struct { X, Y ...
1 vote
1 answer
47 views

data segment of AVR store nonsense after compiling

So i'm trying to change the first element of an array that i'm storing in sram and i checked if the data after compile is equal to the value of pre-initialaztion and it wasn't equal. so this my code: ....
0 votes
1 answer
38 views

CMake does not compile asm-files (cross-compile)

We set up our build system with CMake and besides C and C++-files we need to compile asm-files (.s). We use a tiarmclang-compiler (LTS3.2.0) and thus need to crosscompile. While everything works for C ...
0 votes
1 answer
58 views

Converting ARM assembly to RISC-V assembly

I am trying to rewrite this code. It works perfectly for ARM assembly, but I am trying to rewrite it in RISC-V assembly. Here is the ARM code: .text .global main .equ ADD1, 0x40000000 .set ADD2, ...
0 votes
0 answers
43 views

signal SIGSEGV: address access protected in __run_exit_handlers

I'm trying to do a packer project for my school, it is made in C and ASM, and for the moment it is supposed to target only ELF files. I have managed to do my section injection, correctly align my new ...
-1 votes
0 answers
53 views

Why does gdb combine byte values when examining memory as words? [closed]

While examining 4 addresses from $rip as bytes in GDB, it shows 4 individual values. However, when I examine the same addresses as words, it combines that 4 byte values into a single word value. Why ...
0 votes
1 answer
114 views

Unable to find 'Software1.dll;Software2.dll' to be lazy loaded later. Confirm that project or package references are included and the reference is u

In a webassembly project I created two Razor Class Libraries Software1 and Software2 and added a reference to both in the main client app. I also added these to my client's Project file: <ItemGroup&...

15 30 50 per page
1
2 3 4 5
2976