Write an assembly language code to print your VU ID and Name as shown in example figure given below
 
using String Instructions.VU ID and Name text color must be green and it should have blue
background. Explain each instruction of program and also provide/paste snapshot of final output on the Screen.
 
Note: Before displaying VU ID and Name on screen, clear the screen. You will not be able to display VU ID and Name on screen in Windows so you will have to use the DOSBOX
1. Print your own VU ID and Name on screen otherwise your file will be awarded zero marks.
2. You will submit your code written in Word file.
using String Instructions.VU ID and Name text color must be green and it should have blue
background. Explain each instruction of program and also provide/paste snapshot of final output on the Screen.
Note: Before displaying VU ID and Name on screen, clear the screen. You will not be able to display VU ID and Name on screen in Windows so you will have to use the DOSBOX
1. Print your own VU ID and Name on screen otherwise your file will be awarded zero marks.
2. You will submit your code written in Word file.
- 
                        Here is the solution it is not perfect one You all are advised to manipulate code and make it exactly same to given one.
 ===============================================================================
 [org 0x0100]
 jmp start
 message: db 'BC140402312 Imtiaz Azeem'
 ; subroutine to clear the screen
 clrscr: push es
 push ax
 push cx
 push di
 mov ax, 0xb800
 mov es, ax ; point es to video base
 xor di, di ; point di to top left column
 mov ax, 0x0720 ; space char in normal attribute
 mov cx, 3000 ; number of screen locations
 cld ; auto increment mode
 rep stosw ; clear the whole screen
 pop di
 pop cx
 pop ax
 pop es
 ret
 start:
 call clrscr;
 mov ah, 0x13 ; service 13 - print string
 mov al, 1 ; subservice 01 – update cursor
 mov bh, 0 ; output on page 0
 mov bl, 7 ; normal attrib
 mov dx, 0x0F07 ; row 10 column 3
 mov cx, 24 ; length of string
 push cs
 pop es ; segment of string
 mov bp, message ; offset of string
 int 0x10 ; call BIOS video service
 mov ax, 0x4c00 ; terminate program
 int 0x21
 ==============================================================================
 
Comments
Post a Comment