Skip to content

Commit

Permalink
Dos3Call function instead of int 21h
Browse files Browse the repository at this point in the history
  • Loading branch information
prokushev committed Sep 22, 2024
1 parent c624943 commit 54acba4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
12 changes: 9 additions & 3 deletions tools/bind/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ UINT _lread(HFILE hFile, LPVOID lpBuffer, UINT uBytes)
mov ds, word ptr lpBuffer+2
mov cx, uBytes
mov ah, 3fh
int 21h
}
Dos3Call;
__asm {
pop ds
jnc lreadexit
mov ax,-1
Expand All @@ -54,7 +56,9 @@ HFILE _lclose(HFILE hFile)
__asm {
mov bx, hFile
mov ax, 3eh
int 21h
}
Dos3Call;
__asm {
jnc lcloseexit
mov ax,-1
lcloseexit:
Expand All @@ -71,7 +75,9 @@ LONG _llseek( HFILE hFile, LONG lOffset, int nOrigin )
mov cx, word ptr lOffset+2
mov ax, nOrigin
mov ah, 42h
int 21h
}
Dos3Call;
__asm {
}
}
#pragma enable_message(107);
4 changes: 3 additions & 1 deletion tools/bind/ginterf.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ HGLOBAL GlobalAlloc(WORD flags, DWORD size)
{
mov ax,48h
mov bx, s
int 21h
}
Dos3Call;
__asm {
mov segm, ax
}

Expand Down

0 comments on commit 54acba4

Please sign in to comment.