Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

far call in assembly

Posted on 2000-04-07
3
Medium Priority
?
2,561 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 90 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

Have you thought about creating an iPhone application (app), but didn't even know where to get started? Here's how: ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Important pre-programming comments: I’ve never tri…
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 opening and writing to files in the C programming language.
The goal of this video is to provide viewers with basic examples to understand recursion in the C programming language.

722 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