![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Newbie
Join Date: Feb 2005
Posts: 4
Rep Power: 0
![]() |
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!! |
|
|
|
|
|
#2 |
|
Professional Programmer
|
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. |
|
|
|
|
|
#3 |
|
Newbie
Join Date: Feb 2005
Posts: 4
Rep Power: 0
![]() |
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 |
|
|
|
|
|
#4 |
|
Newbie
Join Date: Feb 2005
Posts: 4
Rep Power: 0
![]() |
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... ![]() |
|
|
|
|
|
#5 |
|
Newbie
Join Date: Feb 2005
Location: Charlottesville, VA (rated #1 place to live)
Posts: 25
Rep Power: 0
![]() |
assembler?
What assembler are you using? I can help with TASM, DEBUG.EXE, or NASM but I know jack about GNU
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|