Skip to content

Commit aff6ad6

Browse files
committed
add a new post about assembly
1 parent 0952d66 commit aff6ad6

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

content/posts/Hello_Assembly.md

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
title: "Hello Assembly"
3+
date: 2023-02-05
4+
draft: true
5+
---
6+
7+
The symbols and incantations that make up the assembly-like code. Interestingly, this language for the CPU is closer to the machine code that a computer can understand, providing greater control over the hardware. Reading and writing are more challenging than high-level programming languages like Javascript or Python. The main is using a basic concept of hello world and memory stack. With Today's AI, Cloud, and other buzz words technology stack, it's nice to come back to the roots sometimes and see how things work on a simple level
8+
9+
10+
```asm
11+
# x86 Assembly Basics
12+
13+
.global _start
14+
.intel_syntax
15+
.section .text
16+
17+
# Basic string to be push on teh stacks and write it out to stdout
18+
19+
20+
_start:
21+
push 0x00434241
22+
mov %eax, 4 # write = 4
23+
mov %ebx, 1 # stdout = 1
24+
mov %ecx, %esp
25+
mov %edx, 3
26+
int 0x80
27+
# Exit syscall
28+
mov %eax, 1
29+
mov %ebx, 65
30+
int 0x80
31+
32+
# basic print sting out to stdout
33+
34+
.section .data
35+
message:
36+
37+
```

0 commit comments

Comments
 (0)