Create learn asm repo

Repository for learning assembly language
This commit is contained in:
2025-05-24 11:05:24 +03:00
commit 9165f49e62
20 changed files with 188 additions and 0 deletions
+45
View File
@@ -0,0 +1,45 @@
slen:
push ebx
mov ebx, eax
nextchar:
cmp byte [eax], 0
jz finished
inc eax
jmp nextchar
finished:
sub eax, ebx
pop ebx
ret
sprint:
push edx
push ecx
push ebx
push eax
call slen
mov edx, eax
pop eax
mov ecx, eax
mov ebx, 1
mov eax, 4
int 80h
pop ebx
pop ecx
pop edx
ret
quit:
mov ebx, 0
mov eax, 1
int 80h
ret