Questions tagged as 'assembly'

1
answer

Bubble sort in assembly (MIPS)

My teacher asked us to implement Bubble Sort in the MARS environment but I can not. There are some errors in the code. Can anyone find the error? Output should be {1, 2, 3, 4, 5, 6, 7, 8} but is {1, 8, 7, 6, 5, 4, 3, 2} Code...
asked by 04.11.2016 / 22:51
1
answer

How to manipulate the FPU stack in the x86 assembly using the 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, however regardless of the input values the result is always 0. p> extern printf ;a função...
asked by 22.05.2015 / 21:47
1
answer

Assembly error A2119

I am a beginner in Assembly and am now trying to run my first Hello World program. I use Windows 7 and MASM. I'm following a tutorial in the program source until the following: .386 model falt, stdcall option casemap:none include \...
asked by 26.04.2015 / 21:11
1
answer

nasm: 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 wrong? boot.asm: BITS 16 ; The mode we are running in (default for every modern computer) ORG 0x7c00 ; the o...
asked by 17.05.2015 / 02:13
1
answer

Can I store files in an executable?

I need to store a file, no matter its extension (it's mostly an executable) within another executable. I'm compiling with CodeDom an executable that inside it there is a "special" and encrypted file, while executing the all magic executable...
asked by 29.08.2017 / 09:03
1
answer

Program crashes after stack allocation and call in C

I'm trying to make a simple program: it allocates an integer in the stack, calls% c_of% of the C library, and prints it to the screen. I have already disassembled it in C , and I try to reimplement it, without success. I tested the allocation w...
asked by 08.02.2015 / 23:07
1
answer

Error in assembly deviation (MIPS)

I need to transform the following c code into 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]; } Doing this I came up with the following code...
asked by 20.04.2015 / 04:39
0
answers

Segmentation Fault in Assembly

I'm new to assembly and I have a 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 SYS_WRITE_FILE equ 4...
asked by 16.05.2017 / 22:40
0
answers

Assembly Mips: Runtime exception at 0x004000ac: store address not aligned on word boundary 0x1001040e

In this code, I'm having trouble using the sw command. An error always appears as follows:    Runtime exception at 0x004000ac: store address not aligned on word   boundary 0x1001040e Honestly, I'm struggling to learn assembly mips, but I...
asked by 17.09.2015 / 06:14
0
answers

How to shut down the PC in Assembly 16 bits in boot mode

Good evening I'm developing a bootloader that writes to a floppy. I've been able to restart now, but I can not get it to shut down. I've tried several assembly codes, but nothing works. He always catches and shoots his speaker infinitely. How ca...
asked by 01.07.2015 / 03:05