🎧 New: AI-Generated Podcasts Turn your study notes into engaging audio conversations. Learn more

MACHINE-EXERCISEINT21_CONDTIONAL-JUMP_2nd_2023_2024.pdf

Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...

Full Transcript

COMPUTER ORGANIZATION AND ARCHITECTURE (CS 2619) BONUS EXERCISE – CONDITIONAL JUMP/INT 21H NAME: ________________________SECTION:____________DATE:_________ Instructions: For your answer sheet use one long size bond paper (8.5” x 13”) o...

COMPUTER ORGANIZATION AND ARCHITECTURE (CS 2619) BONUS EXERCISE – CONDITIONAL JUMP/INT 21H NAME: ________________________SECTION:____________DATE:_________ Instructions: For your answer sheet use one long size bond paper (8.5” x 13”) only, see format of answer sheet below. - For handwritten solution, use blue/black ball pen only. Use liquid eraser/correction tape on your erasures. - Present your solution clearly and neatly. - Follow the above instructions to avoid penalties! Note: Identical/similar answers or answers copied from other sources: score = 0 Total points: 30 Deadline: Right before the start of Quiz 4 Machine Problem: Write an 8088-assembly language program that will ask the user to enter a letter. If the entered letter is in lowercase the program will convert it to uppercase (vice versa) then it will display the converted letter. It will also display the next 5 characters of the given letter (based on the ASCII table). The program must execute again if the user wants to continue. (please refer to the sample run) Sample run: Submission Requirements: 1. Algorithm/pseudocode (must be handwritten) 2. Source code with comments (computerized, compressed) 3. Screenshots of sample runs Format of Answer Sheet: use one long size bond paper (8.5” x 13”) portrait front page – contains source code and sample run. back page – contains the algorithm. Front page of answer sheet: BONUS EXERCISE – CONDITIONAL JUMP/INT 21H NAME: ________________________SECTION:___________DATE:_________ Source code with comments: Sample runs: Sample answer sheet: (you can use the code below as a reference, it uses conditional jump instructions) BONUS EXERCISE – CONDITIONAL JUMP/INT 21H NAME: ALBERTO, DARLENE SECTION: 2CSZ DATE: MAY 10, 2024 Source code with comments (copy code from IDE and paste it here) ;determine if entered char is a letter,digit, or special character.model small Sample runs:.stack 100h.data prompt db 0ah,0dh,'Enter a character: $' upper db 0ah, 0dh, 'You entered an uppercase letter.$' lower db 0ah, 0dh, 'You entered a lowercase letter.$' digit db 0ah, 0dh, 'You entered a numeric character.$' special db 0ah, 0dh, 'You entered a special character.$'.code start: mov ax,@data mov ds,ax mov dx,offset prompt call show call input ; request input ;check character cmp al,'A' jb low cmp al,'Z' ja low lea dx,upper call show jmp quit low: ;check if lower case cmp al,'a' jb num cmp al,'z' ja num lea dx,lower call show jmp quit num: ;check if number cmp al,'0' jb spe cmp al,'9' ja spe lea dx,digit call show jmp quit spe: lea dx,special call show quit: mov ah,4ch int 21h show: mov ah,9 int 21h ret input: mov ah,1 int 21h ret end start Note: the first page is computerized; the back page contains the algorithm which must be handwritten

Use Quizgecko on...
Browser
Browser