Skip to content

The Move Statement

Raph Hennessy edited this page Nov 21, 2015 · 2 revisions

Much like Assembly, Q lets you change individual values stored in the CPU registers right within the Q syntax. Unlike languages such as C, you do not have to use impractical or obscure mechanisms such as

__asm__ __volatile__ ("mov eax ebx");

Instead, Q lets you do perform that same action of copying the value stored in the eax register into the ebx register using a much easier to read and understand syntax like demonstrated below

move @eax into @ebx;

Although an understanding of how registers work is obviously still required to use the move statement, this method of changing values in registers is a lot easier than in other languages such as C, or even Assembly depending how you look at it.

Clone this wiki locally