Code No: RR311501

Set No. 1

III B.Tech I Semester Supplementary Examinations, February 2007 SYSTEMS PROGRAMMING (Computer Science & Systems Engineering) Time: 3 hours Max Marks: 80 Answer any FIVE Questions All Questions carry equal marks ⋆⋆⋆⋆⋆ 1. (a) Explain the following instructions: i. ii. iii. iv. v. XCHG LEA INC DEC MOV

(b) Code one instruction that swaps the contents of a word named WORDZ with the BX. (c) Explain about segment override prefix. 2. Explain the following with examples: (a) AAS and AAM instructions (b) IMVL and CBW instructions (c) LODSD and CMPSW (d) Keyboard input functions (e) Control Transfer operations (f) Jump Based on Signed Data (g) REPE instructions (h) XLAT instructions [16] [5+3+8]

3. (a) For string operations using REP, how do you define the number of repetitions that are to occur? (b) For string operations using REP, how do you set processing right to left? (c) Write an Assembly Language Program to check whether a given string is palindrome? [6+5+5] 4. (a) What is meant by a MACRO? With suitable example explain a MACRO instruction? (b) Explain the pass-2 macro definition and expansion algorithm. [8+8]

5. Write an Assembly language program to illustrate displaying a menu setting a uses press the Up and Down Arrow keys toselect an items from menu. [16] 6. (a) What is a hard disk ? Explain the characteristics of a hard disk. 1 of 2

Code No: RR311501

Set No. 1
[8+8]

(b) What is a boot record ? Which files are loaded by it?

7. (a) Explain briefly which functions of INT 13H carry out the following operations on disk. i. Verify sectors ii. Format tracks (b) Write and explain the instructions, i. To reset the disk controller ii. To read the disk status 8. (a) Explain two pass algorithm for the design of a macro processor. (b) What are the different data structures used in this algorithm. ⋆⋆⋆⋆⋆ [8+8] [8+8]

2 of 2

Code No: RR311501

Set No. 2

III B.Tech I Semester Supplementary Examinations, February 2007 SYSTEMS PROGRAMMING (Computer Science & Systems Engineering) Time: 3 hours Max Marks: 80 Answer any FIVE Questions All Questions carry equal marks ⋆⋆⋆⋆⋆ 1. (a) Explain about COM programs. (b) Explain about addressing formats and addressing modes. 2. Define three separate related tables that contain the following data: (a) item numbers 06, 10, 14, 21 and 24 (b) item descriptions of videotape, receivers, modems, keyboards and diskettes (c) item prices 93.95, 82.25, 90.67, 85.80 and 13.85.Using the description table code the following: i. a routine that moves the contents of the table to another (empty) table ii. a routine that sorts the contents of this new table into ascending sequence by description. [4+4+8] 3. Write an Assembly Language Program, which reads two numbers into AX, BX and prints Greatest Common Divisor (GCD) onto the screen. [16] 4. (a) Explain the macro instruction argument. (b) Explain with an example, the macro within a macro definition. 5. Code the following routines. (a) Set the mode for 80 column monochrome. (b) Set the cursor size to start at line 5 and end at line. (c) Scroll up the screen to 10 loines. (d) Display 10 blinking “dots” with one half dots(hex 131) on. [4+4+4+4] [8+8] [6+10]

6. (a) What is a file handle ? Explain the functions of INT 21H used to carry out the following operations using file handles. i. ii. iii. iv. Create file Open file Write record Close file [10+6]

(b) What is an ASCIIZ string? Explain with the help of an example.

7. (a) What is BIOS INT 13H ? What are two major disadvantages of using BIOS INT 13H ? Explain. 1 of 2

Code No: RR311501

Set No. 2
[8+8] [16]

(b) Explain the basic disk functions carried out by BIOS INT 13H. 8. Compare and contrast the macro and a subroutine call. ⋆⋆⋆⋆⋆

2 of 2

Code No: RR311501

Set No. 3

