malxau / os2api

MIT License
12 stars 0 forks source link

osFree FamilyAPI joint development #1

Open prokushev opened 12 months ago

prokushev commented 12 months ago

Just to know, osFree subproject FAPI has similar goals. https://github.com/osfree-project/FamilyAPI/tree/master. Most of code is mine and I can change license to MIT. Will be good to join projects.

Things presented in osFree Family API:

  1. Implementation of most 1.x API subset for DOS. Some works, some not. Need testing and fixing. Includes implementation of API which not present in original MS Family API.
  2. Documentation of most API's at http://osfree.org/doku/en:docs:fapi
  3. Target compiler is a Open Watcom 1.9, JWasm, so it can be easely adopted to MASM and MSVC

Most of API implemented in assembler with small parts of C code (because DOS EXE size is matter). Uses underline library MacroLib which presents MASM/JWASM macros compatable (mostly) with original MS MASM and IBM ALP macros.

First goal, as in your project, create DOS library FAPI.LIB to link with DOS executable (no BIND usage).

malxau commented 12 months ago

Wow, thanks for letting me know! I knew osfree was looking at rebuilding a kernel; I didn't know anyone was looking at FAPI. Looking now your project seems quite complete - I still haven't compiled it but it looks like a great start. I saw the DPMI code in the memory APIs - wouldn't that require protected mode implementations of all the rest too?

So far the code here is just a program using FAPI and a minimal C runtime to use it with, so as of now, there's negligible overlap - I'll build yours and see how well it works with this program. Currently it's only using 15 APIs though, so it seems like a small/simple test case.

prokushev commented 12 months ago

Memory functions as for real mode as for 16bit protected mode. Depends on presence of dpmi host. If host is present, then dpmi functions used, if not, then only real mode.

Personally I have started to develop test cases for api but not finished yet. Actually, most of code written, but not well tested.

malxau commented 12 months ago

I checked out the code and installed OpenWatcom - do you have any pointers for compiling it? I'm looking at http://osfree.org/doku/en:develop:guidelines which seems to imply checking out the tools repo and modifying setvars-w64 to suit the host system...?

prokushev commented 12 months ago

Start _setup script. If must download and configure all tools.

prokushev commented 12 months ago

If all installed OK, then start _wcc.cmd. For now build system for whole osfree project.

prokushev commented 12 months ago

https://github.com/osfree-project/osfree here instruction.

malxau commented 4 months ago

This might interest you – the “official” Family API layer was released under the MIT license as part of DOS 4. The repo also contains C 5.1 & MASM 5.1.

https://github.com/microsoft/MS-DOS/tree/main/v4.0/src/MAPPER

prokushev commented 4 months ago

Thank you for info. Yes, it is early implementation. Seems used only for BACKUP and RESTORE.