John Delmark Aguilar
Would you like to react to this message? Create an account in a few clicks or log in to continue.
John Delmark Aguilar

Personal Forum
 
HomeSearchLatest imagesRegisterLog in

 

 Display Message and String input *10 Characters Only*

Go down 
AuthorMessage
dElmARk
Admin
Admin
dElmARk


Posts : 92
Join date : 09/04/2012

Display Message and String input *10 Characters Only* Empty
PostSubject: Display Message and String input *10 Characters Only*   Display Message and String input *10 Characters Only* Icon_minitimeMon Dec 10, 2012 1:29 pm

Code:
    ; anEcho : Compiled with A86 (http://eji.com/a86/)
    ; This program shows how to get user input with echo.
    ;
    mov ah, 09h
    mov dx, askName;
    int 21h    ; Ask for user name
    mov cx, 0ah
    mov si, userName ; Place to store the user name
    getName:
    mov ah, 01h
    int 21h    ; Get input with echo
    cmp al, 0dh    ;
    je printQuit ; Quit if Carriage-return
    mov [si], al ; Put entered char in user name
    inc si ; move the position
    loop getName;    ; Keep going (looping)
    printQuit:
    mov ah, 09h
    mov dx, b4userName;
    int 21h    ; Print the finished user name
    quit:
    int 20h    ; *** DROP TO DOS ***
    askName:    db 'Enter your name (up to 10 chars) and press enter: $'
    b4UserName:    db 0dh, 0ah
    userName:    db '$$$$$$$$$$$$$$$$'
Back to top Go down
https://delmark.forumtl.com
 
Display Message and String input *10 Characters Only*
Back to top 
Page 1 of 1
 Similar topics
-
» Display Message and Character input
» Displaying Message

Permissions in this forum:You cannot reply to topics in this forum
John Delmark Aguilar :: dElmARk Productions :: Assembly Language-
Jump to: