# Category: CSE 322

## CSE 322 Fall 2018 Lab 4

Problem #1 (Example 6.6) [AND condition] Read a character, and if it’s an uppercase letter, display it. //Solution mov ah, 1 int 21h cmp al, ‘A’ jl not_print cmp al,… Read more »

## CSE 322 Fall 2018 Lab 3

Problem #1 A basic while loop //Code label1: mov ah, 2 mov dl, ‘1’ int 21h jmp label1 Problem #2 (Example 6.1) [If-else structure] suppose AX aml BX contain signed… Read more »

## CSE 322 Fall 2018 Lab 2

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… Read more »

## 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… Read more »

## 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… Read more »

## 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… Read more »

## 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… Read more »

## 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… Read more »

## 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… Read more »

## 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,… Read more »