There are only two files, main.c and kernel.asm, and I tried to make a program with them using NASM and GCC.
So, i was coding in assembly (IAS-32), when i got an arithmetical error. I searched over and over but couldnt figure it out. I dont know why but when I try to do 2/1, this error pops out. The problem is, I have to finish it today, so...
I'm want to instal nasm on elemantry os Linux that is based on Ubuntu, i try this command to install:
sudo apt -get install nasm
but i received this error:
cannot locate nasm
how i can install nasm? Or is it any other linux that install nasm as default and worked better for assembly language ? (fedora , suse, ...)
I have a problem with write a call of printf on x86_64 linux assembler.
I'm running on Ubuntu 12.10 64bit.
I am trying to debug a simple assembly program in GDB. However GDB's gui mode (-tui) seems unable to find the source code of my assembly file.
This is hard to word/ask so please bear with me:
When we see the output of assembly, this is what is going to be executed on the core(s) of the CPU. However, if a CPU has multiple cores- is all of the assembly executed on the same core?
This is the code:
Code:
.data
.text
.globl _start
_start:
mov $56, %ax
mov $4, %bx
add %ax, %bx
push %ax
call printf
pop %ax
fine:
mov $1, %eax
int $0x80
And this is that i did with terminal:
Code:
$ as -o prova.o prova.s
$ ld -dynamic-linker /lib/ld-linux.so.2 -lc -o prova prova.o
$ ./prova
$
Overflow,
how can I implement the putchar(char) procedure using inline assembly only? I would like to do this in x86-64 assembly. The reason for me doing this is to implement my own standard-lib (or at least part of it).
While I'm learning x64 assembly, I'm trying to make add method to add two integers and return integer using assembly.
I had the working code with x86 and I tried to convert to x64
simply I changed the registers' names to be that of x64 and the object file generated without errors but when I use it inside my C function I always get sum = 0.
I think there's a problem with the arguments location a