Is there an x86(_64) instruction which gives index of the highest (or lowest) '1' bit?
As said. e.g. for the 8-bit(just for example, no byte order considered) integer 00100100, is there an instruction gives 5? Thanks in advance, ...
As said. e.g. for the 8-bit(just for example, no byte order considered) integer 00100100, is there an instruction gives 5? Thanks in advance, ...
Hi, I am looking at lots of assembly language code that is compiled along with c. They are using simple #define assembly without any headers in boot.s code. How does this work ? ...
Hello guys, I am writing a VMM for intel x86 architecture. Most of the code contains x86 platform specific assembly and c code. Can some one help me how to debug the assembly code please including hardware data structures. ...
Can anybody tell me if it is possible to execute programs using arm assembly language in the simulators? ...
So, we're studying MIPS architecture at school and we're implementing a MIPS32 architecture. I thought I'd use GNU cross-binutils as assembler but I'm getting weird output when dealing with instructions jal, j and jr. The assembler seems to insert the instructions at the wrong places. I have no idea why this happens, and I doubt the MIPS...
I know that it's said when passing a variable of any integral type like int, double, long double, etc to a function; it should be done by value but I'm curious that from an assembly point(performance-wise or space-wise), wouldn't be there a situation when passing a variable of an integral type with a size bigger than pointers like long d...
Hi guys, do you know where I can find Windows Low Level Assembly examples programs? I have some exemples using macros (NASM, MASM) but I want pure assembly, in order I can build a shellcode later. Thanks a lot guys! ...
How do DTrace pid probes, specifically entry and return probes, work on assembly level ? My assumption was that upon initialization, DTrace would modify the target code by changing the instruction at the target location to be an interrupt (e.g. 'int 0x1'). Then in the interrupt handler first do the tracing task, then complete the origin...
I would like to control an RC model via USB from my computer. I don't need a real radio control, so controlling the servos directly through cables is sufficitent (yes, there will be cables between the model and the controlling unit). I thought I would build some microcontroller-based device which would be connected to the computer via US...
Hi, I want to find cpu cache size of L1 or L2 caches using x86 assembly language. I heard cpuid and MSR registers have system specific data. Can some one help me how can I get sizes please. ...
I heard somewhere that conditional jump instructions in the x86 instruction set were limited to 256 bytes. (In other words, the jump could not go further than 256 bytes.) Is this true? I have been writing logic involving JMP instructions to get around this. Is it necessary? ...
I am using a run-time debugger. EAX: 0000 0023 EDX: 5555 5556 imul edx EAX: aaaa aac2 EDX: 0000 000b I am utterly confused, and can't figure out how this multiply is working. What's happening here? I notice in a similar question here that imul ebx ; result in EDX:EAX I don't understand the EDX:EAX notation though :/ ...
rep stos dword ptr [edi] ...
0040103A CALL DWORD PTR DS:[40207A] USER32.MessageBoxA What does DS: mean? ...
Hi Guys, I'm not in a position to make out the difference between vld4_f32 and vld4q_f32 in ARM NEON instructions. The confusion started when I raised my coding levels and started looking at the assembly instructions rather than the less informative intrinsics. The reason I need to use vld4 variant instruction here is because, I would...
While debugging on Windows XP 32-bit using the immunity debugger, I see the following on the stack: _Address_ -Value_ 00ff2254 ff090045 00ff2258 00000002 My understanding is that every address location contains 8 bits. Is this correct? ...
Why is a bit, called a bit. Why is a 8-bits a Byte? What made people call a 16-bits a Word, and so on. Where and why did their alias come about? I would love other people to include things like basic ASM types, then branch out to C/C++ and move on to SQL and the like's datatypes. 1-Bit Bit - binary Unit Bool - Named after the invento...
Hi, I have a C function in which I have 4 pointers and each of them point to different locations of a large 2D array of floats. Because the ARM assembly functions can only be passed with 4 parameters (r0 - r3), I'm not able to understand how to pass the pointer to my return value, which will become the 5th parameter to my assembly func...
Why are the general purpose registers ordered as they are? (eax, ecx, edx, ecx) For example when regarding the "inc" instruction, the opcodes are: inc eax - 40 inc ecx - 41 inc edx - 42 inc ebx - 43 Is there a reason why they are ordered that way? ...
For example: .text .align 2 .global main .equ val,0x4712 # 16-bit binary code for 0x4712: 0100 0111 0001 0010 # Program code starts now main: # This label must be main:, not MAIN: movi r16,val # WHAT WOULD THIS LINE BE ...