III B.Tech I Semester Supplementary Examinations, February 2007 SYSTEMS PROGRAMMING (Computer Science & Systems Engineering) Time: 3 hours Max Marks: 80 Answer any FIVE Questions All Questions carry equal marks ⋆⋆⋆⋆⋆ 1. (a) Give the commands that cause the assembler when listing a program. i. to advance to a new page. ii. to print a heading at the top of a page. (b) Consider the instruction MOV AX,4C00H used with INT21H. i. Explain what instruction performs. ii. Explain the purpose of 4C00H. (c) Explain the directives for defining data. 2. Define three separate related tables that contain the following data: (a) item numbers 06, 10, 14, 21 and 24 (b) item descriptions of videotape, receivers, modems, keyboards and diskettes (c) item prices 93.95, 82.25, 90.67, 85.80 and 13.85.Using the description table code the following: i. a routine that moves the contents of the table to another (empty) table ii. a routine that sorts the contents of this new table into ascending sequence by description. [4+4+8] 3. Write a program to Add the given ASCII numbers ASCVAL1 =“548” ASCVAL2=“724” And store the result in ASCTOT? 4. (a) Explain the macro instruction argument. (b) Explain with an example, the macro within a macro definition. 5. Code the following routines. (a) Set the mode for 80 column monochrome. (b) Set the cursor size to start at line 5 and end at line. (c) Scroll up the screen to 10 loines. (d) Display 10 blinking “dots” with one half dots(hex 131) on. 6. (a) What is a hard disk ? Explain the characteristics of a hard disk. (b) What is a boot record ? Which files are loaded by it? 1 of 2 [8+8] [4+4+4+4] [8+8] [4+6+6]

[16]

Code No: RR311501

Set No. 3

7. (a) Which are the three portions of COMMAND.COM loads into memory? Explain (b) What is PSP ? Explain the purpose of FCB #1, FCB #2,and, DTA in PSP ? [8+8] 8. (a) What is loader? What are functions of loader. (b) Explain various Loader schemes. ⋆⋆⋆⋆⋆ [8+8]

2 of 2

Code No: RR311501

Set No. 4

III B.Tech I Semester Supplementary Examinations, February 2007 SYSTEMS PROGRAMMING (Computer Science & Systems Engineering) Time: 3 hours Max Marks: 80 Answer any FIVE Questions All Questions carry equal marks ⋆⋆⋆⋆⋆ 1. (a) Write about internal memory of a processor . (b) Explain about segments. (c) Provide the two’s complement of the following binary numbers. i. ii. iii. iv. 001100110 0011101101 111111111 00111101

[6+6+4]

2. (a) Suppose that the AX contains ASCII 9 (0039H) and the BX contains ASCII 7 (0037H). Explain the exact results of the following unrelated operations: (i) ADD AX, 33H AAA (iii) SUB AX, BX AAS (ii) ADD AX, BX AAA (iv) SUB AX, ODH AAS

(b) An unpacked BCD field named UNPAK contains 01040705H. Code a loop that causes its contents to be proper ASCII 31343735H. [8+8] 3. An Assembly Language Program is required to provide simple encryption of data. Define an 26-byte data area named CRYPTEXT containing any ASCII data. Arrange a translate table to convert the data somewhat randomly, for example, A to X, B to E, C to R and so forth. Provide for all possible byte values. Arrange a second translate table that reverses (decrypts) the data. The program should perform the following steps: ◦ Display the original contents of CRYPTEXT on a line ◦ Encrypt CRYPTEXT and display it on another line ◦ Decrypt CRYPTEXT and display it on yet another line. The third line should display the same data as the first line. [16] 4. (a) What is meant by a MACRO? With suitable example explain a MACRO instruction? (b) Explain the pass-2 macro definition and expansion algorithm. 5. Write a ASL program to display ASCII character set. 6. (a) What is a hard disk ? Explain the characteristics of a hard disk. 1 of 2 [8+8] [16]

Code No: RR311501

Set No. 4
[8+8]

(b) What is a boot record ? Which files are loaded by it? 7. (a) Write a program to read sectors from disk into memory using BIOS. (b) Under which circumstances a programmer choose BIOS INT 13H? 8. (a) Explain features of Macro Facility.

[8+8]

(b) Macro expansion is very similar to subroutine calls during program execution. Explain the similarities and differences between them. [5+11] ⋆⋆⋆⋆⋆

2 of 2