I found code in 80836 DOS assembly that I'd like to port to 32-bit Linux assembly, using AT&T syntax.
I found site that explains some differences but only about registers.
This is as good a place to ask as any I suppose, so here goes.I'm really only interested in knowing if it is at all possible to push actual values, in this case integers, on the stack from the command Line, i.e. passing arguments and if so how, because as far as I can gather, it is simply impossible to pass anything other than strings.Yes I am a noob at assembly, if anyone should doubt that.
I've been playing around with the assembly output switch for GCC:
gcc -S -c helloworld.c
helloworld.c:
#include <stdio.h>
int main(void){
printf("Hello World!\n");
return 0;
}
helloworld.s:
.file "helloworld.c"
.section .rodata
.LC0:
.string "Hello World!"
.text
.globl main
.type main, @function
main:
.LFB0:
.cfi_startproc
pushq %rbp
If I buy a piece of x86 32-bit or 64-bit software but I don't receive the source code, and I need to modify the software, I'll need to convert the machine code back into a high level language or at least assembly code.
Is there a good utility to go from machine code to C?
I assume that it would attempt to identify whether the program was compiled with a C compiler as opposed to C++ or Objective
Trilby wrote:Gcc compiles C into "plain old assembly", so why would you want to program in C? Cut out the middle man, and write in assembly.Assembly is assembled into plain old binary machine code, so why would you want to program in assembly?Binary machine code is translated at runtime by the processor into high and low voltage states on a series of registers and output lines.
I'm trying to write a simple compiler. My language can calculate a arithmetic expression in float, saving and printing a variable. In first version of my compiler I used allocating calculate expression to assembly function, and all my calculating only used a push/pop.
Then I issued expression code to _start label, and make calculate with call absolute stack address.
Hi. I learned C in high school and am proficient in it:D. At the college while learning microcontrollers there was a short course on assembly language which I skipped:p but had no trouble as most of the application programming had to be done in C. Should I go back n learn assembly language as I have heard it gives good insight into the hardware?
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 am writing a bubble sort algorithm in assembly. I get an error: "Segmentation fault (core dumped)". What does that mean? (I am new to assembly.