Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Joker
;nasm 2.11.08 section .data mas: db 'more than or equal to 20',10 ; 'Hello world!' plus a linefeed character masLen: equ $-mas ; Length of the 'Hello world!' string menos: db 'menos de 20',10 menosLen: equ $-menos joker: db 'THE JOKER', ' ' jokerLen: equ $-menos section .text global _start _start: ;PROCESSING SECTION mov si, 0 mov ax, [iNumber] cmp ax, 20 jb displaymenos jae displaymas ;OUTPUT SECTION displaymas mov eax,4 ; The system call for write (sys_write) mov ebx,1 ; File descriptor 1 - standard output mov ecx,mas ; Put the offset of hello in ecx mov edx, masLen ; helloLen is a constant, so we don't need to say ; mov edx,[helloLen] to get it's actual value int 80h ; Call the kernel jmp exit displaymenos mov eax,4 mov ebx,1 mov ecx,menos mov edx, menosLen int 80h jokerloop: mov eax,4 mov ebx,1 mov ecx, joker mov edx, jokerLen int 80h add si, 1 cmp si, 5 jb jokerloop exit mov eax,1 ; The system call for exit (sys_exit) mov ebx,0 ; Exit with return code of 0 (no error) int 80h;
run
|
edit
|
history
|
help
0
dKleinhen Lab #1
intfunct_64.asm
Compare data in AL and AH
fdsafdsfdsfsd
fdsfdsaffsdaf
assembly program to incease the entered number by 1
bcfsfssdffs
hello.asm
HelloWorldAssem
dsafdafdsfasdfsd