User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Assembly section within the Software Development category of DaniWeb, a massive community of 425,818 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,030 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Assembly advertiser: Programming Forums
Views: 381 | Replies: 0
Reply
Join Date: May 2008
Posts: 1
Reputation: kjstreet is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
kjstreet kjstreet is offline Offline
Newbie Poster

Set memory for storage

  #1  
May 19th, 2008
I am taking an Assembly language class. I have a project to allow the user to enter some text and then store it in a specific memory. I have the code to allow the user to enter text, but it keeps putting it in the wrong place. How do I change and tell it where to put it?

Here is my code so far:

.ORIG x3000 ; We'll place our trap in memory at address x3000

LEA R1,HELLO

AGAIN LDR R2,R1,#0

BRz NEXT

ADD R1,R1,#1

BR AGAIN

NEXT LEA R0,PROMPT

TRAP X22

LD R3, NEGENTER

AGAIN2 TRAP X20

TRAP X21

ADD R2,R0,R3

BRz CONT

STR R0, R1, #0

ADD R1, R1, #1

BR AGAIN2

CONT AND R2,R2,#0

STR R2, R2, #0

LEA R0, HELLO

TRAP X22

TRAP X25

NEGENTER .FILL XFFF6

PROMPT .STRINGZ "Please enter your name: "

HELLO .STRINGZ "HELLO,"

.BLKW #25



.END
AddThis Social Bookmark Button
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb Assembly Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the Assembly Forum

All times are GMT -4. The time now is 4:11 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC