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


Dear Students! Share your Assignments / GDBs / Quizzes files as you receive in your LMS, So it can be discussed/solved timely. Add Discussion

How to Add New Discussion in Study Group ? Step By Step Guide Click Here.

GDB – Graded Discussion Board CS401 – Computer Architecture & Assembly Language Programming GDB Topic Suppose we have to call the following two subroutines in our assembly code: Bubblesort_S Bubblesort_R There are two basic techniques in order to pass parameters into a subroutine: stack-based and register-based. Bubblesort_S subroutine uses the stack-based technique and Bubblesort_R subroutine uses the register-based approach. Now you are required to choose that which subroutine you will use in your assembly program in order to obtain the following features: The operation must be faster The limited number of parameters Justify your answer with valid reasons. GDB’s Instructions Provide precise and to the point answer, not more than 5 to 6 lines, avoid irrelevant details. Post your answer on the Graded Discussion Board (GDB), not on the Moderated Discussion Board (MDB). GDB will only be open for 48 hours, no more time or grace day will be provided. GDB cannot be accepted via email after the due date. Copy from the internet or other student will get zero marks

+ 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: 2468

.

+ 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

come discuss plzzz??

Read Hand out following heading for answer
5.5. PARAMETER PASSING THROUGH STACK

??????

Bubble sort-r

Because it uses register based approach 

registers will always be fastest, because that is where execution "takes place". but registers are VERY limited in terms of storage. e.g. x86 processors only had 4 general purpose registers you could store things in to, and even those were dual-purposed for certain thing.The maximum parameters a subroutine can receive are seven when all the general registers are used. Also, with the subroutines are themselves limited in their use of registers, and this limited increases when the subroutine has to make a nested call thereby using certain registers as its parameters. Due to this, parameter passing by registers is not expandable and generalizable. However this is the fastest mechanism available for passing parameters and is used where speed is important.

baqi khud explain kro

in this case register base subroutine is better to use

Register-based is much faster because the registers where data is stored are directly located on the CPU. Where a stack-based implementation would have to push/pop data from memory (RAM) which is a much slower process. Registers are the fastest possible memory access you can get. 

disadvantage of the call stack mechanism is the increased cost of a procedure call and its matching return The extra cost includes incrementing and decrementing the stack pointer , and accessing the local variables and parameters by frame-relative addresses, instead of absolute addresses. The cost may be realized in increased execution time, or increased processor complexity, or both.

solution

Attachments:

dear Bushra

               plz help me my id and password not work properly bcz some people change my ID and Password not wrok. please help me my brother angry with me .plz help me 

Asslam-u-Alaikum

send you email through your VU email Id they will fix that, or just send your e-mail to misuse@vu.edu.pk they will help you.

Regards,

Omer

v funny..atleast dont guide others wrongly,,

BITS 16 ;Set code generation to 16 bit mode
ORG 0x0100 ;Set code start address to 0000h

MAIN:
jmp START

DISP:
mov ah,09h ;String Print int service
int 21h
ret

OFF:
mov al,00h ;All LEDs OFF
mov dx, 378h
out dx, al
jmp MAIN
ON:
mov al,0FFh ;All LEDs ON
mov dx, 378h
out dx, al

START:
lea dx,[msg1] ;Display message
call DISP
mov ah, 01h ;keyboard interrupt
int 21h
cmp al,'1' ;press 1 to ON
je ON
cmp al,'0' ;press 0 to OFF
je OFF
END:
mov al, 00h ;OFF LEDs and motor
mov dx, 378h
out dx, al
mov ah, 4Ch ;End of program
int 21h

section .data
msg1 db 13,10,'Press 1/0(press any key to exit): ','$'

; Description : A simple example of
;parallel interfacing file programmed

bits 16 ; Set 16 bit code generation
org 0x0100 ; Set code start address to ; 100h (COM file)


MAIN:
jmp START ; Jump to label 'START'

DISPLAY: ; Subroutine program
lea dx,[msg1] ; string print
mov ah,09h ; service no 09h
int $21 ; interrupt 21h
ret

DELAY: ;Delay program
MOV CX, 01Fh ;outer loop
.NEXT: MOV BX,0FFFFH ;inner loop
.NEXT2: NOP
NOP
NOP
DEC BX
JNZ .NEXT2
LOOP .NEXT
RET

END: ;Define label 'END'
mov ah, $4C ;service no =4ch
int $21
ret ;return to calling

PATTERN:
;1st pattern
mov dx,$378 ;set data port address
mov al,$03 ;set two LEDs ON
out dx,al ;output to data port
call DELAY ;call delay subroutine


