We are here with you hands in hands to facilitate your learning & don't appreciate the idea of copying or replicating solutions. Read More>>

Looking For Something at vustudents.ning.com? Click Here to Search

www.bit.ly/vucodes

+ Link For Assignments, GDBs & Online Quizzes Solution

www.bit.ly/papersvu

+ Link For Past Papers, Solved MCQs, Short Notes & More

Hello...

AsSalam U Alaikum...

I hope U al r fi9 & ShinE like Star......

Ya lygia solutiOn.... iB iss main Apna Apna VU ID  lgaa la ar SS ly lygiaAa....

         

 [org 0x0100]

jmp start

message: db'BC000000000' ; string to be printed

length: dw 20 ; length of string

clrscr: push es

push ax

push cx

push di

mov ax, 0xb800

moves, 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

repstosw ; clear the whole screen

pop di

pop cx

pop ax

popes

ret

; subroutine to print a string

; takes the x position, y position, attribute, address of string and

; its length as parameters

printstr: push bp

movbp, sp

pushes

push ax

push cx

pushsi

push di

mov ax, 0xb800

moves, ax ; point es to video base

mov al, 80 ; load al with columns per row

mul byte [bp+10] ; multiply with y position

add ax, [bp+12] ; add x position

shl ax, 1 ; turn into byte offset

movdi,ax ; point di to required location

movsi, [bp+6] ; point si to string

mov cx, [bp+4] ; load length of string in cx

mov ah, [bp+8] ; load attribute in ah

cld ; auto increment mode

nextchar: lodsb ; load next char in al

stosw ; print char/attribute pair

loopnextchar ; repeat for the whole string

pop di

popsi

pop cx

pop ax

popes

popbp

ret 10

start: call clrscr ; call the clrscr subroutine

mov ax, 10

push ax ; push x position

mov ax, 15;

push ax ; push y position

mov ax, 0x12 ; blue on black attribute

push ax ; push attribute

mov ax, message

push ax ; push address of message

push word [length] ; push message length

callprintstr ; call the printstr subroutine

mov ax, 0x4c00 ; terminate program

int 0x21

NXt 2 SS ap apnI VU ID ka mutabk lain gy :/

.....................

kSi Ko agr is Code main Mistake Lag rhE hy ar Corect SolutIon unka Pass hy to plz wo add kr ka Sb ke Hlp kr Dygia ....

ThNkiewz!!

+ How to Follow the New Added Discussions at Your Mail Address?

+ How to Join Subject Study Groups & Get Helping Material?

+ How to become Top Reputation, Angels, Intellectual, Featured Members & Moderators?

+ VU Students Reserves The Right to Delete Your Profile, If?


See Your Saved Posts Timeline

Views: 908

.

+ http://bit.ly/vucodes (Link for Assignments, GDBs & Online Quizzes Solution)

+ http://bit.ly/papersvu (Link for Past Papers, Solved MCQs, Short Notes & More)

+ Click Here to Search (Looking For something at vustudents.ning.com?)

+ Click Here To Join (Our facebook study Group)

Replies to This Discussion

bhai ya mny ne bnai :P CS619 bhai na bna ka de 

CS401 Assignment no.2 Solution step to step

https://youtu.be/aLoXQAIGvz0

                [org 0x0100]

                jmp start

               

oldisr: dd 0                                          ; space for saving old isr

next:     dw 0

 

 

                                               

clrscr: push es                                    ; subroutine to clear the screen

                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

 

; keyboard interrupt service routine

 

kbisr:     push ax

                push es

                push di

 

                mov di, [next]

                add di, 1

 

                mov ax, 0xb800

                mov es, ax                          ; point es to video memory

               

                in al, 0x60                            ; read a char from keyboard port

               

nextcmp1:cmp al, 0x32                  ; has the m key pressed

                jne nextcmp2                    ; no, try next comparison

                mov byte [es:di], 'm'      ; yes, print m

                jmp exit                               ; leave interrupt routine

 

 

nextcmp2: cmp al, 0x2E                                 ; has the C key pressed

                jne nextcmp3                    ; no, try next comparison

                mov byte [es:di], 'c'        ; yes, print c

                jmp exit                               ; leave interrupt routine

 

 

nextcmp3: cmp al, 0x1F                                 ; has the s pressed

                jne nextcmp4                    ; no, try next comparison

                mov byte [es:di], 's'        ; print s

                jmp exit                               ; leave interrupt routine

 

 

nextcmp4: cmp al, 0x2C                                ; has the z pressed

                jne nextcmp5                    ; no, try next comparison

                mov byte [es:di], 'z'        ; print z

                jmp exit                               ; leave interrupt routine

 

 

nextcmp5: cmp al, 0x0B                                ; has the 0 pressed

                jne nextcmp6                    ; no, try next comparison

                mov byte [es:di], '0'        ; print 0

                jmp exit                               ; leave interrupt routine

 

 

nextcmp6: cmp al, 0x02                                 ; has the 1 pressed

                jne nextcmp7                    ; no, try next comparison

                mov byte [es:di], '1'        ; print 1

                jmp exit                               ; leave interrupt routine

 

 

nextcmp7: cmp al, 0x03                                 ; has the 2 pressed

                jne nextcmp8                    ; no, try next comparison

                mov byte [es:di], '2'        ; print 2

                jmp exit                               ; leave interrupt routine

 

 

nextcmp8: cmp al, 0x04                                 ; has the 3 pressed

                jne nextcmp9                    ; no, try next comparison

                mov byte [es:di], '3'        ; print 3

                jmp exit                               ; leave interrupt routine

 

