Most voted "assembly" questions
DO NOT use this tag to mark over . Net’s Assembly which has its own tag. Assembly Language (ASM) is a family of very low-level programming languages, just above machine code. Also specify a tag with the processor or instruction set your question is related, as well as the Assembler you are using.
Learn more…160 questions
Sort by count of
-
2
votes1
answer319
viewsHow to make a simple Hello World using C conventions?
Knowing a little of the conventions in C and the generalization of code that it can provide us, I tried to implement my "Hello World": global main extern printf section .data helloworld db 'Hello…
-
2
votes1
answer184
viewsProgram crashes after stack allocation and call in C
I’m trying to make a simple program: allocate on the stack an integer, calls scanf from the C library and print it on the screen. I’ve done the same Disassembly in C, and I try to reimplement it,…
-
2
votes1
answer362
viewsDeviation error in Assembly (MIPS)
I need to transform the following c code to MIPS Assembly: int i; int vetor[8]; for(i=0; i<8; i++) { if(i%2==0) vetor[i] = i * 2; else vetor[i] = vetor[i] + vetor[i-1]; } By doing this I arrived…
-
2
votes1
answer90
viewsAssembly error A2119
I’m a beginner in Assembly and I’m now trying to run my first program Hello World. Using Windows 7 and MASM. I am following a tutorial the source of the program until the following: .386 model falt,…
-
2
votes1
answer207
viewsnasm: error: more than one input file specified
I am trying to compile a nasm file but it is returning the following error: " nasm: error: more than one input file specified ". What is the error? boot.asm: BITS 16 ; The mode we are running in…
-
2
votes1
answer610
viewsHow to handle the FPU stack in the x86 Assembly using NASM and functions in c?
I’m trying to do this operation (y = 0.299*red + 0.587*green + 0.114*blue) in Assembly mode protected nasm integrating c with Assembly in windows, but regardless of the input values the result is…
-
2
votes0
answers117
viewsAssembly Mips: Runtime Exception at 0x004000ac: store address not Aligned on word Boundary 0x1001040e
In this code, I am having trouble using the sw command. Always an error appears as follows: Runtime Exception at 0x004000ac: store address not Aligned on word Boundary 0x1001040e Honestly, I’m…
-
2
votes1
answer2495
viewsBubble Sort in Assembly (MIPS)
My teacher asked us to implement Bubble Sort in the MARS environment but I’m not getting it. There is some error in the code. Can anyone find the error? The way out should be {1, 2, 3, 4, 5, 6, 7,…
-
2
votes0
answers192
viewsSegmentation Fault in Assembly
I’m new to Assembly and I’m having a little problem here in a college problem. section .data SYS_EXIT_PROGRAM equ 1 SYS_STANDARD_OUTPUT equ 1 SYS_STANDARD_INPUT equ 2 SYS_READ_FILE equ 3…
-
2
votes1
answer70
viewsThe entry point of a executable is the memory address of the main function?
hello. c #include <stdio.h> void main(void){ // << entry point printf("Hello World!"); } hello asm global _main extern _printf section .text _main: ; << entry point push message…
-
2
votes1
answer195
viewsIs it possible to store files in an executable?
I need to store a file, no matter its extension (it’s mainly an Executable) within another executable. It’s just, I’m compiling with Codedom an executable that inside it there is a file "special"…
-
2
votes1
answer5984
viewsConvert C code to Assembly MIPS?
How can I generate the assembly code corresponding to the code below: #include <stdio.h> #define LINHA 4 #define COLUNA 5 int tab [LINHA][COLUNA] = { 2016,2012,2008,2004,2000,…
-
2
votes2
answers164
viewsIs it worth using Assembly, C and C++ in the same program?
To optimize and make the program faster, it would be useful or necessary for me to do everything I can in Assembly, what I can not do Assembly, I do in C, and what I can not do in C++? References:…
-
2
votes0
answers55
viewsHow to detect interruptions of arrows in x86 Assembly?
I am doubtful how to recognize a command of arrows in the program in Assembly x86. For example call the proc and when clicking the right arrow, send a reply you used right arrow... If anyone knows…
-
2
votes1
answer41
viewsRegister state in Calling covention
In the Calling Convention of ABI, the starting prologue of a new stack makes, by default, a push EBP. So far so good, but why do mov EBP, ESP if ESP is already "pointing" to the top, which - in this…
-
2
votes1
answer125
viewsWhat are Assembly Languages (assembly language)?
I was researching which languages are used to build operating systems. It appears that Windows, Mac and Linux use, to a large extent, C and C++. In the same source I found this information, I read…
-
2
votes1
answer92
viewsWhat is Syriac Language in the Assembly Context
Performing a list of Computer Organization I came across the following question: Rewrite programs written in assembly language (Assembly) in the previous exercise for symbolic language. Consider…
assemblyasked 5 years, 7 months ago Luis Souza 640 -
2
votes0
answers86
views -
2
votes2
answers62
viewsVolatile and optimization
I’m studying about the type qualifier volatile in C language, and I took a test. In the attached image we have the comparison of two programs written in C. The one on the left has a variable without…
-
2
votes0
answers37
viewslist, delete, or insert, select array in mips
I have some questions about an academic paper in which the teacher asks to list, delete, insert and select matrices. If someone could explain to me how to do thank you, follows down the slides of…
-
1
votes1
answer64
viewsSpecific element in an Assembly array in AVR
In the following paragraph: ldi r16,255 out IO(DDRB),r16 ldi r30,1 subi r30,lo8(-(array)) sbci r31,hi8(-(array)) ld r24,Z out IO(PORTB),r24 Why is there a -(array) within both lo8 and Hi8 ? And why…
-
1
votes0
answers473
viewsInsert values from 0 to 15 on the keyboard in Assembly fasm x86
Good. I have to do a program on Assembly that reads a number from the keyboard that is to choose a color in video mode. From 0 to 9 I know that’s so: mov ah, 40h ;Pedir um valor mov bx, 1 mov cx, 44…
-
1
votes0
answers144
viewsFASM / emu8086 - Generate 32bit/64bit executable
Hello, I would like to know how to use FASM to generate an executable . exe running in 32bit or 64bit. It turns out that when generating . exe, it does not run on Windows 7 because it is…
-
1
votes1
answer58
viewsIs it possible to include Allegro in a C kernel?
I have been studying for some time the construction of Operating Systems with bootloader in Assembly and kernel in C, and recently I started studying Allegro. Theoretically it is possible to include…
-
1
votes2
answers181
viewsCompiling C for raw binary
How to compile a C code for low level? (.bin, example). I’m using IDE Code::Blocks, and the mingw compiler (I’m on Windows, but if you know for Linux the commands are almost identical).…
-
1
votes1
answer361
viewsHow to avoid buffer overflow in simple Assembly (nasm) application?
I’m trying to avoid writing off the application due to the excess buffer, but I don’t know how. The application is simple: it shows a message that asks the user to type something, then takes this…
-
1
votes2
answers1876
viewsHow to get the serial number or ID of a USB stick on the MS-DOS system?
I have tried using some tools to get hardware information on DOS, but they did not have the source code for free use. I need a code solution that returns the serial number or ID in the MS-DOS…
-
1
votes0
answers104
viewsAssembly code problem for Linux 64
I created a code for GNU Asssembly 64-bit Linux very simple and it works. Only after strip it stops working. What may be occurring? Beginning of the code .section .rodata clear: .ascii "\033c\0"…
-
1
votes1
answer2118
viewsWhile Loop in Assembly MIPS
Good morning guys, I’m new to Assembly and I’m in need of a little help if possible. I need to translate the following code to Assembly: // Sendo i,total e n os registradors $s1, $s2, $s3 i=0;…
-
1
votes0
answers59
viewsDoubt if my Assembly code is right
Good evening, I’m starting to study Assembly and I have doubts about the exercise I’m solving. The first I’m trying to create a section of uninitialized variables, and the initialized ones and make…
-
1
votes0
answers62
viewsUnable to lock for exclusive access. Another application may
When I am debugging boot.bin by nasm it returns the following error: boot.asm: BITS 16 ; The mode we are running in (default for every modern computer) ORG 0x7c00 ; the origin, the boot loader is…
-
1
votes1
answer70
viewsArray, delete value
Good afternoon, someone can get some hint for an exercise in which it is necessary to go through an array and if you find a certain value delete it from the array, this in Assembly. Any hint?
-
1
votes2
answers198
viewsWindows Blibiotecas to use in Assembly
Which libraries I use to build a Windows GUI, and its respective functions? Example: I can import the library msvcrt.dll to use C functions. I have some experience in Assembly for low-level code,…
-
1
votes0
answers125
viewsRead file on hard drive
Where can I find code in Assembly to read files on the hard drive? For example, on FAT32 file system. Or else, a description of your tables and organizations so I can program it myself. I use the…
-
1
votes1
answer129
viewsWhy are you screwing up Assembly?
I’m trying to learn Assembly. By compiling the following code in FASM it gives the error illegal Instruction down below Section . date. When removing this chunk and trying to reassemble, from the…
-
1
votes1
answer1582
viewsAssign value to a variable in Assembly 8086
I have the variable: simbolo db "0 $" and I also have the following function:: read_keyboard: mov ah, 1 int 21h ret Which is a simple interruption that reads from the telado, and saves what was read…
-
1
votes1
answer401
viewsWhat does this Assembly code do?
I’m playing with the Cheat Engine in a little MMO RPG game. By tracking the game values in RAM memory through the Cheat Engine functions, I found the memory addresses where the player’s experience…
assemblyasked 9 years, 1 month ago Ezequiel Barbosa 1,361 -
1
votes0
answers109
viewsDetermine the values of M and N
M and N are constants defined by #define int mat1[M][N]; int mat2[N][M]; int sum_element(int i, int j) { return mat1[i][j] + mat2[i][j]; } Suppose the above code generates the following in Assembly:…
-
1
votes0
answers29
viewsSave characters from the screen
Good afternoon, I want to save screen characters to a file. The size is 20 rows and 40 columns. I’ve developed code, but it’s only holding 14 rows. Someone can help me? Code: mov bx,0 mov si,0 mov…
assemblyasked 7 years, 5 months ago Soraia Tarrinha 11 -
1
votes1
answer181
viewsIs there a system call to read just one file line on Assembly 8086?
Type the fget of c, which sends to a variable all the characters of the line between the beginning of it and the character Carriage Return
-
1
votes1
answer511
viewsProduct of nasm matrices
I have to make an algorithm that will multiply a matrix A by a matrix B and put the result into a third matrix. The matrices are square, of same size and will be passed by reference by another…
-
1
votes0
answers108
viewsInstruction "Sarl" - Assembly
I have an instruction sarl $9, mem32. I know that the Sarl instruction shifts to the right a certain number of bits (in this case 8?) and I know that var. " Mem 32" has a 32-bit dimension and…
-
1
votes1
answer445
viewsAssembly and C++ with Visual Studio 2015 and MASM x86/64
Good night. I use Visual Studio 2015 and usually programming in Assembly language via __asm, but I still have doubts about how to use MASM to create code in Assembly for x64. I need help to take the…
-
1
votes1
answer436
viewsImplementation of C strcpy function in MIPS using MARS simulator
Why the code below does not work? Error in strcpy.asm line 9: Runtime Exception at 0x00400014: fetch address not Aligned on word Boundary 0x00000001 .text .globl main main: lw $a0, destino # Carrega…
-
1
votes1
answer48
viewsCan I run a . NET Native image directly?
I built my executable in C# for an image. NET Native using ngen.exe, I have the file location, but when I run Windows says the executable is invalid. My goal was to make my application written in C#…
-
1
votes0
answers33
viewsHow to do this routine in Assembly show 3 digits on screen?
I have the following code in avr Assembly. link The teacher passed this code and asked us to make the program show a 3 digit result on the screen of the lcd, since now it accepts only 2. The routine…
-
1
votes0
answers50
viewsHow to execute ROL instruction in Assembly inline?
Guys, I have a problem to execute the instruction to scroll left in Assembly in a C code. All the sites I research show this way, but the compiler says there are many memory references to "ROL". I…
-
1
votes0
answers47
viewsHow to add 13.10 after reading string ?
I’m trying to record a 40x20 character array, doing 2 cycles, where the character reads the character guard in a buffer, but I know we have to add 13.10 to change line and the cursor goes back to…
assemblyasked 7 years, 6 months ago jorge saraiva 478 -
1
votes0
answers48
viewsTransfer Values greater than 65536 to variable DD error - Assembly 8086
I’m having some difficulty assigning values greater than 65536 (16 bits), in my code example assign the value of 86400 (one-day value) to a variable with DD declaration (32-bit architecture) and the…
-
1
votes1
answer159
viewsRepeat(while) structure conversion in C to Assembly mips
Suppose that i and kcorrespond to the registers $s3 and $s5, and the basis of array save is in $s6. What code Assembly MIPS corresponding to that code segment C? while( s a v e [ i ] == k ) i += 1 ;…