Answered step by step
Verified Expert Solution
Question
1 Approved Answer
PAGE 55,132 STACK_SEG SEGMENT STACK USE16 DB 100 DUP(?) STACK_SEG ENDS DATA_SEG SEGMENT 'DATA' USE16 MESSAGE DB 'CE302 LAB2',0DH,0AH DB 'ENTER A STRING FROM KEYBORD:
PAGE 55,132 STACK_SEG SEGMENT STACK USE16 DB 100 DUP(?) STACK_SEG ENDS DATA_SEG SEGMENT 'DATA' USE16 MESSAGE DB 'CE302 LAB2',0DH,0AH DB 'ENTER A STRING FROM KEYBORD: $' OUTMSG DB 0DH,0AH,'THE STRING YOU JUST ENTERED IS: $' INSENT DB 60,?,60 DUP('$') NEWLINE DB 0DH,0AH,'$' DATA_SEG ENDS CODE_SEG SEGMENT PARA 'CODE' PUBLIC USE16 ASSUME CS:CODE_SEG, DS:DATA_SEG, SS:STACK_SEG MAIN PROC FAR PUSH DS ;INITIATE THE PROGRAM XOR AX,AX PUSH AX MOV AX,DATA_SEG MOV DS,AX LEA DX,MESSAGE ;PRINT MESSAGE MOV AH,9 INT 21H MOV AH,0AH ;READ A STRING LEA DX,INSENT INT 21H LEA DX,OUTMSG MOV AH,9 INT 21H MOV AH,09H LEA DX,INSENT+2 ;PLUSSED 2 TO THE ADDRESS TO GET RID OF SOME CHARACTERS WHILE PRINTING INT 21H MOV DX,OFFSET NEWLINE MOV AH,9 ;MOVE CURSOR TO NEXT LINE INT 21H RET MAIN ENDP CODE_SEG ENDS END MAIN !!!!!!!!!YOU SHOULD MODIFY THIS CODE!!!!!!!! THANKS IN ADVANCE... :)OBJECTIVE To become familiar with the loop and compare instructions. After finishing this experiment, you should be able to do the following: 1. Use compare instructions, 2. Construct simple loops, 3. Write small assembly programs with user interface. LABORATORY 1. Use any text editor you are familiar with to create an. ASM file (lab4.asm). 2. Write a program that reads a string from keyboard. 3. The program should count the number of upper case characters, lower case characters, numbers and symbols in the data and display those numbers on the screen. 4. Create an executable file lab4.exe using assembler and linker. 5. The program should work as follows: lau sing his Pem 4 computer s to fat to na C:> lab4.exe prog t Contains: 5 capital letter(s) Contains: 39 lower case letter(s) Contains 1 digit(s) Contains: 16 other character(s) OBJECTIVE To become familiar with the loop and compare instructions. After finishing this experiment, you should be able to do the following: 1. Use compare instructions, 2. Construct simple loops, 3. Write small assembly programs with user interface. LABORATORY 1. Use any text editor you are familiar with to create an. ASM file (lab4.asm). 2. Write a program that reads a string from keyboard. 3. The program should count the number of upper case characters, lower case characters, numbers and symbols in the data and display those numbers on the screen. 4. Create an executable file lab4.exe using assembler and linker. 5. The program should work as follows: lau sing his Pem 4 computer s to fat to na C:> lab4.exe prog t Contains: 5 capital letter(s) Contains: 39 lower case letter(s) Contains 1 digit(s) Contains: 16 other character(s)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started