I am doing a program for dosbox in mobile devices.
I am wanting to port pnglib masm32 assembly code to freebasic dos32 lib.
I am thinking of making stub routines for the windows routines.
Am I right in thinking that kernel32.inc, and user32.inc only has procedure definitions in it?
That the only include file, I would need to use is windows.inc?
Here are the windows routines used.
GetProcessHeap PROTO STDCALL
HeapAlloc PROTO STDCALL :DWORD,:DWORD,:DWORD
HeapFree PROTO STDCALL :DWORD,:DWORD,:DWORD
CreateFile PROTO STDCALL :DWORD,:DWORD,:DWORD,:DWORD,:DWORD,:DWORD,:DWORD
GetFileSize PROTO STDCALL :DWORD,:DWORD
ReadFile PROTO STDCALL :DWORD,:DWORD,:DWORD,:DWORD,:DWORD
CloseHandle PROTO STDCALL :DWORD
GetLastError PROTO STDCALL[code]
I am thinking of using freebasic to create the stubs.
Any suggestions?
i think it uses OLE
also - not too sure about license/copyright issues
good luck with that :P
what you might do is browse through the code and learn how it works
then, try to apply a similar technique in freebasic dos32
Hi Lassar,
JWasm is providing an option for djgpp :
QuoteVarious output formats are supported:
format option comment
-----------------------------------------------------------------------
OMF -omf (default) object format, 16- and 32-bit supported
BIN -bin plain binary format (boot sector, BIOS, DOS COM)
COFF -coff MS Win32 object format
WIN64 -win64 MS Win64 object format
MZ -mz DOS native binary format (.EXE)
PE -pe Win32/Win64 PE binary format
ELF32 -elf Linux 32-bit object format
ELF64 -elf64 Linux 64-bit object format
DJGPP -djgpp Djgpp's 32-bit COFF variant (optional).
http://www.japheth.de/JWasm/Readme.html
I think JWasm supporting Djgpp is a myth. You have to recompile it to get the DJGPP support.
I got brave and tried to compile it, and got this error.
fixup.c(218): Error! E1031: Name 'header_format' not found in struct/union modul
e_info
Error(E42): Last command making (Release\fixup.obj) returned a bad status
Error(E02): Make execution terminated
Quote from: Lassar on March 20, 2013, 04:14:34 PM
I think JWasm supporting Djgpp is a myth.
It's not a myth. If there is a compilation error, you should contact Japheth.