Skip to main content

Assembly User Input Example Script

Hi Friends,

Welcome Again To My Blog. I hope You all are Enjoying Latest Series of Assembly Tutorials. So, Today Again I am going To share Another piece of Code Of Assembly language Where I tried To Demonstrate how To Take inputs From User And Print Over Screen.

By The Way, If you Are new And Don't Know How To Start, Compile Or Run?
Then, Don't Follow up Our Previous Blog post. Here, it's The List.

1. Hello World In Assembly
2. Find String Length In Assembly Language
3. Subroutine Demo In Assembly language
4. Some Subroutine Functionality Example

Here, its Another Example

 User Input Taking Example In Assembly Language.

;     UserInput
; author : Suraj SIngh Bisht
; Email  :

; Include Other Script
%include 'includable_functions_without_start.asm'
; ====================================================
;              [ Includable File]
; Functions:
;       _strlen
;       _exit
;       _print
;       _printline
; ====================================================

; bss section
 space_user resb 255 ; Reserve 255 Bytes in memory for Userinput

; data section
 string0  db "[+] Please enter your name : ", 0h ; message
 string1  db "[+] hello, ", 0h ; another string

; text section
 global _start ; trigger routine

; start
 ; print string
 mov eax, string0 ; Load String Address
 call _print  ; call print routine

 ; Take user input
 mov eax, 3  ; invoke SYS_READ 
 mov ebx, 0  ; STDIN
 mov ecx, space_user ; Address To Store
 mov edx, 255  ; Address Space Available To Store
 int 80h   ; kernel interpt

 ; print another string
 mov eax, string1 ; Load String address
 call _print  ; call print routine

 ; print user input
 mov eax, space_user ; Load string address
 call _print  ; call print routine

 jmp _exit  ; exit routine

Please Check Github For Latest Error Free Examples Codes. Click here

Related Post

Top Visited

Big List Of Google Dorks For Sqli Injection

List of Keyboard Shortcuts Keys for GNOME Desktop (Kali linux / Linux / Ubuntu/*nix )

Create Simple Packet Sniffer Using Python

how to install burp suite in Linux/Ubuntu 16.04

How to create Phishing Page Using Kali Linux | Webpage Page Cloning Using Kali Linux Social Engineering Toolkit

Best 1000 User-agents List For Web Scraping

How To Install GDB Peda?

Latest Google Dorks List

2 Easiest Way To Enable Monitor Mode in Kali Linux | Airmon-ng | Iwconfig

How To Create Snake Game Using Python And Tkinter - Simple python games