Saturday 25 June 2016

CS401 SOLVED ASSIGNMENT # 2 SOLLUTION

Cs401 assg 2 solution
Dear all please remember in prayers here is code and snap shot for all of you. But still it need to be more better try if you can.
1. If anyone cannot understand how to installed NASM please go through this is link . Please follow the instruction as it is.
2. If you can not understand how to run program in nasm please follow the link step by step dont forget a single one.
;print string using bios service [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, 2000 ; 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, 0x12 ; 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 ah, 0 ; service 0 � get keystroke int 0x16 ; call BIOS keyboard service mov ax, 0x4c00 ; terminate program int 0x21

2 comments:

  1. Code is not working giving en errors in these lines "Comma or end of line expected" in line 5 6 12
    clrscr: push es push ax
    push cx push di
    pop cx pop ax pop es ret start:

    ReplyDelete

thanx for visiting vupastpapersmegacollection.blogspot.com/