School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become an Expert!

Join 306,986 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,961 people online right now. Registration is fast and FREE... Join Now!




assembler language

 

assembler language, this code only enters one digit, how can I input more than one

screspo

10 Oct, 2009 - 06:09 PM
Post #1

New D.I.C Head
*

Joined: 10 Oct, 2009
Posts: 1

CODE

;***input***
    mov ah,1
    int 21h
    push dx
      
   ;***convert to intiger***  
    sub al,30h
    pop dx
    mov number1,al


** Edit ** code.gif

This post has been edited by no2pencil: 10 Oct, 2009 - 08:02 PM

User is offlineProfile CardPM
+Quote Post


wildgoose

RE: Assembler Language

10 Oct, 2009 - 08:00 PM
Post #2

D.I.C Regular
Group Icon

Joined: 29 Jun, 2009
Posts: 429



Thanked: 55 times
Dream Kudos: 25
Expert In: Assembly,C,C++

My Contributions
Since you're using DOS. Something like this?

Asm

org 100h
Start:
mov dx,offset buffer
mov ah,0ah ; Input a string into buffer DS:DX
int DOS
; DS:DX [0] = buffer size [1] = # of chars read [2...N-1] chars

mov ah,4ch
int DOS

buffer db 64, ?, 64 dup( ' ' )
end Start

User is offlineProfile CardPM
+Quote Post

no2pencil

RE: Assembler Language

10 Oct, 2009 - 08:03 PM
Post #3

i R L33t Skiddie, k?
Group Icon

Joined: 10 May, 2007
Posts: 13,488



Thanked: 303 times
Dream Kudos: 2875
Expert In: Goofing Off

My Contributions
** Moved to Assembly **
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic

Time is now: 11/21/09 05:35AM

Live Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month