• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
Dario Oliveri

Where to start learn x86 assembly

9 posts in this topic

Is there any good starting guide for x86 assembly and C++?

is a x86 program still able to run on a 64 bit machine?
0

Share this post


Link to post
Share on other sites
On t[url="http://www.gamedev.net/topic/626930-assembly-programming/"]his recent thread[/url] several people posted links to useful guides to learn assembly language.

Yes, x86 can run on some 64-bit machines.
1

Share this post


Link to post
Share on other sites
The Art of Assembly Language:
[url="http://maven.smith.edu/~thiebaut/ArtOfAssembly/artofasm.html"]http://maven.smith.edu/~thiebaut/ArtOfAssembly/artofasm.html[/url]

The Author (Randal Hyde) has been nice enough to make his book freely available online. It's probably the best way to learn x86 ASM.

I learned ASM by using the Easy68k emulator for the 6800 processor. It's a bit easier for beginners to pick up than the x86 processor.
1

Share this post


Link to post
Share on other sites
There's also this free book that doesn't assume any prior programming knowledge: [url="http://savannah.nongnu.org/projects/pgubook/"]http://savannah.nongnu.org/projects/pgubook/[/url]
1

Share this post


Link to post
Share on other sites
What are you intending to learn to do with assembly language? Depending on your goals, there might be different resources that are more relevant to what you want to accomplish.
0

Share this post


Link to post
Share on other sites
There aren't that many resources for x86-64 assembly yet (there are plenty for x86-32, though).
A decent tutorial I'd recommend is "Practical x64 Assembly and C++":
[url="http://www.youtube.com/playlist?list=PL0C5C980A28FEE68D&feature=plcp"]http://www.youtube.c...8D&feature=plcp[/url]
[url="http://www.whatsacreel.net76.net/"]http://www.whatsacreel.net76.net/[/url]

See also:
http://www.x86-64.org/documentation/assembly.html
http://stackoverflow.com/questions/254963/best-resources-for-learning-x86-64-assembly
http://software.intel.com/en-us/articles/introduction-to-x64-assembly/ Edited by Matt-D
0

Share this post


Link to post
Share on other sites
[quote name='ApochPiQ' timestamp='1341173106' post='4954635']
What are you intending to learn to do with assembly language? Depending on your goals, there might be different resources that are more relevant to what you want to accomplish.
[/quote]

Well, I think SIMD will be very usefull for me for matrix and vectors calculation (Should I expect compilers to support automatically SIMD in near future?)
And also stack usage, where to get parameters if I'm writing a function that need some assembly.

And if there are differences between compilers I want to do that with Mingw. I'm interested in how much that code is portable and how to detect automatically if code is not portable (for example i know that SDL can detect with instruction sets are supported by the machine it is running on).

I 've done some simple function call with MIPS, nothing more for now. And I started reading x86 material.

P.S. If I write some wrong code should I expect blue screen or just segmentation fault/other errors? Edited by DemonRad
0

Share this post


Link to post
Share on other sites
SIMD you can generally do with [i]intrinsics[/i] in modern compilers; there's no need to mess with raw assembly. As a bonus this will get you code that works on 32-bit and 64-bit compilers, generally speaking.

Stack and parameter usage will vary based on [i]calling conventions[/i] so you can read up on that to find out what you want to know.

Compilers will vary in terms of what inline assembly they support and how well they support it; GCC's assembly syntax is different from MSVC++'s, for instance, although they generally expose the same amount of capability.

Detecting the capabilities of your hardware can be done using instructions like CPUID and other functionality; have a google for CPUID and you should find some resources on handling that.



Screwing up your assembly language in a modern OS will probably just net you a process crash; it's pretty hard to drop a system that way these days.
2

Share this post


Link to post
Share on other sites
[quote name='DemonRad' timestamp='1341343135' post='4955412']
Well, I think SIMD will be very usefull for me for matrix and vectors calculation (Should I expect compilers to support automatically SIMD in near future?)
[/quote]
Intrinsics, as have already been mentioned are the easiest way to use SIMD. GCC, Clang, MSVC and Intel's compiler all support the same API.

It's more and more the case that compiler's will be able to automatically vectorize code. Recent versions of the same 4 compilers I mentioned can do this to an extent. I say to an extent, because there are constraints on e.g. alignment, which might inhibit potential vectorization opportunites in some cases. GCC has a command line switch that will tell you when it would have auto-vectorized some code but something stopped it (unknown alignment, potential aliasing, ...). EDIT: can't find it in the manual now, perhaps it has been removed.

[quote]
And if there are differences between compilers I want to do that with Mingw.
[/quote]
It's usually the case that compilers for a given platform tend agree on an ABI for C (though the object file formats might differ so linking them may be problematic in practice).

I like the netwide assembler ("nasm") as it allows you to produce object files in a number of formats. So I could assemble the same source in to two object files, one compatible with MinGW and the other compatible with Visual C++.

For C++, things are less clear. Particularly on Windows each C++ compiler tends to do its own thing w.r.t things like name mangling, virtual table ordering, exception propagation, etc. So if you're interfacing with C++ objects, you'd potentially have to write one assembler file per compiler in this case. OTOH, if you're using assembly you're unlikely to be writing code to throw exceptions, or use vtables, or whatever, and will instead be able to restrict yourself to writing code using the C calling convention. Edited by e?dd
1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0