Solved

far call in assembly

Posted on 2000-04-07
3
2,486 Views
Last Modified: 2011-09-20
How can I call a procedure if I know offset and segment?
When I execute

call 1122:3344

TASM complains "Near jump or call to different CS"

I can make a jump like
db 'EAh'
dw Offset
dw Segment

But how to make a call?
0
Comment
Question by:serg111
  • 2
3 Comments
 
LVL 32

Expert Comment

by:jhance
ID: 2694648
CALL CS:OFFSET

is the right syntax.  Are you using a .MODEL directive and specifiying SMALL?

The correct bytes for this would be:

db '9Ah'
dw OFFSET
dw SEGMENT
0
 
LVL 32

Accepted Solution

by:
jhance earned 30 total points
ID: 2694663
You might try it this way:

CALL FAR PTR SEG:OFFSET

This is the MS syntax to force a FAR CALL when the current default memory model specifies a NEAR CALL.  It seems to me that TASM is very close in its syntax.
0
 
LVL 2

Author Comment

by:serg111
ID: 2696533
Thanks it helped
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
SCANF - LIMIT THE NUMBER OF CHARARACTERS 1 68
c++ getting the first 10 characters of a char* string 11 104
Reactjs with .NET 3 74
MS Excel duplicate input detect. 8 16
Windows programmers of the C/C++ variety, how many of you realise that since Window 9x Microsoft has been lying to you about what constitutes Unicode (http://en.wikipedia.org/wiki/Unicode)? They will have you believe that Unicode requires you to use…
Examines three attack vectors, specifically, the different types of malware used in malicious attacks, web application attacks, and finally, network based attacks.  Concludes by examining the means of securing and protecting critical systems and inf…
The goal of this video is to provide viewers with basic examples to understand how to use strings and some functions related to them in the C programming language.
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use for-loops in the C programming language.

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question