Assembly code for sin(x)
Hi could you please give me a assembly code for calculate sin(x)[using:"Taylor Expansion"] in linux? With Best Wishes ...
Hi could you please give me a assembly code for calculate sin(x)[using:"Taylor Expansion"] in linux? With Best Wishes ...
Are assembly language and machine language (for the same underlying system) really the same? Are there any differences between these two concepts? ...
Okay. I want to learn how to assemble programs on my Mac (Early 2009 MBP, Intel Core 2 Duo). So far, I understand only that Assembly languages are comprised of direct one-to-one mnemonics for CPU instructions. After some Googling, I've seen a lot of terms, mostly "x86" and "x86_64". I've also seen MASM, NASM, and GAS, among others. Corr...
I've created a JVMTI agent that does the following at a high level: onClassLoadHook send the bytecodes for the loaded class to a separate Java process that will instrument the class using ASM get the bytecodes back and load them In my seperate java process that instruments the loaded Java class I do the following : .. .. cr = n...
I am currently planning to conduct a Training Workshop on Optimized C Code for Microcontroller Applications. Currently I am stuck on how to explain bit manipulation in C? Exactly what I don't want is to lead students to bit structure but guide them to use bit manipulation efficiently... Any advice? ...
I'd like to have a go at learning assembly, and possibly writing my own simple assembler (I recently read an interesting article on how to create an operating system, and quickly realised that a certain familiarity with assembly would help me out a lot here). The trouble is that although I'm sure I'll have no problems finding articles a...
Hello, I want to read a memory location without polluting the cache. I am working on X86 Linux machine. I tried using MOVNTDQA assembler instruction: asm("movntdqa %[source], %[dest] \n\t" : [dest] "=x" (my_var) : [source] "m" (my_mem[0]) : "memory"); my_mem is an int* allocated with new, my_var is an int. I have two problem...
I'm trying my hand at working with threads at an assembly language level. I'd like to store information about the current thread, including things like the thread ID, etc. My current thought is placing a pointer to the thread information structure at an aligned address, such as (ESP & 0xFFE00000) for a 1MB stack. The immediate problem I...
In the assembly opcode cmovl, what gets compared? For example: EAX: 00000002 EBX: 00000001 cmovl eax,ebx What is the result? Which one needs to be less so they can be moved? Thank you! ...
I came across this code and need to understand what it is doing. It just seems to be declaring two bytes and then doing nothing... uint64_t x; __asm__ __volatile__ (".byte 0x0f, 0x31" : "=A" (x)); Thanks! ...
I cannot figure out how to get GAS to emit line number debugging information for gdb in assembly. Note that I'm using the avr-gcc cross compiler, but doubt that is relevant. I'm using the following command line options to assemble: avr-gcc -g -ggdb -Os -mmcu=atmega644 -ffunction-sections -fsigned-char -Winvalid-pch -Wall -Wno-long-lo...
Preferably well comment and with some associated docmentation and a Makefile. Just for clearity, that's the less than 512 bytes (512 bytes - partition table) of machine code that gets loaded by the Bios and is responsible for chaining to the secondary bootloader in your boot partition. Edit: Both David's and bdonlan's answers look prom...
Hi Could you please give me a assembly code in linux(ubuntu 9.04) to print floating point number? with best wishes ...
So I am learning MIPS using the SPIM simulator and im stuck on this problem. I want to add two 64 bit numbers which are stored in four 32 bit registers. So I add the LO bytes and then the carry and the HI bytes. But there is no adc/addc command i.e. add with carry. So I would have to add the carry bit in the status register. But, how e...
Both tools translate assembly instructions directly into machine code, but is it possible to determine which one produces the fastest and cleanest code? ...
Is there a way to execute a flat binary image in Linux, using a syntax something like: nasm -f bin -o foo.bin foo.asm runbinary foo.bin ...
I have two signed 16-bit values in a 32-bit word, and I need to shift them right (divide) on constant value (it can be from 1 to 6) and saturate to byte (0..0xFF). For example, 0x FFE1 00AA with shift=5 must become 0x 0000 0005; 0x 2345 1234 must become 0x 00FF 0091 I'm trying to saturate the values simultaneously, something like th...
I was wondering how to use GCC on my C source file to dump a mnemonic version of the machine code so I could see what my code was being compiled into. You can do this with Java but I haven't been able to find a way with GCC. I am trying to re-write a C method in assembly and seeing how GCC does it would be a big help. ...
I'm learning assembly and I'm trying to do a simple read from keyboard / print to keyboard using BIOS calls. So far I have the following: loop: xor ah, ah int 0x16 ; wait for a charater mov ah, 0x0e int 0x10 ; write character jmp loop This works fine until someone presses the enter key - it seems that...
Yesterday I learned that inline assembly (with the __asm keyword) is not supported under Microsoft Visual C++ when compiling for AMD64 and Itanium targets. Is that correct? And if so, does anyone know why they would not support inline assembly for those targets? It seems like a rather big feature to just drop... ...