Solved

far call in assembly

Posted on 2000-04-07
3
2,537 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Summary: This tutorial covers some basics of pointer, pointer arithmetic and function pointer. What is a pointer: A pointer is a variable which holds an address. This address might be address of another variable/address of devices/address of fu…
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…
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.
The goal of this video is to provide viewers with basic examples to understand and use switch statements in the C programming language.

632 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