%macro scall 4
mov rax,%1
mov rdi,%2
mov rsi,%3
mov rdx,%4
syscall
%endmacro
section .data
m db "Harsh34"
l equ $-m
m1 db "Enter the Password ",0ah
l1 equ $-m1
m2 db "Password Matched",0ah
l2 equ $-m2
m3 db "Password doesn't match",0ah
l3 equ $-m3
section .bss
string resb 50
length resb 16
section .text
global _start
_start:
scall 1,1,m1,l1
scall 0,0,string,50
mov [length],rax
mov ecx,[length]
mov esi,m
mov edi,string
repe cmpsb
jecxz equal
scall 1,1,m3,l3
jmp exit
equal:
scall 1,1,m2,l2
exit:
mov rax, 60
mov rdi, 0
syscall
To embed this project on your website, copy the following code and paste it into your website's HTML: