-
-
Notifications
You must be signed in to change notification settings - Fork 57
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
base: devel
Are you sure you want to change the base?
Mfs 100 #2166
Conversation
_DI = DOSEMU_LMHEAP_OFFS_OF(s); | ||
|
||
// do int2f/11a0 | ||
_AX = 0x11a0; |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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!
src/dosext/mfs/mfs.h
Outdated
@@ -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) |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
So you want to move lfn to mfs |
Yes, I already have the FDPP bit done. See andrewbird/fdpp@ff06a16 |
For discussion ATM