Skip to content
Advertisement

Tag: nasm

get a char passed as parameter

I would like to write a function in NASM System V ABI x86-64 (Intel Syntax) that I could use in a C program. Here is the prototype of the function: I therefore retrieve the parameters in order (const char *s = rdi, int c = rsi) First, I get the character stored in the register rsi and put it in

Clear input buffer Assembly x86 (NASM)

Edit: This is similar to this: Reset a string variable to print multitple user inputs in a loop (NASM Assembly). But it is not the same issue. From the other post, I was able to prevent additional characters from being printed. However, I still cannot prevent those additional characters from being read when the program goes back to the point

C sockets

The following C program calls select() to get a list of client sockets that have data in the socket buffer (using UNIX domain datagram sockets). It takes four parameters on call from a NASM program. The parameter fds_array[] is a 3-element integer array created in NASM and passed into the program. The data are passed in from NASM in rdi,

Loop Never Ends in Assembly?

Basically, I have below assembly code: I am trying to loop through 0-50 and print the variable pas or probably buf from input box. But this loop keeps printing pas endlessly. I Presume the issue is the re-assignment of ecx, but otherwise without putting my string into ecx how would I print it? or even execute any thing within my

How to link C language libraries?

I am interested in executing a function which is written in C language:- I want to call this fun() through assembly language which i have written:- (NASM 64bit) I have created object file by using these commands nasm -f elf64 MyAsm.asm and gcc -c CLang.c. When I merge these two file with gcc gcc MyASM.o CLang.o i get an error

Advertisement