Create learn asm repo
Repository for learning assembly language
This commit is contained in:
Executable
BIN
Binary file not shown.
@@ -0,0 +1,28 @@
|
||||
|
||||
SECTION .data
|
||||
msg db 'Le Chat!', 0Ah
|
||||
|
||||
SECTION .text
|
||||
global _start
|
||||
|
||||
_start:
|
||||
mov ebx, msg
|
||||
mov eax, ebx
|
||||
|
||||
nextchar:
|
||||
cmp byte [eax], 0
|
||||
jz finished
|
||||
inc eax
|
||||
jmp nextchar
|
||||
|
||||
finished:
|
||||
sub eax, ebx
|
||||
mov edx, eax
|
||||
mov ecx, msg
|
||||
mov ebx, 1
|
||||
mov eax, 4
|
||||
int 80h
|
||||
|
||||
mov ebx, 0
|
||||
mov eax, 1
|
||||
int 80h
|
||||
Binary file not shown.
Executable
BIN
Binary file not shown.
@@ -0,0 +1,26 @@
|
||||
|
||||
SECTION .data
|
||||
msg db 'Le Chat!', 0Ah
|
||||
|
||||
SECTION .text
|
||||
global _start
|
||||
|
||||
_start:
|
||||
mov ecx, msg
|
||||
mov edx, ecx
|
||||
|
||||
nextchar:
|
||||
cmp byte [edx], 0
|
||||
jz finished
|
||||
inc edx
|
||||
jmp nextchar
|
||||
|
||||
finished:
|
||||
sub edx, ecx
|
||||
mov ebx, 1
|
||||
mov eax, 4
|
||||
int 80h
|
||||
|
||||
mov ebx, 0
|
||||
mov eax, 1
|
||||
int 80h
|
||||
Binary file not shown.
Reference in New Issue
Block a user