Question: Assembly language for x86 processors using in c++ starting _asm Computer Science 371 Assignment No.5 (Bitwise operators) 1. An interrupt is a signal sent by
Assembly language for x86 processors using in c++ starting _asm
Computer Science 371 Assignment No.5 (Bitwise operators) 1. An interrupt is a signal sent by device to CPU to indicate need for service When an interrupt occurred, the AX register will hold the following information 4 Bit 0 Bit 1 Bits 2,3 00-16GB RAM, 01-32GB RAM, 10-48GB RAM and 11 64GB RAM Bits 5,6 :00 Bits 6,7 number of floppy drives plus one( 00- one derive, 01-two drives,..) Bit 8 Bits 9, 10, 11: number of ports installed Bit 12 Bit 13 Bit 14, 15 number of printers installed(00 0 printer, 01- 1 printer,... blank 1 if math coprocessor installed, 0 otherwise :0 1 if game adaptor is installed, 0 otherwise : 0 Suppose the content of AX register is 1100 1110 1001 1100 (i.e mov ax, 1100 1110 1001 1100b). Write an assembly program a. The number of printers connected to the computer b. The number of floppy drives c. The size of the RAM to determine A PIN number at the Bank of Fullerton must be a 4 digit hexadecimal number. Smith family wants the total of digits in their PIN number to be an even number. Can Smith family use BEEF FADE or CABE as their PIN number? Sample I/O 2. BEEF is a valid ID for the family FADE is a valid ID for the family CABE is not a valid ID for the family 3 There are 16 sprinklers in the Masson Park. Each bit of AX register represents a sprinkler ( "I" indicates the sprinkler is on, and "O" otherwise). Suppose the content of AX register at this moment is ox6A2F. write a program to answer the following questions: i. Display the AX register at base two ii. How many sprinklers are on? ii. Which sprinkler are defective (off)?Defective sprinklers: 16 13 119 875 AX-01 10 1010 00 10 1 1 1 1 9 sprinklers are ON most bit is representing the first floor). Ten people got into the elevator on the first floor and each pressed a random floor number between 2 and 16 (some random numbers may be the same which indicates more than one person will get off at the same floor). W'rite a program to (i) display the content of AX at base 2 (ii) use AX register to determine at which floors the elevator will stop A-1001 0001 0000 1100 Elevator will stop at floors no. 3 49 13 16 Computer Science 371 Assignment No.5 (Bitwise operators) 1. An interrupt is a signal sent by device to CPU to indicate need for service When an interrupt occurred, the AX register will hold the following information 4 Bit 0 Bit 1 Bits 2,3 00-16GB RAM, 01-32GB RAM, 10-48GB RAM and 11 64GB RAM Bits 5,6 :00 Bits 6,7 number of floppy drives plus one( 00- one derive, 01-two drives,..) Bit 8 Bits 9, 10, 11: number of ports installed Bit 12 Bit 13 Bit 14, 15 number of printers installed(00 0 printer, 01- 1 printer,... blank 1 if math coprocessor installed, 0 otherwise :0 1 if game adaptor is installed, 0 otherwise : 0 Suppose the content of AX register is 1100 1110 1001 1100 (i.e mov ax, 1100 1110 1001 1100b). Write an assembly program a. The number of printers connected to the computer b. The number of floppy drives c. The size of the RAM to determine A PIN number at the Bank of Fullerton must be a 4 digit hexadecimal number. Smith family wants the total of digits in their PIN number to be an even number. Can Smith family use BEEF FADE or CABE as their PIN number? Sample I/O 2. BEEF is a valid ID for the family FADE is a valid ID for the family CABE is not a valid ID for the family 3 There are 16 sprinklers in the Masson Park. Each bit of AX register represents a sprinkler ( "I" indicates the sprinkler is on, and "O" otherwise). Suppose the content of AX register at this moment is ox6A2F. write a program to answer the following questions: i. Display the AX register at base two ii. How many sprinklers are on? ii. Which sprinkler are defective (off)?Defective sprinklers: 16 13 119 875 AX-01 10 1010 00 10 1 1 1 1 9 sprinklers are ON most bit is representing the first floor). Ten people got into the elevator on the first floor and each pressed a random floor number between 2 and 16 (some random numbers may be the same which indicates more than one person will get off at the same floor). W'rite a program to (i) display the content of AX at base 2 (ii) use AX register to determine at which floors the elevator will stop A-1001 0001 0000 1100 Elevator will stop at floors no. 3 49 13 16
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
