Questions tagged [assembly]

An assembly language is a low-level programming language for a computer, or other programmable device, in which there is a very strong (generally one-to-one) correspondence between the language and the architecture's machine code instructions.

Filter by
Sorted by
Tagged with
2
votes
1answer
2k views

Nios 2 interrupt handler

This is homework for which we have prepared Nios 2 assembly: ...
7
votes
1answer
453 views

Writing SIMD libraries for C++ on FASM in x86-64 Linux

I have recently started a project of SIMD libraries development for C++ on FASM for x86-64 Linux. I would be glad to hear any opinion or feedback about the project, cleanness of the code and ...
7
votes
1answer
1k views

Listing the first five perfect numbers in MIPS assembly

I've done some programming in the past, but I'm new to MIPS, which I'm trying to learn on my own. This program lists the first five perfect numbers. It uses the Lucas-Lehmer and Miller-Rabin primality ...
5
votes
1answer
327 views

First steps with amd64 assembly

I try to learn amd64 assembler. This is the first thing I tried. This piece of assembly should replicate the functionality of the following piece of C code, which turns a binary sha-256 hash into a ...
5
votes
1answer
615 views

The beginnings of a bootloader using GNU-based tools

This is a personal project of mine. I am currently in the research phase of developing my own bootloader that will be used to load a single task operating system. I am far away from the final goal, ...
4
votes
1answer
2k views

SSE2 assembly optimization - multiply unsigned shorts and add the result

I am attempting to optimize a piece of C code which aims to multiply a series of pairs of unsigned shorts and add the result. I am only concerned about the high 16 bits of the result, and I can ...
101
votes
9answers
38k views

Fastest way to clamp an integer to the range 0-255

I'm working on some image processing code that can generate pixel values outside of the normal range of 0 to 255, and I'd like to clamp them back into the valid range. I know that there are saturating ...
3
votes
2answers
6k views

Correct User Input - x86 Linux Assembly [closed]

So I am working on an x86 Assembly program for Linux using NASM. This program basically asks the user for their name and their favorite color. After doing this and storing the two strings in variables ...
7
votes
1answer
356 views

Bilinear scaling using SSE2 on Core 2 CPUs

I am looking for some help with improving this bilinear scaling SSE2 code on Core 2 CPUs. On my Atom N270 and on an i7, this code is about 2x faster than the MMX code. But under Core 2 CPUs, it is ...