;2nd pattern
mov dx,$378 ;set data port address
mov al,$02 ;set one LED = OFF, another LED=ON
out dx,al ;output to data port
call DELAY ;call delay subroutine
;3rd pattern
mov dx,$378 ;set data port address
mov al,$01 ;set one LED = ON, another LED=OFF
out dx,al ;output to data port
call DELAY ;call delay subroutine
;4th pattern
mov dx,$378 ;set data port address
mov al,$00 ;set two LEDs = OFF
out dx,al ;output to data port
call DELAY ;call delay subroutine
ret

START:
call DISPLAY ; display message on screen
call PATTERN ; display pattern
call END ; end program

section .data
msg1 db 13,10,Program running? ','$'

BITS 16 ;Set code generation to 16 bit mode
ORG 0x0100 ;Set code start address to 0000h


[section .text]

MAIN:
jmp START

DISP:
mov ah,09h ;String Print int service
int 21h
ret


ON2:
lea dx,[msg3] ;Display message
call DISP
mov al,0F0h ;2nd 7-seg ON
mov dx, 378h
out dx, al
jmp MAIN

ON1:
lea dx,[msg2] ;Display message
call DISP
mov al,0Fh ;1st 7-seg ON
mov dx, 378h
out dx, al


START:
lea dx,[msg1] ;Display message
call DISP

mov ah, 01h ;keyboard interrupt
int 21h

cmp al,'1' ;press 1 to ON1
je ON1
cmp al,'2' ;press 2 to ON2
je ON2

END:
mov al, 00h ;LEDs OFF
mov dx, 378h
out dx, al
mov ah, 4Ch ;End of program
int 21h

section .data
msg1 db 13,10,'Press 1/0: ','$'
msg2 db 13,10,'First 7-SEG ON...','$'
msg3 db 13,10,'Second 7-SEG ON...','$'

RSS

Latest Activity

ALEENA liked + IUUOƆƎUT +'s discussion کہو تو لوٹ جاتے ہیں ۔ ۔ ۔
46 seconds ago
ALEENA replied to + IUUOƆƎUT +'s discussion How Can You Get Secured of Being Banned On Ning
8 minutes ago
ayesha added 4 discussions to the group CS614 Data Warehousing
9 minutes ago
ALEENA liked + IUUOƆƎUT +'s discussion How Can You Get Secured of Being Banned On Ning
10 minutes ago
Aisha RD replied to + M.Tariq Malik's discussion EDU601 Philosophy of Education Assignment No 01 Fall 2019 Solution & Discussion in the group EDU601 Philosophy of Education
13 minutes ago
Aisha RD joined + M.Tariq Malik's group
13 minutes ago
RAjpoot* updated their profile
30 minutes ago
+ ! ! ! ! ! ! ! ! ! AG replied to + ! ! ! ! ! ! ! ! ! ! ! ! ! ! !'s discussion Happy Birth Day Zargiyah (Tasha <3)
44 minutes ago
+ Danial liked + ! ! ! ! ! ! ! ! ! ! ! ! ! ! !'s discussion Happy Birth Day Zargiyah (Tasha <3)
49 minutes ago
+ ! ! ! ! ! ! ! ! ! AG liked Muhammad Younas Rajpoot's discussion ECO404 assignment 1 fall semester dated 19-11-2019
50 minutes ago
+ ! ! ! ! ! ! ! ! ! AG liked waqas ahmad's discussion isl 201
50 minutes ago
+ ! ! ! ! ! ! ! ! ! AG liked zobialatif's discussion hazrat ali says
50 minutes ago
+ ! ! ! ! ! ! ! ! ! AG liked + IUUOƆƎUT +'s discussion Kabhi aye haqeeqat e muntizir
50 minutes ago
+ ! ! ! ! ! ! ! ! ! AG liked Abdul Majid Jamil's discussion for assignment of zoogy on topic wildlife counting
50 minutes ago
+ ! ! ! ! ! ! ! ! ! AG liked Azhar Sagar's discussion How to make srs Software Requirements Specification
50 minutes ago
+ ! ! ! ! ! ! ! ! ! AG liked Moji's discussion MCM301 assignment no 1
50 minutes ago
+ ! ! ! ! ! ! ! ! ! AG liked Aijaz khan's discussion CS608 - Software Verification and Validation Assignment No. 2 Need Solution
50 minutes ago
+ ! ! ! ! ! ! ! ! ! AG liked 彡JK彡 ❤️'s discussion If you have sOmething stupid to saY............
50 minutes ago
+ ! ! ! ! ! ! ! ! ! AG liked zohaib iftikhar's discussion ...* NASEEB TAK RASAI ...*
50 minutes ago
+ ! ! ! ! ! ! ! ! ! AG liked 彡JK彡 ❤️'s discussion Don't Look for Perfection........ LOVE lies in imperfection
50 minutes ago

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

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