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  : surajsinghbisht054@gmail.com
;

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




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


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

; text section
SECTION .text
 global _start ; trigger routine

; start
_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

Create Simple Packet Sniffer Using Python

how to install burp suite in Linux/Ubuntu 16.04

Big List Of Google Dorks For Sqli Injection

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

Latest Google Dorks List

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

What is the use of Pseudo header in TCP/UDP packets?

how to configure burpsuite with firefox?

Python Beautiful Soup Module - Tutorial - Part 2

Create Ping Sweeping Script Using Python