Skip to content
Advertisement

Tag: assembly

Checking for specific system call support in inline assembly

My application builds on environments that are older, and do not support newer (specific) system calls. I can’t go upgrading them for reasons I can’t disclose, but instead of making it compile time (which would lose out on any ‘benefits’) I was wondering if there’s a way to do in inline assembly. For example: Is there a way to check

How can I make Linux system calls from a C/C++ application, without using assembly, and in a cpu-independent manner? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations. Closed 4 years ago. Improve this question I am looking to write a program that will need to

Pass values from C program to Assembly language

I would like to pass values from C program to Assembly using the linked assembly method instead of inline assembly method in C. Below is the Assembly program(GCD) which is am working on. And this is the C program from with I am trying to pass the values to assembly program When I compile using the below method and run

NASM division using variables instead of actual values

I’m learning some basic arithmetic using NASM on Linux. I need to divide two numbers using variables NUMBER1 and NUMBER2. My code works if I type in actual value instead of variables. For example if I type in ‘6’ instead of NUMBER2 and ‘2’ instead of NUMBER1, the program does division and gives me answer of 3. Running code with

Segmentation fault in my Assembly implementation

I am new to assembly language programing, and here I am trying to call C standard library function puts from my assembly code, but I am continuously getting segmentaion fault. Please help; Operating system : LINUX 16.04 Assembler : nasm Machine : intel x86 – 64bit Answer to explain Comments More, start with x86 calling convention and your code. x86

Linux page table of the process

I’m reading about the memory paging here and now trying to experiment with it. I wrote a simple assembly program for getting Segmentation Fault and ran in gdb. Here it is: I assemble and link this into a 64-bit ELF static executable. As far as I read each process has its own Page Table which cr3 register points to. Now

Advertisement