fork download
  1. section .text
  2. global _start ; Entry point for the program
  3.  
  4. _start:
  5. ; Step 1: Load values into two registers
  6. MOV EAX, 5 ; Load the value 5 into register EAX
  7. MOV EBX, 10 ; Load the value 10 into register EBX
  8.  
  9. ; Step 2: Add the values in EAX and EBX, store result in ECX
  10. ADD ECX, EAX ; Add the value of EAX to ECX (ECX = EAX + 0 initially)
  11. ADD ECX, EBX ; Add the value of EBX to ECX (ECX = 5 + 10 = 15)
  12.  
  13. ; Now ECX holds the result 15
  14.  
  15. ; Step 3: Exit the program (no output to the screen)
  16. MOV EAX, 1 ; syscall number for exit (1)
  17. XOR EBX, EBX ; Exit code 0
  18. INT 0x80 ; Trigger interrupt to invoke syscall and exit the program
  19.  
Success #stdin #stdout 0s 5288KB
stdin
Standard input is empty
stdout
Standard output is empty