daily pastebin goal
3%
SHARE
TWEET

Untitled

a guest May 16th, 2018 143 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. section .text
  2.    global _start            ;must be declared for using gcc
  3.    
  4. _start:                     ;tell linker entry point
  5.    mov    al, 5             ;getting 5 in the al
  6.    mov    bl, 3             ;getting 3 in the bl
  7.    or     al, bl            ;or al and bl registers, result should be 7
  8.    add    al, byte '0'      ;converting decimal to ascii
  9.    
  10.    mov    [result],  al
  11.    mov    eax, 4
  12.    mov    ebx, 1
  13.    mov    ecx, result
  14.    mov    edx, 1
  15.    int    0x80
  16.    
  17. outprog:
  18.    mov    eax,1             ;system call number (sys_exit)
  19.    int    0x80              ;call kernel
  20.    
  21. section    .bss
  22. result resb 1
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top