CSE 506 LAB 9

October 19, 2017
By shp

Problem #1 (Chapter 7 problem 8) 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 NUMBER OF

CSE 506 Lab 7

September 11, 2017
By shp

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

CSE 506 Lab 6

August 23, 2017
By shp

Practise #1 (Example 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.· mov ax,0FFFBh CMP AX,0 JL NEGATIVE JE ZERO JG POSITIVE NEGATIVE: MOV BX,-1 JMP END_CASE ZERO: MOV BX,0 JMP END_CASEPOSITIVE: MOV BX,1 JMP

CSE 506 Lab 5

August 6, 2017
By shp

Practise #1 (Eg 6.1) Write a code to find the greater signed number of the numbers stored in AX and BX ABC: mov ah, 1 int 21h mov bl, al int 21h mov bh, al cmp bl, bh jG point1 jl point2 point1: mov ah, 2 mov dl, ‘>’ int 21h jmp ABC point2: mov

CSE 506 Lab 4

July 30, 2017
By shp

Problem #1 Write· a program to read one of the hex digits A-F, and display it on the next line in decimal. Sample execution: ENTER A HEX DIGIT: C IN DECIMAL IT IS 12 Problem #2 Write a program to display a 10 x 10 solid box of asterisks. Hint: declare a string in the

CSE 506 Lab 3

July 24, 2017
By shp

Problem #1 Write an assembly code that will take a lowercase character input and convert it to uppercase The code is as follows TITLE Lower_letter_to_upper .MODEL SMALL .STACK 100H .DATA CR EQU 0DH LF EQU 0AH MSG1 DB ‘Enter the letter in lower case : \$’ MSG2 DB 0DH,0AH,’In upper case is: ‘ CHAR DB