Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Feb 22nd, 2005, 12:44 AM   #1
samurai
Newbie
 
Join Date: Feb 2005
Posts: 4
Rep Power: 0 samurai is on a distinguished road
Unhappy Assembly

I have a prob here, hope you guys can help me out...i havent used assembly language for 4-5years now so kinda rusty...

just need a little help here...i just want to create a program on which a user will type in a word or words (string max of 80 chars) and my program will check if the user have a terminating char at the end of the word or words, for ex., if the user type in "hello world!", the terminating char is "!", if the program sees the "!", it will display a message, else a error message.


Thanks in advance...hope you guys can help me out!


happy coding!!
samurai is offline   Reply With Quote
Old Feb 22nd, 2005, 10:03 AM   #2
Dizzutch
Professional Programmer
 
Dizzutch's Avatar
 
Join Date: Dec 2004
Location: Worcester, MA
Posts: 441
Rep Power: 4 Dizzutch is on a distinguished road
Send a message via ICQ to Dizzutch Send a message via AIM to Dizzutch Send a message via MSN to Dizzutch Send a message via Yahoo to Dizzutch
where are you stuck? did you try anything at all? I'm sure once you sit down and start coding/designing it'll come back to ya.
let us know if you have specific coding questions. Unfortunately most of us don't have time to do all of ou coding for you.
__________________
naked pictures of you | PFO F@H stats
Dizzutch is offline   Reply With Quote
Old Feb 22nd, 2005, 10:15 AM   #3
samurai
Newbie
 
Join Date: Feb 2005
Posts: 4
Rep Power: 0 samurai is on a distinguished road
well, i'm just refreshing my memory with regards to assembly..

just started coding some of the scripts but not really sure where to start...

%include "asm_io.inc"

.data
prompt1 db "Enter string (max of 80 characters): ", $
prompt2 db "Do you want to continue (y/n)? ", $
error1 db "Error: Null input, please try again ",$
error2 db "Error: No string terminator, please try again ",$

.code

just that one

thanks
samurai is offline   Reply With Quote
Old Feb 22nd, 2005, 11:50 AM   #4
samurai
Newbie
 
Join Date: Feb 2005
Posts: 4
Rep Power: 0 samurai is on a distinguished road
i made the rountine or the functions in javascript i just dont know how to do it in assembly..

%include "asm_io.inc"

.data
prompt1 db "Enter string (max of 80 characters): ", $
prompt2 db "Do you want to continue (y/n)? ", $
error1 db "Error: Null input, please try again ",$
error2 db "Error: No string terminator, please try again ",$

.code
if (string == ""){
message "Error: Null input, please try again ", $}
else{
if (string.length > 80) {
message "You have exceeded the maximum length, please try again ",$}
else {
for (i = 0; i < string.length; i++)
if ((string.charAt(i)) != "!") {
if ((string.charAt(i)) != "?") {
intCount = intCount + 1;
elseif (string.length == intCount){
message "Error: No string terminator, please try again ", $
}
else
message "string"}
else
message (palindrome)}
}
}

Thanks in advance...hope somebody can help me out...
samurai is offline   Reply With Quote
Old Feb 22nd, 2005, 7:10 PM   #5
Christian_Rosenkreuz_777
Newbie
 
Join Date: Feb 2005
Location: Charlottesville, VA (rated #1 place to live)
Posts: 25
Rep Power: 0 Christian_Rosenkreuz_777 is on a distinguished road
assembler?

What assembler are you using? I can help with TASM, DEBUG.EXE, or NASM but I know jack about GNU
Christian_Rosenkreuz_777 is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 8:43 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC