Write an Assembly Language program named “count letters” that counts the occurrences of all small and capital letters in given below string and then prints the result in the format (Caps, count:: Small, count). String is “bcAdBDeCEad” and it should print this result (Caps, 5:: Small, 6). The program should take address of the source string as a…
I wrote swap on assembly, but I'm not sure that my code is right, this is the code
swap: mov r1, -(sp)
mov (sp) r1
mov 2(sp) (sp)
mov r1 2(sp)
mov (sp)+, r1
rts pc
swap receives pointer from stack
I have been trying to learn assembly for a few years now. I get to do a "Hello, World" program but never further. I find it so hard. Is anyone able to point me to a place or maybe even themselves, teach me some? I have prior programming experice mainly in python. So i am not completely unfamiliar with programming.
When inlining assembly in gcc, I find myself regularly having to add empty asm blocks in order to keep variables alive in earlier blocks, for example:
asm("rcr $1,%[borrow];"
"movq 0(%[b_],%[i],8),%%rax;"
"adcq %%rax,0(%[r_top],%[i],8);"
"rcl $1,%[borrow];"
: [borrow]"+r"(borrow)
:…
is it possible to write a single character using a syscall from within an inline assembly block? if so, how? it should look "something" like this:
__asm__ __volatile__
(
" movl $1, %%edx \n\t"
" movl $80, %%ecx \n\t"
"…
Write an Assembly Language program named “count letters” that counts the occurrences of all small and capital letters in given below string and then prints the result in the format (Caps, count:: Small, count).Strings is “bcAdBDeCEad” and it should print this result (Caps, 5:: Small, 6).The program…
I need to get the difference of 2 signed integers. Is there an ABS() function in x86 assembly language so I can do this. Any help would be greatly appreciated.
I'm looking for some good code examples of dynamic memory allocation using an assembly language under Linux and using system calls, not malloc and friends.
What are some of the simplest but effective ways to do this?
On Intel 386+ computers.
I'm writing a program in assembly using MIPS architecture for a class, and I'm having trouble figuring out how to grab an input character by a user and store it in a register to process.
The program would open a console, output a message, the user can then input a character and then this…
I would like to know practically what kind of Assembly should we put in GAC.
Case 1. If in my Solution multiple project uses log4net.dll then should it be part of GAC?
Case 2. If I have multiple application deployed in a machine each using log4net.dll is this the reason enough to put…
Hi,
when building a jar-with-dependencies with the assembly plugin, I get many, many messages like this:
META-INF/ already added, skipping
It seems to mee, that maven is warning me, that I already have a META-INF in my to-be-created jar, and therefore the META-INF of the…
Hello,
I'm writing a customized reflective library for some specialized custom domain logic, and that library is going to use XML configuration files that will dynamically resolve System.Type objects at runtime. However, when writing the XML configuration files, it's a bit…
Hi,
i have a website and in it is an application with website administration.
It is possible to load an assembly from website in administration application?
Thanks a lot
How can I quickly find, given a folder with .Net assemblies, which of these depends on some given assembly?
(Opening them up one by one with Reflector is not what I had in mind)
I'm trying to use a function in assembly in a C project, the function is supposed to call a libc function let's say printf() but I keep getting a segmentation fault.
In the .c file I have the declaration of the function let's say
int do_shit_in_asm()
In the .asm file I…
I am messing around with assembly for the first time, and can't seem to change the index values of an array. Here's the method I am working on
int ascending_sort( char arrayOfLetters[], int arraySize )
{
char temp;
__asm
{
//???
}
}
And these are…
So in assembly I declare the following String:
Sample db "This is a sample string",0
In GDB I type "p Sample" (without quotes) and it spits out 0x73696854. I want the actual String to print out. So I tried "printf "%s", Sample" (again, without quotes) and it spits…
Hi,
I have a C array that contains binary x86_64 machine code, which I need to convert to assembly code on a Linux machine. I have no problem in converting the C array to a binary executable, but can't find the utility to convert it to asm code.
Any ideas?
Thanks!
I need to get the difference of 2 signed integers.. Is there an ABS() function on Assembly language so I can do this. Any help would be greatly appreciated
Is it possible to build a music player in assembly (I'm thinking along the lines of NASM)? What are the obstacles one might face in the process of building one?
I want to do the following:
I have a function that is not mine (it really doesn't matter here but just to say that I don't have control over it) and that I want to patch so that it calls a function of mine, preserving the arguments list (jumping is not an option).
…
Is there an easy way (like a free program) that can covert c/c++ code to x86 assembly?
I know that any c compiler does something very similar and that I can just compile the c code and then disassemble the complied executable, but that's kind of an overkill, all I…