nextcmp9: cmp al, 0x05                                 ; has the 4 pressed

                jne nextcmpA                   ; no, try next comparison

                mov byte [es:di], '4'        ; print 4

                jmp exit                               ; leave interrupt routine

 

nextcmpA: cmp al, 0x06                                ; has the 5 pressed

                jne nextcmpB                    ; no, try next comparison

                mov byte [es:di], '5'        ; print 5

                jmp exit                               ; leave interrupt routine

 

nextcmpB: cmp al, 0x07                                ; has the 6 pressed

                jne nextcmpC                    ; no, try next comparison

                mov byte [es:di], '6'        ; print 6

                jmp exit                               ; leave interrupt routine

 

nextcmpC: cmp al, 0x08                                ; has the 7 pressed

                jne nextcmpD                   ; no, try next comparison

                mov byte [es:di], '7'        ; print 7

                jmp exit                               ; leave interrupt routine

 

nextcmpD: cmp al, 0x09                                ; has the 8 pressed

                jne nextcmpE                    ; no, try next comparison

                mov byte [es:di], '8'        ; print 8

                jmp exit                               ; leave interrupt routine

 

nextcmpE: cmp al, 0x0A                                ; has the 9 pressed

                jne nomatch                      ; no, try next comparison

                mov byte [es:di], '9'        ; print 9

                jmp exit                               ; leave interrupt routine

 

 

nomatch:mov [next], di

                pop di

                pop es

                pop ax

                jmp far [cs:oldisr]             ; call the original ISR

 

exit:       mov al, 0x20

                out 0x20, al                         ; send EOI to PIC              

                mov [next], di

                pop di

                pop es

                pop ax

                iret                                         ; return from interrupt

 

start:     call clrscr                              ; call clrscr subroutine

                xor ax, ax

                mov es, ax                          ; point es to IVT base

                mov ax, [es:9*4]

                mov [oldisr], ax                 ; save offset of old routine

                mov ax, [es:9*4+2]

                mov [oldisr+2], ax            ; save segment of old routine

               

                cli                                            ; disable interrupts

                mov word [es:9*4], kbisr ; store offset at n*4

                mov [es:9*4+2], cs          ; store segment at n*4+2

                sti                                           ; enable interrupts

 

l1:           mov ah, 0                            ; service 0 ? get keystroke

                int 0x16                                ; call BIOS keyboard service

                cmp al, 13                            ; is the Ent key pressed

                jne l1                                     ; if no, check for next key

                mov ax, [oldisr]                 ; read old offset in ax

                mov bx, [oldisr+2]           ; read old segment in bx

               

                cli                                            ; disable interrupts

                mov [es:9*4], ax              ; restore old offset from ax

                mov [es:9*4+2], bx         ; restore old segment from bx

                sti

               

                mov ax, 0x4c00                                 ; terminate program

                int 0x21

hi....any one here?

CS401 Assignment no.2 Solution step to step

https://youtu.be/aLoXQAIGvz0

RSS

Latest Activity

Z@F@R (MSBA) joined + M.Tariq Malik's group
13 minutes ago
Namood replied to + M.Tariq Malik's discussion MTH601 Assignment No 01 Fall 2019 Solution & Discussion in the group MTH601 Operations Research
16 minutes ago
+ M.Tariq Malik replied to + M.Tariq Malik's discussion MTH304 Assignment No 01 Fall 2019 Solution & Discussion Due Date: 17-11-2019 in the group MTH304 Statics
16 minutes ago
Z@F@R (MSBA) joined + M.Tariq Malik's group
16 minutes ago
Profile IconMahnoor shahid, Muhammad Zeeshan, muhammad yahya abbasi and 5 more joined Virtual University of Pakistan
23 minutes ago
+ M.Tariq Malik replied to + M.Tariq Malik's discussion MTH501 Assignment No 01 Fall 2019 Solution & Discussion Due Date: 19-11-2019 in the group MTH501 Linear Algebra
23 minutes ago
+ M.Tariq Malik replied to MIT's discussion Visual Programing (CS411) Assignment#01 Deadline Date = 18-11-2019 in the group CS411 Visual Programming
23 minutes ago
+ Iuuoɔǝut + liked + Iuuoɔǝut +'s discussion بعد مُدت اُسے دیکھا، لوگو
42 minutes ago
+ Iuuoɔǝut + posted discussions
43 minutes ago
waseem khan updated their profile
49 minutes ago
Areeha Chuhdary liked 彡JK彡 ❤️'s discussion Army Public School and College Mangla........ Staff required!!
1 hour ago
zobialatif joined + M.Tariq Malik's group
1 hour ago
Fazal ur Rehman replied to MIT's discussion Visual Programing (CS411) Assignment#01 Deadline Date = 18-11-2019 in the group CS411 Visual Programming
1 hour ago
Fazal ur Rehman joined + M.Tariq Malik's group
1 hour ago
Aqsa batool updated their profile
1 hour ago
Muhammad Ishtiaq and Talha Asad are now friends
1 hour ago
Ikra butt joined + M.Tariq Malik's group
1 hour ago
SILA updated their profile
2 hours ago
+ " J ɨ y ą ⋆ ❤ ⋆ updated their profile
2 hours ago
+ M.Tariq Malik liked 彡JK彡 ❤️'s discussion Army Public School and College Mangla........ Staff required!!
2 hours ago

© 2019   Created by + M.Tariq Malik.   Powered by

Promote Us  |  Report an Issue  |  Privacy Policy  |  Terms of Service