Conditional Move on the PowerPC
Is there a conditional-move-equivalent on the PowerPC (32 or 64) instruction set? It can obviously be emulated using a conditional branch, but I want something that outperforms that. ...
Is there a conditional-move-equivalent on the PowerPC (32 or 64) instruction set? It can obviously be emulated using a conditional branch, but I want something that outperforms that. ...
Hi, I`am experimenting with shellcode and stumbled upon the nop-slide technique. I wrote a little tool that takes buffer-size as a parameter and constructs a buffer like this: [ NOP | SC | RET ], with NOP taking half of the buffer, followed by the shellcode and the rest filled with the (guessed) return address. Its very similar to the t...
I'm currently trying to optimize the code emitted from a home-made compiler, for a home-made language. I've tried out Intel VTune to see where the bottlenecks are: http://www.imada.sdu.dk/~sorenh07/misc/vtune-assembly-optimization.png I find it very impressive that a "subl"-instruction is responsible for over 38% of the clockticks in a...
hello~ I'm about to learn x86 assembly language on mac os x... I'm using as instruction to compile assembly file in commend window. but I have several errors.. and I don't know how I can get through.. here is the errors and my assembly code.. which is quite simple. **ung-mi-lims-macbook-pro:pa2 ungmi$ as swap.s swap.s:16:Unknown pse...
is there any thing like this anyware? ...
Hello people! This is currently a homework project that me and my teammate are stuck on. We haven't been given much of an introduction into Assembly, and this is supposed to be our first homework exercise. The task is to create a program that converts 0xAABBCCDD into 0xDDCCBBAA. I'm not looking for an answer, as that would defeat the ...
This is my assembly program which is just a function to swap *x *y. So first argument from main is address of x which is in 8(%ebp) and second one is address of y is in 12(%ebp). The program does swap x and y. I need 7 lines for doing this. can you make it 6 lines and there is a condition you can use only %eax, %ecx, and %edx 3 register...
I'm interested in writing an x86 assembler. I'm wondering what is a good way to map x86 assembly mnemonic instructions (using an Intel-like syntax) into the corresponding binary machine code instructions. ...
Question What is the (non-trivial) difference between the following two x86 instructions? 39 /r CMP r/m32,r32 Compare r32 with r/m32 3B /r CMP r32,r/m32 Compare r/m32 with r32 Background I'm building a Java assembler, which will be used by my compiler's intermediate language to produce Windows-32 executables. Currently ...
Hello, I'm converting some assembly code to C to be able to use it with the current compiler environment I have to work with. I've reached 2 operations I don't know how to translate to C. Anyone know how to do it? In both, offset is an unsigned 32-bit integer and shift is a signed integer value. C_FLAG is a bool. OP1: __asm { __a...
Hello,I'm studying ASM 8086 theoretically on highschool. And when I do this: MOV BX,[SI] is SI+1 going to BH or BL? Thank you :-) ...
Hello, I'm studying ASM 8086 theoretically on highschool. (that means that I study ASM 8086 on a notebook, and never got to run it over a computer). And I don't understand - what will happen if I do this: MOV AL, F2h ADD AL, 20h What will the computer do? (what will be the value of AL,AX, CF,ZF?) and what will happen if I do this: ...
How can i multiply and divide with only using bit shifting and adding? ...
Back when I made an 8086 emulator I noticed that there was the LOCK prefix intended for synchonization in a multiprocessor environment. Yet the only multitasking I know of for the x86 arch. involves use of the APIC which didn't come around until either the Pentiums or 486s. Was there any kind of standard for 8086 multitasking or was it...
I have some code from a function subl $24, %esp movl 8(%ebp), %eax cmpl 12(%ebp), %eax Before the code is just the 'ENTER' command and afterwards there's an if statement to return 1 if ebp > eax or 0 if it's less. I'm assuming cmpl means compare, but I can't tell what the concrete values are. Can anyone tell me what's happening? ...
I need an assembler 8080 software which counts words (delimited by space) which have more than two number in it. Example : this sh0uld b3 l1ke th1s would print : 0 words but Example : this sh0uld b3 l1k3 th1s f000k would print : 2 words <- word l1k3 contain number 1,3 and f000k number 0,0,0 the output should be displayer in hexadecima...
Hello, Is there any converter to convert a C function into ARM (v6) ASM code or I need to do it manually ? I am trying to gain the performance of a C function on Iphone. ...
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. ...
Hi. I've sort of just finished a mandatory task at school, and I'm about to deliver it. But then I came across something that was unfamiliar, header files. :( What I've got: test-program.c task_header.h function1.s function2.s function3.s function4.s test-program.c: #include <stdio.h> #include <stdlib.h> #include <string.h> #incl...
I am trying to translate the following: Action: pushl %ebp movl %esp, %eax subl $0x32, %esp movl $0x0, -0x8(%eax) movl $0x0, -0x4(%eax) movl -0x4(%eax), %eax cmpl $0x32(%eax), %ebp movl -0x4(%ebp), %eax sall $0x2, %ebp addl 0x8(%ebp), %ebp movl (%ebp), %ebp addl %ebp, -0x8(%eax) addl $0x1, -0x4(%eax) What is the best way ...