assembly

Good x86 assembly book

I'm looking to teach myself basic hardware architecture; specifically, I'd like to learn x86 assembly for Linux or OSX. What books does this community recommend?...

x86 Assembly on a mac...

Does anyone know of any good tools (i'm looking for IDEs, primarily) to write assembly on the mac... XCode is a little cumbersome to me. Also, on the Intel Macs, can I use generic x86 asm? or is there a modified instruction set? Any information about post Intel Also: I know that on windows, asm can run in an emulated environment cre...

Mixing 32 bit and 16 bit code with nasm

Hi, This is a low-level systems question. I need to mix 32 bit and 16 bit code because I'm trying to return to real-mode from protected mode. As a bit of background information, my code is doing this just after GRUB boots so I don't have any pesky operating system to tell me what I can and can't do. Anyway, I use [BITS 32] and [BITS 1...

Incrementing from 0 to 100 in assembly language.

This is kinda oddball, but I was poking around with the GNU assembler today (I want to be able to at least read the syntax), and was trying to get this little contrived example of mine to work. Namely I just want to go from 0 to 100, printing out numbers all the while. So a few minutes later I come up with this: # count.s: print the num...

What is the best way to learn Assembly? Specifically, for someone who has experience in dynamic languages.

I've been using Python for quite some time now, and I absolutely love the ease of use and flexibility, but I really want to get closer to the hardware for some iter mathematics that I'm working on. I'm also intrigued by being so close to the hardware, with absolutely nothing holding you back from using everything it has. I've researche...

Assembler IDE/Simulator for beginner

I'd like to learn how to program in Assembler. I've done a bit of assembly before (during my A-Level Computing course) but that was very definitely a simplified 'pseudo-assembler'. I've borrowed my Dad's old Z80 Assembler reference manual, and that seems quite interesting so if possible I'd like to have a go with Z80 assembler. However,...

Is it worth it to learn a dialect of assembly?

My goals are focused on software application development, and maybe web application development, but most likely desktop applications. I'm embarking on a path to becoming more familiar with C/C++, but should I go much lower than that, into assembly? Or would I not have a benefit for my long-term goals? ...

8086 Assembler Tutorial

Following on from http://stackoverflow.com/questions/27568/, I have decided to try and focus on x86 assembler rather than Z80 assembler. To that end, I'd like suggestions of good tutorials to follow. Suggestions of other useful information (such as reference works on x86 assembler) are also very welcome. ...

Is GCC broken when taking the address of an argument on ARM7TDMI?

My C code snippet takes the address of an argument and stores it in a volatile memory location (preprocessed code): void foo(unsigned int x) { *(volatile unsigned int*)(0x4000000 + 0xd4) = (unsigned int)(&x); } int main() { foo(1); while(1); } I used an SVN version of GCC for compiling this code. At the end of function fo...

How do I get the assembler output from a C file in VS2005

I think the file that is produced is an .asm file, any idea how to produce this in Visual Studio when you do a build? ...

What is the meaning of "non temporal" memory accesses in x86

This is a somewhat low-level question. In x86 assembly there are two SSE instructions: MOVDQA xmmi, m128 and MOVNTDQA xmmi, m128 The IA-32 Software Developer's Manual says that the NT in MOVNTDQA stands for Non-Temporal, and that otherwise it's the same as MOVDQA. My question is, what does Non-Temporal mean? ...

JIT code generation techniques

How does a virtual machine generate native machine code on the fly and execute it? Assuming you can figure out what are the native machine op-codes you want to emit, how do you go about actually running it? Is it something as hacky as mapping the mnemonic instructions to binary codes, stuffing it into an char* pointer and casting it as...

Is there a way to insert assembly code into C?

I remember back in the day with the old borland DOS compiler you could do something like this: asm { mov ax,ex etc etc... } Is there a semi-platform independent way to do this now? I have a need to make a BIOS call, so if there was a way to do this without asm code, that would be equally useful to me. ...

Assembly CPU frequency measuring algorithm

What are the common algorithms being used to measure the processor frequency? ...

Comprehensive List of x86_64 Assembly Instructions

I'm doing a lab for a comp sci class that involves "defusing a binary bomb," basically reverse engineering a program to gain 6 "passwords." I was just looking for a list of all of the instructions in one, easy to read place. Thanks Alex ...

What is the fastest way to convert float to int on x86

What is the fastest way you know to convert a floating-point number to an int on an x86 CPU. Preferrably in C or assembly (that can be in-lined in C) for any combination of the following: 32/64/80-bit float -> 32/64-bit integer I'm looking for some technique that is faster than to just let the compiler do it. ...

What was the name of the Mac (68000) assembler?

I'm sure there were several, but the one I was thinking of would display a nice text screen when you crashed the computer thoroughly. The Text was "Well smoke me a kipper." ...

Prefetch instructions on ARM

Newer ARM processors include the PLD and PLI instructions. I'm writing tight inner loops (in C++) which have a non-sequential memory access pattern, but a pattern that naturally my code fully understands. I would anticipate a substantial speedup if I could prefetch the next location whilst processing the current memory location, and I ...

Is learning Assembly Language worth the effort?

Please explain/exemplify your answers. If yes, what architecture do you recommend to get started with? ...

what interrupt would you hook from DOS to get the real-time clock

what interrupt would you hook from DOS to get the real-time clock ...