Jumana_Pearl 0 Newbie Poster

Hello everyone I'm completely new to using SIM 8086 Assembly language and I've written a program here whereby the menu gets printed out and I get the user to input a string into an array but now I need it to count the number punctuation marks in the string and then print it out if anyone can help me with this that would be great. Here is the code I have so far.

clear_screen:
mov al, 0    
mov al, 7
int 16

start:
mov ah, 9    
lea dx menutitle ;This prints out 'main menu'
int 33           
lea dx, crlf	 
int 33			
int 33
lea dx, menu1	;this prints out [1] 'enter string' onto the screen
int 33
lea dx, crlf
int 33
lea dx, menu2	;this prints out [2] 'display string'
int 33
lea dx, crlf
int 33
lea dx, menu3    ;this prints out [3] 'display string in UPPERCASE'  
int 33
lea dx, crlf
int 33
lea dx, menu4	  ;this prints out '[4] Reverse String ie: "Hello World!" becomes "!dlroW olleH"$'	
int 33
lea dx, crlf
int 33
lea dx, menu5	  ;this prints out '[5] Display count of punction marks (!,.)and spaces$'	
int 33
lea dx, crlf
int 33
lea dx, menu6	; this prints out '[6] Cesar Cipher$'
int 33
lea dx, crlf
int 33
lea dx, menu9	; this prints out '[9] Quit$'
int 33
lea dx, crlf
int 33
lea dx, choose	; this prints out 'Please Choose An Option$'
int 33

enter_string:   ;the user enters the string;
mov ah,9
lea dx, crlf
int 33
lea dx, message1 ;this prompts the user to enter a string
int 33
lea dx, crlf
lea dx, crlf
int 33
mov ah, 63
mov bx, 0
mov cx, 15
lea dx input
int 33

;this compares the string in si to find !,.;
mov ah, 2
mov si, 0
loop:
mov dl, input[si]
int 33
cmp si, '!' ;compares input to see if it matches '!'

inc count  ;inc the counter

jne nextline1 ;if it doesn't it moves onto the next line;
nextline1:
cmp si, ','  ;it compares the character in the string to ','
inc count	
jne nextline2 ;if it doesn't find a ',' it moves onto the next line;
nextline2:
cmp si, '.'  ;compares the string to see if there's a '.'
inc count
inc si
cmp si, length ;compares it to length of the string if its < than 15 it loops;
jle loop 	;this takes it back up to the top
jne halt
halt:
hlt



count dw 0; ;this is the count;

menutitle db 'MAIN MENU$' ;the menutitle db holds 8 bits in memory

menu1 db '[1] Enter String$'   

menu2 db '[2] Display String$'

menu3 db '[3] Display String in UPPERCASE$'

menu4 db '[4] Reverse String ie: "Hello World!" becomes "!dlroW olleH"$'

menu5 db '[5] Display count of punction marks (!,.)and spaces$'
menu6 db '[6] Cesar Cipher$'

menu9 db '[9] Quit$'

choose db 'Please Choose An Option$'

message1 db 'Please enter a string that is 15 characters long$'

message2 db 'This is string is too big$'

input db '               '

length dw 15 ;the length of the string

crlf db 13,10,36