All Questions
2,383
questions
0
votes
0
answers
42
views
Why do I keep getting a Segmentation Fault from trying to access /dev/mem in ARM64 on the Raspberry Pi 4?
I've been working at this program for months, and I've fixed many errors, errors with alignment, other segmentation faults, and I've gotten down to this one, where it throws a segmentation fault when ...
1
vote
1
answer
56
views
What are the binary representations for the flags used in the Linux open() syscall?
I am learning NASM and currently unsure what values should be used for the flags argument for open() as shown in the man page. I'm mainly asking this for clarification so I don't mess something up, ...
0
votes
0
answers
40
views
How can I disassemble a whole obj file in valid asm, amend some sections of such asm code and reassemble to obj?
Is it possible on Linux to use objdump (or any other utility) to fully disassemble an obj file to asm code, modify such code and then pass the asm to as?
The challenge I have with objdump is that it ...
0
votes
1
answer
32
views
Open Syscall 56 ARMv8 fails
I'm trying to open my Xbox Gamepad at /dev/input/js0 using syscall 56. I have verified the devices' existence at the given path. Including through a test program written in C with open(). However, the ...
0
votes
0
answers
55
views
dns resolve throw syscall linux
please help. this code sometime works but sometimes not working
it retreive responce for dns
sometimes it long wait from function recv (and no answer) but sometime all working good
i compiled it by 2 ...
0
votes
0
answers
100
views
cannot execute: required file not found, linking -lc wth ld command
So basically, I am working on a compiler ... long story short, I codegen and i want to use libc with the x86_64 AT&T Assembly. The object file is generated with 64bit elf architecture. I want to ...
-4
votes
0
answers
51
views
What is the difference between the 'signal' system call between 32 and 64 bit on linux? [duplicate]
Context: a simple interpreter on linux x86.
I have a simple 32 bits interpreter and I catch all signals to restart and print a signon message, then continue. The user is probably testing and can ...
0
votes
0
answers
79
views
Problem with program in assembly x86 AT&T, division by repeated subtraction algorithm
I have a problem with my program. It should read from STDIN 32 bytes as divident, then next 32 bytes as divisor, after that it should divide divident by divisor using "division by repeated ...
1
vote
0
answers
53
views
Unable to access mapped memory
Why can not access the memory after 0x010ff8
(gdb) br *0x0100e2
Breakpoint 1 at 0x100e2
(gdb) run
...
Breakpoint 1, 0x00000000000100e2 in ?? ()
(gdb) info proc mappings
process 2563326
Mapped address ...
3
votes
0
answers
72
views
After swapping stack in program on linux I cannot make function calls from externam files anymore
I am experimenting with the concept of swapping the stack to custom allocated memory in C (for changing the stack pointer and preserving registers, I am obviously using assembly). It is experiment on ...
1
vote
0
answers
78
views
Question about String Reversal in C Code: Why does the string appear reversed at the end?
I have this C code where I am trying to reverse a string using inline assembly. However, I am curious to know how the reversed string is displayed at the end:
printf("Reversed string: %s\n", ...
1
vote
1
answer
78
views
Assembly error when compiling C code with ASM instructions
I'm new to assembly language programming and I'm having a problem with a C program that incorporates assembly instructions (ASM) to reverse a string. The code works without errors on my Debian virtual ...
-1
votes
1
answer
96
views
Issue with string length validation in assembly and C
I'm new to assembly language and I'm working on a program that combines assembly language with parts written in C. My goal is to prompt the user to input a string of characters and ensure that it does ...
2
votes
1
answer
79
views
how do I turn AT&T syntax into intel syntax?
In AT&T syntax you can do something like asm("mov %%eax, %0\n\t":"=r" (a[0])); but not in intel syntax.
I want to translate this AT&T syntax to intel syntax, it gets the ...
1
vote
1
answer
78
views
How to display "The reversed string is:" and the reversed string on the same line in assembly language?
I'm new to assembly language programming and currently working on a simple program that prompts the user to enter a string, then reverses and displays it. However, I'm struggling to figure out how to ...