Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mfs 100 #2166

Draft
wants to merge 7 commits into
base: devel
Choose a base branch
from
Draft

Mfs 100 #2166

wants to merge 7 commits into from

Conversation

andrewbird
Copy link
Member

For discussion ATM

_DI = DOSEMU_LMHEAP_OFFS_OF(s);

// do int2f/11a0
_AX = 0x11a0;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So I want to call an int2f function from here. Do I need to create something like call_dos_helper(), or is there a better way of doing this?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use do_int_call_back(0x2f);,
or if you can't - it will assert.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, will try that out, thanks!

@@ -42,8 +42,8 @@ typedef struct vm86_regs state_t;

#define MASK8(x) ((x) & 0xff)
#define MASK16(x) ((x) & 0xffff)
#define HIGH(x) MASK8((unsigned long)(x) >> 8)
#define LOW(x) MASK8((unsigned long)(x))
#define HIGH(x) (uint8_t)MASK8((unsigned long)(x) >> 8)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What kind of printf and what
casting? Maybe the casting to
long should go away instead?

Copy link
Member Author

@andrewbird andrewbird Mar 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just did printf("%d\n", HIGH(state->eax)); and got warning about needing %lu format.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incidentally shouldn't LOW and HIGH be called LBYTE and HBYTE?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we already have the macros
LO_BYTE() and alike.
Anyway, have you tried to remove
the cast to long instead?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Anyway, have you tried to remove
the cast to long instead?

Not yet, but will do.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems to work fine, thanks.

@stsp
Copy link
Member

stsp commented Mar 9, 2024

So you want to move lfn to mfs
and then add it to fdpp, correct?

@andrewbird
Copy link
Member Author

So you want to move lfn to mfs
and then add it to fdpp, correct?

Yes, I already have the FDPP bit done. See andrewbird/fdpp@ff06a16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants