x86-64

How can I write a "Hello World" app in assembly language?

Possible Duplicate: how to write hello world in assembler under windows? I've often heard of applications written using the language of the gods, assembly language. I've never tried though, and I don't even have a clue how to do it. If I wanted to dabble, how would I go about doing it? I know absolutely nothing about what is ...

Recommended textbook for machine-level programming?

I'm looking at textbooks for an undergraduate course in machine-level programming. If the perfect book existed, this is what it would look like: Uses examples written in C or assembly language, or both. Covers machine-level operations such as two's-complement integer arithmetic, bitwise operations, and floating-point arithmetic. Expla...

Why is x86 ugly? aka Why is x86 considered inferior when compared to others?

Hello, recently I've been reading some SO archives and encountered statements against x86 architecture. http://stackoverflow.com/questions/2667256/why-do-we-need-different-cpu-architecture-for-server-mini-mainframe-mixed-cor says "PC architecture is a mess, any OS developer would tell you that." http://stackoverflow.com/qu...

Can an x64 application use x86 assemblies - and vice versa?

My application is built as a x64 application. After moving to VS2010 I got some problems which seems to be related to some x64/x86 mismatch in referenced dlls. Now I'm moving to target .NET4, and I get even more similar problems. My question is: What precautions do I need to take regarding mixing x64 and x86. Can it be done at all? I t...

What is a good 64-bit NASM assembly reference?

I have been able to find plenty of 16 and 32-bit NASM assembly references like here, but the only thing I could find on 64-bit NASM was what was in the small section of the NASM manual here. Are there any good sites or books that would have a better explanation of 64-bit assembly (Windows or Linux/Unix) with some good code examples? ...

Producing x86 assembly code from a binary executable/C array

Hi, I have a C array that contains binary x86_64 machine code, which I need to convert to assembly code on a Linux machine. I have no problem in converting the C array to a binary executable, but can't find the utility to convert it to asm code. Any ideas? Thanks! ...

How To Create Your Own x86 Operating System for Modern PC Computers

I'd like to create a new operating system for x86 PC computers. I'd like it to be 64-bit but possibly run as 32-bit as well. I have these kinds of questions: What kinds of things do you start working on first? Knowing where to start in writing your own operating system seems to me to be a tricky subject, so I am interested in your inpu...

ASP.NET application developed in 32 bit environment not working in 64 bit environment

...

Skype Mac API - Use AppleScript or 5 year old API?

I have a x86_64 app that I would like to have optionally read Skype status messages. However, the 5 year old skype mac framework is 32-bit, and if there is a way to have that compile within a 64-bit app, I haven't found it. My question is, basically, how should I go about doing this? I really only need to get and set the USERSTATUS AWA...

Calling SDL/OpenGL from Assembly code on Linux

I'm write a simple graphic-based program in Assembly for learning purpose; for this, I intended to use either OpenGL or SDL. I'm trying to call OpenGL/SDL's function from assembly. The problem is, unlike many assembly and OpenGL/SDL tutorials I found in the internet, the OpenGL/SDL in my machine apparently doesn't use C calling conventi...

How to write a X86_64 _assembler_ ?

Goal: I want to write an X86_64 assembler. Note: marked as community wiki Background: I'm familiar with C. I've written MIPS assembly before. I've written some x86 assembly. However, I want to write an x86_64 assembler -- it should output machine code that I can jump to and start executing (like in a JIT). Question is: what is the best...

App crashes on i386, works on x86_64

Hi, I tried switching architectures in my Xcode project today, because I was about to use low level QuickTime stuff that's not yet ported to 64 bit yet. When i compiled before on x86_64 my app ran just fine. Then i switched the arch to i386 and boom, my app keeps crashing on startup. The weird thing is, the stack tracke has nothing to ...

How can I create a parallel stack and run a coroutine on it?

Hey guys, In today's "Zneak's time-wasting adventures", I decided I should try to implement coroutines (I think that's how I should call them). I expect to have to use assembler, and probably some C if I want to make this actually useful for anything. Bear in mind that this is for educational purposes. Using an already built coroutine ...

64-bit issues: trying to copy value from %rsp into temp variable using inline assembly

I'm taking an operating systems design class in which they have given us a microkernel written in C that we're building on top of. The kernel seems to have been designed with 32-bit machines in mind and I'm running snow leopard. So a friend in the class and I have been trying to hack it into 64-bit addressing. The biggest issue seems to...

How do I load all 1's into a mmx register? Why doesn't this work?

Hi, couldn't seem to find anything besides opinion questions on 64/32 bit stuff when I searched. __asm__ { mov rbx, 0xFFFFffffFFFFffffull movq mm2, rbx } After these 2 instructions the mm2 register holds the value 0x30500004ffffffff according to my xcode debugger (this is inline asm in C++). Now I am new to x86 assembly and my a...

Performance monitor: all heap .NET heap counters are wrong and show zero bytes in use

This worked the other day and all counters (Total committed bytes, %Time in GC, Gen 0 heap size, Gen 1 heap size, Gen 2 heap size and Large object heap size) were all showing explicable amounts. The counters all come from object .NET CLR Memory and use instance w3wp (IIS worker process). However, since this morning, all counters are zer...

Difference in position-independent code: x86 vs x86-64

I was recently building a certain shared library (ELF) targeting x86-64 architecture, like this: g++ -o binary.so -shared --no-undefined ... -lfoo -lbar This failed with the following error: relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC Of course, it means I nee...

x86-64 and far calls / jumps

Quick summary: in x86-64 mode, are far jumps as slow as in x86-32 mode? On the x86 processor, jumps fall into three types: short, with a PC-offset of +/-127 bytes (2 byte instruction) near, with a +/- 32k offset that "rolls around" the current segment (3 byte instruction) far, which can jump anywhere (5 byte instruction) short and n...

Mach-O 64-bit format does not support 32-bit absolute addresses

Hi, I have a sample piece of code that writes the value of the xmm6 register into a memory location. The code is in NASM: value: dd 0 movq [value], xmm6 However I am getting the error when I tried to compile it to macho64 format: 64-bit format does not support 32-bit absolute addresses. Is there a way to resolve this? I am...

Is it possible, and/or advisable to develop Django web applications on OS X (10.6.4 and 10.5.8) using Python 2.6.5 64-bit? Why?

I'm trying to decide on which architecture to choose for developing Django 1.0.x through Django 1.2.1. I've managed to get MySQL, MySQLdb, PIL, and Python 2.65 installed on Snow Leopard using x86 64-bit builds, but I'm curious as to whether or not there is a definitive answer to this question at the moment, and if so, why? Thank you! Mi...