Today we will see what is difference between the two types of procedures i.e. near and far procedure. Let's go!!
Difference between NEAR and FAR procedure.
Ø
Near
procedure
1. A near procedure refers to a procedure which is in the
same code segment from that of the call instruction
2. It is also called intra-segment procedure
3 A near procedure call replaces the old IP with new IP.
4. The value of old IP is pushed on to the stack. SP=SP-2
5. Less stack locations are required
6. Procedure is inside Code Segment
7.Uses keyword near
8.Syntax:- CALL near_procedure_name
6. Procedure is inside Code Segment
7.Uses keyword near
8.Syntax:- CALL near_procedure_name
9. Example :- Call Delay
Ø
Far
Procedure
1. A far procedure refers to a procedure which is in the different code segment from
that of the call instruction.
2. It is also called inter-segment procedure call
3. A far procedure call replaces the old CS:IP pairs with new
CS:IP pairs
4. The value of the old CS:IP pairs are pushed on to the stack
SP=SP-2
5. More stack locations are required
6. Procedure is outside Code Segment
7. Uses keyword FAR
6. Procedure is outside Code Segment
7. Uses keyword FAR
8. Example :- Call FAR PTR Delay
9. Syntax:- CALL far_procedure_name
9. Syntax:- CALL far_procedure_name
Programs:-
For many other Assembly Language Programs related to microprocessor 8086, C++ , DataStructures etc...related to MSBTE, engineering, Computer/IT field concepts visit our BLOG
There are microprocessor programs of largest
,smallest ,division ,multiplication,odd/even,block operation ,string operations
,etc...
Subscribe to our blog 😃 for getting blog updates !!
this point are very easy to understand thank you
ReplyDelete