You are not logged in. Your edit will be placed in a queue until it is peer reviewed.
We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.
- 6Simply no. The issue is due basic 8086 workings. No (runtime) information about the type of a call taken is recorded on stack (or anywere else). Code has to be assembled specific for near or far calls. That's why (back then) every library was delivered in every (useful) fashion.Raffzahn– Raffzahn2019-11-21 10:36:12 +00:00Commented Nov 21, 2019 at 10:36
- My guess is that you would have to use NEAR and SHORT jumps for all models and keep the code restrained. NEAR and SHORT jumps cause the IP to be updated while FAR jumps cause CS and IP to be updated." So, even using JMP will change the instruction at compile time. Other things to consider is self modifying code, store function data on stack or use batch files to compile in different models etc.Natural Number Guy– Natural Number Guy2019-11-22 03:06:57 +00:00Commented Nov 22, 2019 at 3:06
- Not exactly "runtime" per se, I would not be surprised if there is some internal compile time defined STRING for the model being used. I remember vaguely such a thing for putting FAR or not into variables. If you manage to use it from asm....Rui F Ribeiro– Rui F Ribeiro2019-11-22 15:06:01 +00:00Commented Nov 22, 2019 at 15:06
Add a comment |
How to Edit
- Correct minor typos or mistakes
- Clarify meaning without changing it
- Add related resources or links
- Always respect the author’s intent
- Don’t use edits to reply to the author
How to Format
- create code fences with backticks ` or tildes ~ ```
like so
``` - add language identifier to highlight code ```python
def function(foo):
print(foo)
``` - put returns between paragraphs
- for linebreak add 2 spaces at end
- _italic_ or **bold**
- quote by placing > at start of line
- to make links (use https whenever possible) <https://example.com>[example](https://example.com)<a href="https://example.com">example</a>
How to Tag
A tag is a keyword or label that categorizes your question with other, similar questions. Choose one or more (up to 5) tags that will help answerers to find and interpret your question.
- complete the sentence: my question is about...
- use tags that describe things or concepts that are essential, not incidental to your question
- favor using existing popular tags
- read the descriptions that appear below the tag
If your question is primarily about a topic for which you can't find a tag:
- combine multiple words into single-words with hyphens (e.g. ms-dos), up to a maximum of 35 characters
- creating new tags is a privilege; if you can't yet create a tag you need, then post this question without it, then ask the community to create it for you