Problem #1 Write a program to (a) prompt the user, (b) read first, middle, and last initials of a person’s name, and (c) display them down the left margin. Sample execution: ENTER THREE INITIALS: JFK J F K //Solution mov ah, 1 int 21h mov bl, al int 21h mov bh, al int 21h mov
Category: CSE 322
CSE 322 Fall 2018 Lab 1
Problem #1 General structure of Assembly code and printing characters. //Solution .MODEL small .STACK 100h .DATA .CODE MAIN PROC mov ah, 2 mov dl, 41h int 21h mov dl, 0ah int 21h mov dl, 0dh int 21h mov dl, 41h int 21h ENDP MAIN end MAIN Proiblem #2 Input and output of characters //Solution .MODEL
CSE 322 Summer 2018 Lab 11
Problem 1 (Chapter 10 question 9) Write a program that uses XLAT to (a) read a line of text, and (b)print It on the next line with all small letters converted to capitals. The Input line may contain any characters-small letters, capital, letters, digit characters, punctuation, and so on. //Code To be done by students
CSE 322 Summer 2018 Lab 10
Problem 1 (section 10.7) Encoding and Decoding string using XLAT instruction //Code Title secret message .Model small .stack 100h .data ; ;ABCDEFGHIJKLMNOPQRSTUVWXYZ code_key db 65 dup(‘ ‘), ‘XQPOGHZBCADEIJUVFMNKLRSTWY’ db 37 dup(‘ ‘) ; ;ABCDEFGHIJKLMNOPQRSTUVWXYZ decode_key db 65 dup(‘ ‘), ‘JHIKLQEFMNTURSDCBVWXOPYAZG’ db 37 dup(‘ ‘) coded db 80 dup(‘$’) ; XQPO$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$4 prompt db ‘Enter a message
CSE 322 Summer 2018 Lab 9
Problem 1 Write a procedure to find the factorial of a number present in cx. //Code fact proc mov ax, 1 top1: mul cx loop top1 ret fact endp Problem 2 String usage (Example listings 11.1, 11.2, 11.3) //Code .model small .stack 256 .data str db ‘Hello’, , ‘$’ str2 db ‘This is a test$’
CSE 322 Summer 2018 Lab 8
Problem 1 An example procedure //Code .MODEL small .STACK 256 .data .code main proc mov ax, @data mov ds, ax mov ax, 3 mov bx, 4 call addd Exit: mov ah, 4Ch mov al, 0 int 21h main endp addd proc ;ax+bx+bx add ax, bx add ax, bx ret addd endp END MAIN Problem
CSE 322 Summer 2018 Lab 7
Problem#1 Binary input //Code XOR BX, BX MOV AH, 1 INT 21H WHILE: CMP AL, 0DH JE END_WHILE AND AL, 0FH ; SUB AL, 30 SHL BX,1 OR BL, AL INT 21H JMP WHILE END_WHILE: Problem#2 Binary output //code mov bx, 1010101000110011b mov cx, 16 top: rol bx, 1 jc print1 mov ah, 2 mov
CSE 322 Summer 2018 Lab 6
Lecture from Lab doc 3 ->Logic Instructions not, and, or, xor, test //code mov ax, 1111111100000000b mov bx, 0000000011111111b and ax, bx and bx, ax and ax, 0111111111111111b or ax, bx or bx, ax or bx, 0000100000000000b not ax xor ax, bx xor bx, ax xor bx, bx xor ax, ax test ax, bx //
CSE 322 Summer 2018 Project details
Below are the group list with the project name required for this lab. If any one of you have problem with name and/or roll numbers contact me as soon as possible. Group A Group Roll Name Project 1 27 Azhar Auto Intensity Control of Street Lights 23 Rubaiat 22 Shahin 2 13 Shipon Water Level
CSE 322 Summer 2018 Lab 5
Task 1 (Exercise 6.8) Write a program to display a “?”, read two capital letters, and display them on the next line In alphabetical order. //Code To Be Done By Students Task 2 (Exercise 6.9) Write a program to display the extended ASCII characters (ASCII codes 80h to FFh). Display 10 characters per line, separated