Category "assembly"

unknown pseudo-op: `.globl_start'

I have some assembly code written for 32-bit machines but I need to run that on x86-64 bit architecture. Please suggest ways to achieve this. I'm compiling usi

How to add two numbers, integer and a float in NASM?

I have this code that is suppose to add two numbers, a float(3.25) and a integer(2). EDITED: extern _printf, _scanf global _main section .bss num1: resb 4 s

How can I multiply 64 bit operands and get 128 bit result portably?

For x64 I can use this: { uint64_t hi, lo; // hi,lo = 64bit x 64bit multiply of c[0] and b[0] __asm__("mulq %3\n\t" : "=d" (hi), "=a" (lo)

Error in simple g++ inline assembler

I'm trying to write a "hello world" program to test inline assembler in g++. (still leaning AT&T syntax) The code is: #include <stdlib.h> #include &

GCC assembly and unsupported instruction `mov'

I'm trying to compile the following assembly code in level2.s movl $0x0000000054756825, %rdi movl $0x000000000040198c, $(0x0000000055685ff8) ; do I need $ for

Assembler HCS12 how does register with index work with TST-instruction?

Hello this is my test code: LDX #$2000 LDY #$1000 LDD #$0000 la: ADDD #1 MOVB 1, X+, 1, Y+

two pass assembler fix

I'm working on a 2 pass assembler and have been looking at sample codes online to familiarise myself. I found the following code but there appears to be a probl

two pass assembler fix

I'm working on a 2 pass assembler and have been looking at sample codes online to familiarise myself. I found the following code but there appears to be a probl

How to disassemble a binary executable in Linux to get the assembly code?

I was told to use a disassembler. Does gcc have anything built in? What is the easiest way to do this?

How do I ignore line breaks in input using NASM Assembly?

Learning NASM Assembly, I am trying to make a program that reads two one-digit number inputs. I have two variables declared in the .bss: num1 resb 1 num2 resb

How do I ignore line breaks in input using NASM Assembly?

Learning NASM Assembly, I am trying to make a program that reads two one-digit number inputs. I have two variables declared in the .bss: num1 resb 1 num2 resb

Assembly - How To Set A Boolean Variable

Can someone tell me how to set a Boolean variable in Assembly TASM? I have been looking on the Internet and I can't find a proper explanation. Thanks to anyone

What are assembly instructions like PEXT actually used for?

I watched a youtube video on the Top 10 Craziest Assembly Language Instructions and some of these instructions have no obvious application to me. What's the poi

One instruction to clear PF (Parity Flag) -- get odd number of bits in result register

In x86 assembly, is it possible to clear the Parity Flag in one and only one instruction, working under any initial register configuration? This is equivalent

How to use RIP Relative Addressing in a 64-bit assembly program?

How do I use RIP Relative Addressing in a Linux assembly program for the AMD64 archtitecture? I am looking for a simple example (a Hello world program) that use