Sub: Computer Organisation Lab
Total Page:16
File Type:pdf, Size:1020Kb
Sub: Computer Organisation Lab Class: T. E. Computer
INDEX
Sr. No. Assignments
1. Simulation of DOS commands 2. Read & display Boot sector of block device 3. Tracing FAT chain 4. Bad sectors of floppy 5. Hard disk partition information 6. Root directory 7. Booth’s Algorithm implementation 8. Division Algorithm implementation (2) 9. TSR to display time 10. TSR to simulate Prt. Scr. key 11. TSR for screen saver 12. TSR for generating alarm 13. Printer Device Driver 14. Graphics Device Driver 15. Co-processor use for floating pt. operations 16. Virtual Device Driver Assignment No.1.
Title: Simulation of DOS commands
Aim: Write a .COM program in 8086 ALP to simulate DOS commands (Type, Copy, Time & Date) using far procedure. Accept device name as command line parameter.
Objective: 1) Study of PSP 2) Use of command line parameters
Theory : 1. Explain PSP in detail.. 2. Different file structures - .COM & .EXE 3. DOS & BIOS Interrupts.
Algorithms:
List of Interrupts used: e.g. Int 21H Function 3dH: Open a file(DOS int)
Reference Books: 1.8086 Assembly language programming- Peter Able 2. MS- DOS – Ray Duncan Assignment No.2.
Title: Display Boot Sector
Aim: Write a .COM program in 8086 AL to read and display boot sector of a given block device. Acept device name as comand line parameter. Display the dump of the sector as well as each field’s decimal value and its significance in tabular format.
Objective: 1) Study of disk organization 2) FAT1, FAT2 3) Root Directory 4) Data area
Theory : Draw boot sector. Explain each field, interrupts used e.g. sector read.
Algorithm:
Input: 1.44 mb floppy
List of Interrupts used: e.g. Int 13H Function 02H: Read Sector(BIOS int)
Reference Books: 1.8086 Assembly language programming- Peter Able 2. MS- DOS – Ray Duncan Assignment No.3.
Title: Tracing FAT Chain
Aim: Write a .COM program in 8086 AL for simulation of DOS ‘TYPE’ COMMAND by tracing FAT chain. Accept filename as command line parameter.
Objective: Study of disk organization processing the FAT chain 1) Boot Sector 2) FAT1, FAT2 3) Root Directory 4) Data area
Theory : 1) FAT information 12 bit /16 bit 2) FAT chain Tracing algorithm. 3) Low level access for root directory 4) Root directory single entry structure
Input: Filename as command line parameter.
Algorithm:
List of Interrupts used: e.g. Int 13H Function 02H: Read Sector(BIOS int)
Reference Books: 1.8086 Assembly language programming- Peter Able 2. MS- DOS – Ray Duncan Assignment No.4.
Title: BAD Sectors of floppy
Aim: Write a .COM program to find out and display no.of BAD SECTORS for given block device (1.44 MB floppy). Accept drive name as command line parameter.
Objective: Study of FAT entry types.
Theory : Way of processing 12 bit and 16 bit FAT entries.
Input: Drive name as command line parameter.
Output: No. of bad sectors in decimal.
Algorithm:
List of Interrupts used: e.g. Int 13H Function 02H: Read Sector(BIOS int)
Reference Books: 1.8086 Assembly language programming- Peter Able 2. MS- DOS – Ray Duncan Assignment No.:5.
Title: Display HARD DISK PARTITION INFORMATION
Problem Statement: Read sector of a given block device and disply information of each partition., i.e. simulate FDISK command only for information display. Implement error checks whenever necessary. Accept device name as command line parameter.
Objective: 1. Reading hard disk using low level functions like sector read. 2. Understanding master boot record. 3. Understanding hard disk organisation.
Theory: 1. Hard disk organization. 2. About MBR 3. Explain each field in MBR entry. 4. Areana headers, Extended, Expanded memory 5. EXEC function 6. FAT for hard disk
Output: e.g. Partition : 1 Partition is bootable : 80 Starting head : 01 Starting cylinder Partition type : not used/ huge… Ending head Assignment No.: 6.
Title: 4/8 bit CPU Simulation Problem Definition: Design and implementation of 4/8 bit CPU 1. The design must clearly indicate the locations of the registers MAR, MDR, PC, ALUs and other internal rgisters. 2. Instructions to be considered are ADD & END. The opcode for the instns. And the instn. Format must be clearly mentioned. Use 8085 Assembly language to write the emulation routine.
Objective: 1. Understanding Instruction formats 2. Understanding opcode formation 3. Decoding of instruction 4. Register Architecture, single bus architecture 5. Study of ALU
Theory: 1] 74181 ALU. Functioning, attach data sheet 2] Interfacing diagram of 4 bit ALU with 8085. Through 8255. 3] Register mapping on 8085 RAM. 4] Logical division of 8085 memory into various blocks. 1. CPU software 4. Registers 2. Subroutine 5. User Program 3. Stack 5] Opcode formation for ADD, MOV, HLT, Instruction Execution 6] Fetch & Decode cycle
Required H/W: 74181 ALU, 8085 Dyna Kit
Output: After execution of user program, o/p in some general purpose register of 8085. Assignment No.:7.
Title: Implementation 4 bit multiplier
Aim: WAP in 8085 Assembly Language to implement Booth’s algorithm for 4 bit signed number multiplication.
Objective: Study of different multiplication method
Theory: 1. Shift and add method (Unsigned Numbers) 2. Booth’s Algorithm. (Unsigned Numbers) 3. Solve at least 2 problems by both methods manually in journal as well as using H/W AND S/W. 4. Draw h/w block dia for both algos.
Algorithm: Write algos H/W : 1) 8085 P kit 2) 74181 interface I/p : 1) Two 8 bit UNSIGNED nos. for SHIFT AND ADD METHOD 2) Two 4 bit signed numbers for Booth’s algo.
O/P : 1) Display 16 bit result (for Shift and add algo.) in data field of 8085 kit 2) Display 8 bit result (for Booth’ s algo .) in data field of 8085 kit Justify the ans in both cases.
Hint : wherever algo comes across + / - operation use external ALU
REF. BOOKS : CO (HAMACHER ZAKY),TTL MANUAL Assignment No.:8.
Title: Implementation of 4 Bit Division Algorithms
Aim: WAP in 8085 Assembly Language to implement unsigned division algorithms for 4 bit signed number multiplication. 1. Non- restoring 2. Restoring
Objective: Study of different multiplication method
Theory: 1. Shift and add method (Unsigned Numbers) 2. Boo\th’s Algorithm. (Unsigned Numbers) 3. Solve at least 2 problems by both methods manually in journal as well as using H/W AND S/W. 4. Draw h/w block dia for both algos.
Algorithm: Write algorithms H/W : 1. 8085 P kit 2. 74181 interface
I/p : 1. Two 4 bit UNSIGNED nos. for SHIFT AND ADD METHOD 2. Two 4 bit signed numbers for Booth’s algo. O/P : 1. Display 8 bit result (for Shift and add algo.) in data field of 8085 kit 2. Display 8 bit result (for Booth’ s algo .) in data field of 8085 kit Justify the ans in both cases.
Hint : wherever algo comes across + / - operation use external ALU REF. BOOKS : CO (HAMACHER ZAKY),TTL MANUAL Assignment No.:9.
Title: TSR for displaying system time
Problem Statement: Write a .COM TSR in 8086 assembly lang. to display system time at top right corner of the screen, in the format HH:MM:SS. Use Hot keys as follows: F1- for invoking TSR F2 - for displaying TSR F3 – to remove TSR from main memory
Objective: 1. Study of TSR programs
Theory: 1.Explain TSR programs 2. Memory map for TSR 3. Removal of TSR from MM 4. Application of TSR
Algorithm:
List of Interrupts used: e.g. Int 21H Function 31H: Terminate & stay resident (DOS int)
Hint: 1. Cross check mem map using MEM/C comamnd. 2. Dos int. cannot be used in resident portion of TSR
Reference Books: 1.8086 Assembly language programming- Peter Able 2. MS- DOS – Ray Duncan Assignment No.:10.
Title: TSR for simulating print screen key operation
Problem Statement: Write a .COM TSR in 8086 assembly lang. to simulate Print Screen key operation. Use Hot keys as follows: F1- for invoking TSR F2 - for displaying TSR F3 – to remove TSR from main memory
Objective: 1. Study of TSR programs
Theory: 1.Explain TSR programs 2. Memory map for TSR 3. Removal of TSR from MM 4. Application of TSR
Algorithm:
List of Interrupts used: e.g. Int 21H Function 31H: Terminate & stay resident (DOS int)
Reference Books: 1.8086 Assembly language programming- Peter Able 2. MS- DOS – Ray Duncan Assignment No.:11.
Title: TSR for Screen saver
Problem Statement: Write a .COM TSR in 8086 assembly lang. For screen saver Accept time in seconds as C.L.P. Use Hot keys as follows: F1- for invoking TSR F2 - for displaying TSR F3 – to remove TSR from main memory
Objective: 1. Study of TSR programs
Theory: 1.Explain TSR programs 2. Memory map for TSR 3. Removal of TSR from MM 4. Application of TSR
Algorithm:
List of Interrupts used: e.g. Int 21H Function 31H: Terminate & stay resident (DOS int)
Reference Books: 1.8086 Assembly language programming- Peter Able 2. MS- DOS – Ray Duncan Assignment No.:12.
Title: TSR for generating alarm
Problem Statement: Write a .COM TSR in 8086 assembly lang. for generating beep for 1)Given duration of time 2)In cyclic manner
Use Hot keys as follows: F1- for invoking TSR F2 - for displaying TSR F3 – to remove TSR from main memory
Objective: 1. Study of TSR programs
Theory: 1.Explain TSR programs 2. Memory map for TSR 3. Removal of TSR from MM 4. Application of TSR
Algorithm:
List of Interrupts used: e.g. Int 21H Function 31H: Terminate & stay resident (DOS int)
Reference Books: 1.8086 Assembly language programming- Peter Able 2. MS- DOS – Ray Duncan Assignment No.: 13.
Title: Printer Device Driver
Problem Statement: Write 8086 assembly language program for printing device driver. Accept the choice from user for “mode” font.
Objective: 1) Study of device drivers 2) Use of config.sys file 3) Use of IOCTL functions
Theory: 1. Need of DD 2. Types of DD 3. Structure of an MS-DOS Device driver 4. Draw figure for structure, header 5 Attribute word field details 6. Installation of PDD Input : Accept mode, font from user
Output: Install, initialize & use your own PDD instead of DOS default PDD
Algorithms:
Interrupts used:
Reference Books: 1.8086 Assembly language programming- Peter Able 2. MS- DOS – Ray Duncan Assignment no.:14.
Title: Printer Graphics Device Driver
Problem Definition: Write a program in assembly language for printing devnagiri script
Theory: Scaling, change of line spacing
Escape Sequence used: 1. Esc K 480 bit image graphics mode format Esc K; n1; n2; Changes from tect mode to bit image mode (graphics) n1 & n2 are nos. each consisting of 1 byte. They specify the total no. of bit image data bytes to be transferred to v1 & v2. 2. Esc A - Sets vaariable line spacing for format Esc A;n; (n/72)”
Interrupts Used: 1. Int 17H Function 00H: Write a character to printer Function 01H: Initialise printer
2. Int 21H Function 3dH: Open a file 3.Int 21H Function 3eH: Read a file
Algorithms:
Reference Books: 1.8086 Assembly language programming- Peter Able 2. MS- DOS – Ray Duncan