Programming Forums
User Name Password Register
 

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

 
 
Thread Tools Display Modes
Prev Previous Post in Thread   Next Post in Thread Next
Old Mar 12th, 2008, 3:03 PM   #1
Vb Programmer
Newbie
 
Join Date: Mar 2008
Posts: 5
Rep Power: 0 Vb Programmer is on a distinguished road
Sim8086

I am creating a menu based program which asks the user to enter a menu option then that option performs which ever task is required, for example if the user presses option 1 it will prompt them to type in a string and then once they have done this it goes back to the main menu and the user enters another option, the bit where im stuck at is getting the string that the user entered and print it out in reverse, without space and vowels and in capitals, if sum 1 cud help i would appreciate it.

here is my code so far

StartofProgram:

call ClearScreen

call PrintMenu

call UserChoice


cmp Choice, '1'
jne try_1
mov AH, 0
mov AL, 7
int 16

mov AH, 9
lea DX, Message1
int 33

call NewLine
call NewLine

mov AH, 63
mov BX, 0
mov CX, 25
lea DX, UserText
int 33
sub AX, 2
mov Length, AX
jmp StartofProgram
try_1:

cmp Choice, '2'
jne try_2
call ClearScreen
mov AH, 64
lea DX, UserText
mov CX, 25
mov BX, 1
int 33

mov AH, 9
call NewLine
lea DX, Message2
int 33

mov AH, 1
int 33

call ClearScreen

jmp StartofProgram
try_2:

cmp Choice, '3'
jne try_3
call ClearScreen
/'/' code need to print string in reverse
jmp StartofProgram
try_3:

cmp Choice, '4'
jne try_4
call ClearScreen
/'/' code need to print string without spaces and vowels
jmp StartofProgram
try_4:

cmp Choice, '5'
jne try_5
call ClearScreen
/'/' code need to print string in CAPITALS
jmp StartofProgram
try_5:

cmp Choice, '6'
jne try_6
call ClearScreen
/'/' code need to print string in cipher code
jmp StartofProgram
try_6:

cmp Choice, '9'
jne try_7
jmp EndofProgram
try_7:

EndofProgram:            
hlt

crlf DB 13,10,36
Text1 DB 'ASSIGNMENT MENU$'
Text2 DB '[1] Enter String$'
Text3 DB '[2] Display String$'
Text4 DB '[3] Reverse String$'
Text5 DB '[4] Display String Without Vowels And Spaces$'
Text6 DB '[5] Display String In Upper Case$'
Text7 DB '[6] Caesar Cipher$'
Text8 DB '[9] Quit$'
Text9 DB 'Choose An Option:$'

Choice DB '1','2','3','4','5','6','9'
Message1 DB 'Please Enter A String Between 0 and 25 Characters$'
Message2 DB 'Press Any Key To Continue$'
UserText DB '                         $'
Length DW 25

;Creates New Line
NewLine:
lea DX, crlf
int 33
ret

;Asks User For A Option
UserChoice:
mov AH, 1
int 33
mov choice, AL
ret

;Clears The Screen
ClearScreen:
mov AH, 0
mov AL, 7
int 16
ret

;Prints The Menu
PrintMenu:
;Text 'Assignment Menu'
mov AH, 9
lea DX, Text1
int 33

call NewLine
call NewLine

;Text 'Menu Option 1'
mov AH, 9
lea DX, Text2
int 33

call NewLine

;Text 'Menu Option 2'
mov AH, 9
lea DX, Text3
int 33

call NewLine

;Text 'Menu Option 3'
mov AH, 9
lea DX, Text4
int 33

call NewLine

;Text 'Menu Option 4'
mov AH, 9
lea DX, Text5
int 33

call NewLine

;Text 'Menu Option 5'
mov AH, 9
lea DX, Text6
int 33

call NewLine

;Text 'Menu Option 6'
mov AH, 9
lea DX, Text7
int 33

call NewLine

;Text 'Menu Option 9'
mov AH, 9
lea DX, Text8
int 33

call NewLine
call NewLine

;Text 'Choose An Option'
mov AH, 9
lea DX, Text9
int 33
ret
Vb Programmer is offline   Reply With Quote
 

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 5:34 PM.

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