473,405 Members | 2,445 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

[x86 Assembly] How can I store user-input data to bx register?

1
I am unsure of how to actually store user-input data to a register. I would like to prompt the user for a signed base-10 integer, then store that integer to the bx register. What I have does not seem to be actually storing any data from what I can tell:
Expand|Select|Wrap|Line Numbers
  1. ;get user input
  2.  
  3.    mov   ah, 0Ah
  4.    int   21h
  5.  
  6.  
  7. while:
  8.     mov   bx, ax        ;save char to bx
  9.     cmp   ax, 13        ;is char = carriage return?
  10.     jmp   endwhile      ;if so, we're done
  11.     int   21h           ;get another char
  12.     loop  while
  13. endwhile:
  14.     ret                 ;end loop
  15.  
  16. ;print data stored in bx to console
  17.  
  18.     mov   ah, 09
  19.     mov   dx, [bx]
  20.     int   21h
  21.  
Anything in particular sticking out that I'm doing wrong?
Mar 19 '15 #1
0 3525

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: PearCZ | last post by:
Hi, I am trying to store binary data (e. g. image) in MS SQL Server 2000 column which data type is . I understand I could store binary data easily in MS SQL type but I have only column...
1
by: Nukeation | last post by:
My app has to temporarily use the clipboard - and while doing so, it would delete any existing data which the user has copied (possibly from other applications). What I want to do is temporarily...
4
by: TP | last post by:
Hi, I have a requirement that wants me to store binary data such as word, ppt, jpg, gif etc documents in db2. I wonder how developers normally store this kind of data in db2. 1. I guess one...
1
by: pei_world | last post by:
hi I am new to C# programming. can anyone tell me what is the standard way to store high sensitive user data for application, so that application next run can get back those data.
3
by: pei_world | last post by:
hi I am new to C# programming. can anyone tell me what is the standard way to store high sensitive user data for application, so that application next run can get back those data.
1
by: http://www.visual-basic-data-mining.net/forum | last post by:
Hello, I am working on Treeview control. I want that, user create tree according to his requirement, can add topic under any node. Then just click update and that treeview data to be stored in...
4
by: Piotrekk | last post by:
Hi everyone. I would like to ask about good habid, of keeping program data. I have written in C# Server and Client applications, and now i need to care about authorization. What i mean is that...
3
by: noridotjabi | last post by:
Say I'm writting a program. In this program for some reason I need to store data somewere were I will be able to access it again. I don't want to store it in a file because then it could be...
2
by: Alex | last post by:
Hey Guys.. I'm just now starting to learn VB 2005, but I have a question that might help me in the long run. I hope to write applications which store user data, and without wanting the user to...
0
by: youngwe | last post by:
Professionals please to help. I have got problem. This; Data of the dynamic text, go to the php. Php is a data register mysql. But; data register double. This problem spring flash. Php to php data...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.