<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://bsccs.stoney-wiki.com/w/index.php?action=history&amp;feed=atom&amp;title=Assembly_Programming%3A_Overview_%26_Conventions</id>
	<title>Assembly Programming: Overview &amp; Conventions - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://bsccs.stoney-wiki.com/w/index.php?action=history&amp;feed=atom&amp;title=Assembly_Programming%3A_Overview_%26_Conventions"/>
	<link rel="alternate" type="text/html" href="https://bsccs.stoney-wiki.com/w/index.php?title=Assembly_Programming:_Overview_%26_Conventions&amp;action=history"/>
	<updated>2026-05-04T20:03:11Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.6</generator>
	<entry>
		<id>https://bsccs.stoney-wiki.com/w/index.php?title=Assembly_Programming:_Overview_%26_Conventions&amp;diff=97&amp;oldid=prev</id>
		<title>Bfh-sts: Created page with &quot;= Assembly Programming: Overview &amp; Conventions = This page introduces x86-64 assembly programming, the syntax conventions used in this course, and the tools involved.  == Introduction == Assembly language (ASM) is a low-level programming language that provides direct access to the CPU’s instruction set.   Unlike high-level languages, assembly operates on registers, memory addresses, and immediate values.  In this course, we use NASM (Netwide Assembler) on GNU/Linux wit...&quot;</title>
		<link rel="alternate" type="text/html" href="https://bsccs.stoney-wiki.com/w/index.php?title=Assembly_Programming:_Overview_%26_Conventions&amp;diff=97&amp;oldid=prev"/>
		<updated>2025-10-20T13:46:01Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;= Assembly Programming: Overview &amp;amp; Conventions = This page introduces x86-64 assembly programming, the syntax conventions used in this course, and the tools involved.  == Introduction == Assembly language (ASM) is a low-level programming language that provides direct access to the CPU’s instruction set.   Unlike high-level languages, assembly operates on registers, memory addresses, and immediate values.  In this course, we use NASM (Netwide Assembler) on GNU/Linux wit...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= Assembly Programming: Overview &amp;amp; Conventions =&lt;br /&gt;
This page introduces x86-64 assembly programming, the syntax conventions used in this course, and the tools involved.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
Assembly language (ASM) is a low-level programming language that provides direct access to the CPU’s instruction set.  &lt;br /&gt;
Unlike high-level languages, assembly operates on registers, memory addresses, and immediate values.&lt;br /&gt;
&lt;br /&gt;
In this course, we use NASM (Netwide Assembler) on GNU/Linux with Intel syntax.  &lt;br /&gt;
Intel syntax is more readable for most beginners and aligns with documentation from Intel and AMD.&lt;br /&gt;
&lt;br /&gt;
== Intel vs. AT&amp;amp;T syntax ==&lt;br /&gt;
There are two dominant syntaxes for x86 assembly:&lt;br /&gt;
* **Intel syntax** – used by NASM, MASM, and most documentation.&lt;br /&gt;
* **AT&amp;amp;T syntax** – used by GNU Assembler (GAS) and older Unix systems.&lt;br /&gt;
&lt;br /&gt;
Main differences in AT&amp;amp;T syntax:&lt;br /&gt;
* Immediate values are prefixed with `$`, e.g. `push $4` instead of `push 4`.&lt;br /&gt;
* Registers are prefixed with `%`, e.g. `inc %eax` instead of `inc eax`.&lt;br /&gt;
* Source and destination are swapped: `add eax, 4` becomes `add $4, %eax`.&lt;br /&gt;
* Instruction size is suffixed to the opcode: `mov ax, bx` becomes `movw %bx, %ax`.&lt;br /&gt;
&lt;br /&gt;
In this course we use **Intel syntax** exclusively.&lt;br /&gt;
&lt;br /&gt;
== Example comparison ==&lt;br /&gt;
Intel syntax:&lt;br /&gt;
 mov eax, 4&lt;br /&gt;
 add eax, 2&lt;br /&gt;
 mov ebx, eax&lt;br /&gt;
&lt;br /&gt;
AT&amp;amp;T syntax:&lt;br /&gt;
 movl $4, %eax&lt;br /&gt;
 addl $2, %eax&lt;br /&gt;
 movl %eax, %ebx&lt;br /&gt;
&lt;br /&gt;
Intel syntax is generally easier to read, especially when addressing memory:&lt;br /&gt;
 lea eax, [rcx + rax*8 - 0x30]&lt;br /&gt;
vs.&lt;br /&gt;
 lea -0x30(%rcx, %rax, 8), %eax&lt;br /&gt;
&lt;br /&gt;
== Why learn assembly ==&lt;br /&gt;
Learning assembly provides insight into how computers actually execute code:&lt;br /&gt;
* How registers, memory, and the stack interact.&lt;br /&gt;
* How arithmetic and logic are performed at CPU level.&lt;br /&gt;
* How operating system services are invoked through syscalls.&lt;br /&gt;
&lt;br /&gt;
It builds a foundation for understanding compilers, reverse engineering, performance optimization, and embedded systems.&lt;br /&gt;
&lt;br /&gt;
[[Category: Assembly Programming]]&lt;/div&gt;</summary>
		<author><name>Bfh-sts</name></author>
	</entry>
</feed>