•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Assembly section within the Software Development category of DaniWeb, a massive community of 423,490 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 4,710 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: 377 | Replies: 0
![]() |
•
•
Join Date: May 2008
Posts: 1
Reputation:
Rep Power: 0
Solved Threads: 0
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
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
![]() |
•
•
•
•
•
•
•
•
DaniWeb Assembly Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
age amd avatar blue gene chips data database development dos energy enterprise firefox flash gecko gmail handsets hardware ibm ibm. news inbox it laptop leak linux mail medicine memory memory cards microsoft mozilla news nobel prize open source openoffice pc ps3 red hat reliability space storage sun supercomputer supercomputing technology trends ubuntu wireless working x86 yahoo
- Computer Architecture Reference (Computer Science and Software Design)
- IE6/IE7 unexpectedly drops the PHP Session ID cookie (PHPSESSID) (PHP)
- memory management in wndows 2000 (Windows NT / 2000 / XP / 2003)
- Structure for low memory, 'seen' queries. (Computer Science and Software Design)
- Basic Windows Set-Up Problem? (Windows NT / 2000 / XP / 2003)
- Setting a static page file (virtual memory) (Windows tips 'n' tweaks)
- Problems with booting up (Troubleshooting Dead Machines)
- How to set up password to keep Windows from starting??? (Windows NT / 2000 / XP / 2003)
- Fast data storage (C++)
Other Threads in the Assembly Forum
- Previous Thread: How to convert assembly code to any use language ..
- Next Thread: Wierd Chars


Linear Mode