<?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=Workflow_in_Practice%3A_Edit%E2%80%93Assemble%E2%80%93Link%E2%80%93Run%E2%80%93Debug</id>
	<title>Workflow in Practice: Edit–Assemble–Link–Run–Debug - 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=Workflow_in_Practice%3A_Edit%E2%80%93Assemble%E2%80%93Link%E2%80%93Run%E2%80%93Debug"/>
	<link rel="alternate" type="text/html" href="https://bsccs.stoney-wiki.com/w/index.php?title=Workflow_in_Practice:_Edit%E2%80%93Assemble%E2%80%93Link%E2%80%93Run%E2%80%93Debug&amp;action=history"/>
	<updated>2026-05-04T20:18:59Z</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=Workflow_in_Practice:_Edit%E2%80%93Assemble%E2%80%93Link%E2%80%93Run%E2%80%93Debug&amp;diff=86&amp;oldid=prev</id>
		<title>Bfh-sts: Created page with &quot;= Workflow in Practice: Edit–Assemble–Link–Run–Debug = This page summarizes the entire development process for assembly programs, showing how editing, assembling, linking, running, and debugging fit together.  == The complete workflow == A typical software development process in low-level programming consists of five main phases:  1. **Editing** – Writing and commenting the source code.   2. **Assembling** – Translating the human-readable source into machine...&quot;</title>
		<link rel="alternate" type="text/html" href="https://bsccs.stoney-wiki.com/w/index.php?title=Workflow_in_Practice:_Edit%E2%80%93Assemble%E2%80%93Link%E2%80%93Run%E2%80%93Debug&amp;diff=86&amp;oldid=prev"/>
		<updated>2025-10-20T13:43:08Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;= Workflow in Practice: Edit–Assemble–Link–Run–Debug = This page summarizes the entire development process for assembly programs, showing how editing, assembling, linking, running, and debugging fit together.  == The complete workflow == A typical software development process in low-level programming consists of five main phases:  1. **Editing** – Writing and commenting the source code.   2. **Assembling** – Translating the human-readable source into machine...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= Workflow in Practice: Edit–Assemble–Link–Run–Debug =&lt;br /&gt;
This page summarizes the entire development process for assembly programs, showing how editing, assembling, linking, running, and debugging fit together.&lt;br /&gt;
&lt;br /&gt;
== The complete workflow ==&lt;br /&gt;
A typical software development process in low-level programming consists of five main phases:&lt;br /&gt;
&lt;br /&gt;
1. **Editing** – Writing and commenting the source code.  &lt;br /&gt;
2. **Assembling** – Translating the human-readable source into machine code (object files).  &lt;br /&gt;
3. **Linking** – Combining all object files into one executable.  &lt;br /&gt;
4. **Running** – Executing the program to test functionality.  &lt;br /&gt;
5. **Debugging** – Finding and fixing errors or logic issues.&lt;br /&gt;
&lt;br /&gt;
== 1. Editing ==&lt;br /&gt;
* Write code in a text editor of your choice (e.g., VS Code, nano, vim).  &lt;br /&gt;
* Save files with the `.asm` extension.  &lt;br /&gt;
* Use comments generously to document each instruction and purpose.  &lt;br /&gt;
&lt;br /&gt;
Good commenting is crucial.  &lt;br /&gt;
Poorly documented assembly code quickly becomes unreadable and unmaintainable.&lt;br /&gt;
&lt;br /&gt;
== 2. Assembling ==&lt;br /&gt;
Use NASM or another assembler to translate your code into an object file.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
```&lt;br /&gt;
&lt;br /&gt;
nasm -f elf64 -g -F dwarf eatsyscall64.asm -o eatsyscall64.o&lt;br /&gt;
&lt;br /&gt;
```&lt;br /&gt;
&lt;br /&gt;
Common options:&lt;br /&gt;
* `-f elf64`: output format for 64-bit Linux.  &lt;br /&gt;
* `-g`: include debug information.  &lt;br /&gt;
* `-F dwarf`: specify DWARF debug format.  &lt;br /&gt;
* `-o file.o`: output file name.  &lt;br /&gt;
&lt;br /&gt;
If you get errors or warnings, read them carefully and correct your source before proceeding.&lt;br /&gt;
&lt;br /&gt;
== 3. Linking ==&lt;br /&gt;
Use `ld` (the GNU linker) to link one or more object files into a runnable executable.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
```&lt;br /&gt;
&lt;br /&gt;
ld -o eatsyscall64 eatsyscall64.o&lt;br /&gt;
&lt;br /&gt;
```&lt;br /&gt;
&lt;br /&gt;
The linker resolves addresses, combines code and data sections, and creates an ELF executable ready for execution.&lt;br /&gt;
&lt;br /&gt;
== 4. Running ==&lt;br /&gt;
Run the resulting program directly from the shell:&lt;br /&gt;
```&lt;br /&gt;
&lt;br /&gt;
./eatsyscall64&lt;br /&gt;
&lt;br /&gt;
```&lt;br /&gt;
If everything worked, it should print:&lt;br /&gt;
```&lt;br /&gt;
&lt;br /&gt;
Eat at Joe’s!&lt;br /&gt;
&lt;br /&gt;
```&lt;br /&gt;
&lt;br /&gt;
If the program crashes, check for missing system calls, register misuse, or incorrect data lengths.&lt;br /&gt;
&lt;br /&gt;
== 5. Debugging ==&lt;br /&gt;
If the program does not behave as expected, use a debugger such as gdb.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
```&lt;br /&gt;
&lt;br /&gt;
gdb eatsyscall64&lt;br /&gt;
(gdb) break _start&lt;br /&gt;
(gdb) run&lt;br /&gt;
(gdb) step&lt;br /&gt;
(gdb) info registers&lt;br /&gt;
&lt;br /&gt;
```&lt;br /&gt;
&lt;br /&gt;
With gdb you can execute one instruction at a time, inspect registers and memory, and verify that the program behaves as intended.&lt;br /&gt;
&lt;br /&gt;
== Automating the process ==&lt;br /&gt;
To avoid repeating the same commands, use a makefile:&lt;br /&gt;
```&lt;br /&gt;
&lt;br /&gt;
make&lt;br /&gt;
make clean&lt;br /&gt;
&lt;br /&gt;
```&lt;br /&gt;
This ensures consistent, automated builds and reduces human error.&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
The full cycle can be summarized as:&lt;br /&gt;
&lt;br /&gt;
```&lt;br /&gt;
&lt;br /&gt;
Edit  →  Assemble  →  Link  →  Run  →  Debug  →  Repeat&lt;br /&gt;
&lt;br /&gt;
```&lt;br /&gt;
&lt;br /&gt;
Following this workflow ensures a structured and reliable development process, even when working close to the hardware.&lt;br /&gt;
&lt;br /&gt;
[[Category: Development Process]]&lt;/div&gt;</summary>
		<author><name>Bfh-sts</name></author>
	</entry>
</feed>