Hi
And again I ran into a problem where I cant find a straightforward solution...
I am doing some inline assembly and I wanna execute some code a few times by
using the .rept directive which tells the assembler to act as if the lines following .rept, up to the one just before .endr, are repeated the specified number of times.
The obvi...
There are assembly language libraries for the ARM for doing signal processing and other good stuff called "OpenMAX DL for ARM11 processor family".
When you download the library from the ARM site, it contains .s assembly files. How can these be compiled with Xcode and called from Objective-C for the iPhone? There are examples of inline a...
I would like to be able to see an assembly language listing of my Arduino sketches. How can I achieve this?
Update: I am running the Arduino Software on a Windows machine.
...
I've been looking around online a little bit at assembly tutorials and have been flipping through Art of Assembly as well.
I keep getting hung up on one thing when changing segment registers though.
I see code like:
mov ax, cs
mov ds, ax
mov es, ax
Why can't I just compress this to:
mov ds, cs
mov es, cs
Is the first way faster s...
i need to implement a stack in x86 assembly so i wrote this:
section .bss
my_stack:
resb 5
but the data inside this address disappear after i continuing with my program
there is a better way i can implement the stack?????
...
When embedding assembly code into a C/C++ program, you can avoid clobbering registers by saving them with a push instruction (or specify clobber list of compiler supports it).
If you are including assembly inline and want to avoid the overhead of pushing and popping clobbered registers, is there a way of letting gcc choose registers for...
This sounds like a daft question at first, but bear with me.
It is common knowledge that binaries for one CPU architecture do not run on others. So for example it is impossible to run (without a compatibility layer of some kind), an x86 binary on a sparc64 chip. The instruction sets are different, so clearly that will not work.
But whe...
I would like to execute opcodes directly against the running Dalvik VM instance from within my application on Android. I'm looking for something similar to the C asm function. I have a list of opcodes for dalvik, but I am unfamiliar with how to either execute them directly, or write them out to .class files and execute them against som...
I have the following assembly program which displays the letter 'z' and then exits:
mov dl, 'z'
mov ah, 2h
int 21h
mov ah, 4Ch
int 21h
I assembled it with NASM and the resulting file only contains those instructions. (10 bytes) I put 1000 calls to this program in a batch file, and then 1000 calls to
echo z
and the echos run about 1...
Can someone please help me with this assembly code? an explanation of what goes in with each step will be great. thanks!
the following code used to implement the instruction
sllv $s0, $s1, $s2
which uses the least significant 5 bits of the value in register $s2
to specify the amount register $s1 should be shifted left:
...
This is pretty basic, but I figure it should be on SO for posterity.
I need to implement a simple macro that finds the modulo of two numbers on a processor that doesn't have a division operator (think ARM). I could use division by repeated subtraction, but I don't know if this was the most efficient or easiest to work with.
Any suggest...
I've coded a SIC assembler and everything seems to be working fine except for the I/O aspect of it.
I've loaded the object code into memory (converted char format into machine representation), but when I call SICRun(); to execute the code, I get an error stating "devf1 cannot be found".
I know this is related to the input/output devi...
Is it possible to create, edit, link, compile (is compile the word?) etc. assembly code in MSVC++?
Also, if it's not possible, how can I create an .exe out of plain text, ie: convert the text into whatever format is required to use assembly code, then turn the assembly code into an .exe. (I'd say compile, but I don't think that is the c...
I'm trying to write a program in assembly and make the resulting executable as small as possible. Some of what I'm doing requires windows API calls to functions such as WriteProcessMemory. I've had some success with calling these functions, but after compiling and linking, my program comes out in the range of 14-15 KB. (From a source of ...
Do there exist any ARM processors that implement the architecture version ARMv5TE (or ARMv5TEJ) yet also implement VFPv1 (as opposed to VFPv2)?
I am writing some assembly code for ARMv5TE and I would like to assume that if a VFP is present, it is VFPv2. Were there ever any processors shipped with this combination?
...
Are there a Code Conventions for Assembly (mainly PIC)?
...
I have written a "dangerous" program in C++ that jumps back and forth from one stack frame to another. The goal is to be jump from the lowest level of a call stack to a caller, do something, and then jump back down again, each time skipping all the calls inbetween.
I do this by manually changing the stack base address (setting %ebp) and...
All example AVR programs I've ever seen start with code such as the following:
.org $0000
rjmp Reset
; ...
Reset:
; Start of program
If I'm not making use of any interrupts can I do without the rjmp and start the program at $0000?
...
Hey, guys -
I'm writing a real-time operation system from scratch for a course project. I want to know the end address of my code after I download it to the chip, because I am planning to use the free memory for stack space and I need make sure that I won't overwrite the existing code.
I heard about __end variable provided by GCC is th...
Continuing my reverse engineering education I've often wanted to be able to copy portions of x86 assembly code and call it from a high level language of my choice for testing.
Does anyone know of a method of calling a sequence of x86 instructions from within a C# method? I know that this can be done using C++ but I'm curious if it can ...