Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 24 Apr 2010
Offline Last Active Private

Posts I've Made

In Topic: Convert Wma To Wav

Yesterday, 02:22 PM

Format Factory can handle most conversions




But, like Absurdon, I also use Audacity for audio conversions.

In Topic: Game Design Course Idea

23 July 2016 - 01:45 PM

Yeah, they could come through the internet and get you while you sleep.



In Topic: Object Referencing

16 July 2016 - 06:19 PM

Have you considered simply using a managed language?

In Topic: Collision Meshes / Aabb Generation

16 July 2016 - 02:23 PM

AABBs are for broad phase detection. It sounds like you're trying to use them for narrow phase.



In Topic: Questions About Storing Opcodes With Operands

15 July 2016 - 11:08 PM

In x86 the registers are


general purpose registers:

EAX - free to use, holds function return values

EBX - free to use

ECX - free to use

EDX - free to use

these are 32 bit registers, but can be referred to as 16 bits AX,BX,CX,DX or 8 bits AH/AL/BH/BL/CH/CL/DH/DL


pointer registers:

ESI - source index, which is paired with...

EDI - destination index - these two are used for rapidly advancing pointer values when performing work that reads from one buffer and writes to another

EBP - the base pointer - points to the base of the stack frame, convenient for referring to function arguments or local variables, but not really required since the compiler can work out the math from...

ESP - the stack pointer - points to the top of the stack

EIP - index pointer - holds the address of the next instruction to be executed (after the currently executing one), can't be mov'd to but jmp or call can set its value


segment registers (used by virtual memory model):

CS - code segment - pointer to page that holds the unpacked exe file (or whatever. the bytecode is in this page)

DS - data segment - pointer to page that holds the heap

SS - stack segment - pointer to page that holds the stack

ES - for an extra page

FS - for an extra page

GS - for an extra page


flags register:

EFLAGS - a register used to store binary flags set by various common operations - allows for basic branching logic by remembering the results of comparisons, etc. For example, when you use greater than/less than in C you're setting the SIGN flag, and a conditional jump statement like JLE (jump if less than or equal to) will read the sign flag when deciding whether to jump, so the statement:


if(x < 2) {





could theoretically be compiled as:


CMP 2,x //compare 2 to x - this performs an "implicit subtraction", that is it executes "2 - x" but does not store the result in a register, though it does set the sign bit and zero bit in EFLAGS according to the result of the subtraction.

JLE B //if 2 was less than or equal to x then jump ahead to B, otherwise just keep going

A //compiled code of A

B //compiled code of B


There are also usually sets of special registers depending on the feature set of the architecture. (usually things like SSE or MMX)


Old instruction set reference and general system explanation: http://css.csail.mit.edu/6.858/2015/readings/i386.pdf

Very old discussion of exe format: https://msdn.microsoft.com/en-us/library/ms809762.aspx


Modern resource (64 bit architecture): http://www.intel.com/content/www/us/en/processors/architectures-software-developer-manuals.html