CSE 122 Lab 1 : Familiarizing with the lab and measuring instruments

Topics covered in the lab includes Introduction to trainer board Switches Meters Voltage source Function generator Introduction to breadboard Introduction to multimeters (VOltmeter, Ammeter, and ohmmeter) Introduction to Oscilloscope Connection of Voltmeter Connection of Ammeter Connection of Ohmmeter Measuring voltage using voltmeter Measuring resistance using ohmmeter Measuring current using ammeter (With a simple resistance and

Continue Reading

CSE 322 Lab 6

Problem#1 (Chapter 7 problem 8) [Previous days hometask] Write a program that prompts the user to enter a character, and on subsequent lines prints its ASCII code in binary, and the number of 1 bits In Its ASCII code. Sample execution: TYPE A CHARACTER: A THE ASCII CODE OF A IN BINARY IS 01000001 THE

Continue Reading

CSE 322 Lab 5

Problem#1 (Section 6.5) Write a code to take a string input and print the first and last capital letters in the string in alphabetical order //Solution TITLE First and last capitals .MODEL SMALL ; DIRECTIVE .STACK 100H .DATA ; CR EQU 0DH ; LF EQU 0AH ; ;A DW 2 ; DATA SEGMENT ;B DW

Continue Reading

CSE 322 Lab 4

February 23, 2018

Problem#1 (Eg 6.4) If AX contains a negative number, put -1 In BX; if AX contains 0, put O In BX; if AX contains a positive number, put 1 In BX. //Solution mov ax, 0FFFFh cmp ax, 0 jl negative je zero jg positive negative: mov bx, -1 mov dl, ‘n’ jmp end zero: mov

Continue Reading

CSE 322 Lab 3

February 12, 2018

Problem#1 Write an assembly code to display a 11*11 hollow box of stars //Solution .MODEL SMALL .STACK 100H .DATA ; CR EQU 0DH ; LF EQU 0AH ; MSG db ‘***********’, cr, lf, ‘$’ MSG2 db ‘* *’, cr, lf, ‘$’ .CODE ; MAIN PROC ;MAIN PROCEDURE ; CODE SEGMENT MOV AX,@DATA ; MOV DS,

Continue Reading