Search
 
SCRIPT & CODE EXAMPLE
 

ASSEMBLY

x86 assembly hello world

; ----------------------------------------------------------------------------------------
; Writes "Hello, World" to the console using only system calls. Runs on 64-bit Linux only.
; To assemble and run:
;
;     nasm -felf64 hello.asm && ld hello.o && ./a.out
; ----------------------------------------------------------------------------------------

          global    _start

          section   .text
_start:   mov       rax, 1                  ; system call for write
          mov       rdi, 1                  ; file handle 1 is stdout
          mov       rsi, message            ; address of string to output
          mov       rdx, 13                 ; number of bytes
          syscall                           ; invoke operating system to do the write
          mov       rax, 60                 ; system call for exit
          xor       rdi, rdi                ; exit code 0
          syscall                           ; invoke operating system to exit

          section   .data
message:  db        "Hello, World", 10      ; note the newline at the end
Comment

PREVIOUS NEXT
Code Example
Assembly :: ror loading webview: Error: Could not register service workers: InvalidStateError: Failed to register a ServiceWorker: The document is in an invalid state.. 
Assembly :: regex find a word index of all matches 
Assembly :: include code in latex 
Assembly :: how to open chrome in vbscript 
Assembly :: glsl uniform struct 
Assembly :: visual studio change assembly name 
Assembly :: dd utility skip 
Assembly :: tqdm iterate over range 
Javascript :: jquery vslidation remove spaces from input 
Javascript :: javascript months array 
Javascript :: mac address validation regex 
Javascript :: redirect to link using jquery on new tab 
Javascript :: how to insatll react-router-dom 
Javascript :: kill all node processes 
Javascript :: remove attribute in jquery 
Javascript :: changing columns for table requires doctrine dbal install doctrine/dbal 
Javascript :: get tomorrows date using moment 
Javascript :: for each loop class jquery 
Javascript :: flash input 
Javascript :: add 24 hours to string date javascript 
Javascript :: react native rotate 
Javascript :: javascript random color generator 
Javascript :: Uncaught TypeError: firebase_app__WEBPACK_IMPORTED_MODULE_4__.default.storage is not a function 
Javascript :: react native cover image 
Javascript :: how to use another port in angular 
Javascript :: javascript clear div 
Javascript :: react native cover image in parent view 
Javascript :: apex charts cdn 
Javascript :: how to displayan inteiger to a tenth in javascript 
Javascript :: showing difference between dates in minutes js 
ADD CONTENT
Topic
Content
Source link
Name
6+3 =