CSE 322 Spring 2021 Lab 8

      No Comments on CSE 322 Spring 2021 Lab 8

Task #1

Basic XLAT usage

//Code
.MODEL SMALL
.STACK 100h
.DATA
array1 db 10,11,12,13,14,15,16,17,18,19,20
.CODE
MAIN PROC  
    mov ax, @data
    mov ds, ax
    
    lea bx, array1
    mov al, 5
    xlat   ;XLAT uses the initial value of al as n and fetches the nth element from the array and stores it on al.
     
exit:    
    mov ah, 4ch
    int 21h
ENDP MAIN
END MAIN

Task #2

Encoding and decoding message using XLAT

//Code
//Available on video

Task #3 (Program listing 11.1, 11.2, 11.3)

String read and print

//Code
//Available on video

Task #4

String reverse print.

//Code
//Available on video

Task #5 (Program listing 11.4)

Counting number of vowels and numbr of consonants using scan string instruction

//Code
//To be done by students

Homework

  1. Change the code in task 2 such that the encoding and decoding works for both small letter and capital letter.
  2. Change the code in task 2 such that a letter is replaced by three letters ahead. For example, A becomes D and B becomes E
  3. Chapter 9 Problem 9
  4. Chapter 9 Problem 10
  5. Chapter 9 Problem 11
  6. Chapter 9 Problem 12
  7. Chapter 10 Problem 7
  8. Chapter 10 Problem 9
  9. Chapter 10 Problem 10
  10. Change the read_str and print_str procedures of problem 1 so that there is no necessity of counter of length of string. Simply add a $ at the end of string to identify end of string

 

Print Friendly, PDF & Email

Leave a Reply