Commit Graph

320 Commits

Author SHA1 Message Date
Bart Oldeman c4d18100e7 Fix comments (Gerd Grosse, https://sourceforge.net/p/freedos/bugs/106/) 2018-10-20 19:47:09 -04:00
Bart Oldeman 761582ec0d ia16-elf-gcc: eliminate DOSDATA, DOSTEXT and C use of TGROUP.
Now that it understands relocations those are no longer necessary.
2018-10-20 19:47:09 -04:00
Bart Oldeman 204c2d5ba9 ia16-elf-gcc: eliminate _EnableA20 and _DisableA20 wrappers. 2018-10-20 19:47:09 -04:00
Bart Oldeman 384c5d302f ia16-elf-gcc: eliminate wrapper for init_call_p_0 and make it "noreturn". 2018-10-20 19:47:09 -04:00
Bart Oldeman 112f0fea42 ia16-elf-gcc port: use CDECL = __attribute__((cdecl)) instead of varargs. 2018-10-20 19:47:09 -04:00
Tee-Kiah Chia 656afa7873 ia16-elf-gcc: remove need for far function wrappers 2018-10-20 19:47:09 -04:00
Tee-Kiah Chia a4e7d1bf08 ia16-elf-gcc: remove some DOSDATA(.) & DOSTEXT(.) uses; replace
with actual __far declarations which ia16-elf-gcc now supports
2018-10-20 19:47:09 -04:00
Tee-Kiah Chia 41cb3a9dc1 ia16-elf-gcc: use special .msdos_mz_{hdr, reloc} section names
recognized by my recent (post-20 Mar 2018) binutils-ia16 patches
2018-10-20 19:47:09 -04:00
Tee-Kiah Chia ab6a76d049 Fix minor issues in diagnostic messages in utils/exeflat.c 2018-10-20 19:47:09 -04:00
Tee-Kiah Chia 2b96ed38d9 ia16-elf-gcc: use ia16-elf-objcopy instead of host objcopy
to process the ia16-elf object files
2018-10-20 19:47:09 -04:00
Tee-Kiah Chia 955cfc6df1 ia16-elf-gcc: update docs.: pkgs. for Ubuntu Trusty now avail. 2018-10-20 19:47:09 -04:00
Andrew Bird 7ec9c456ea FCB: Rename return value lost
Two variables named 'result' were defined, at the outer level a
UBYTE to hold the function return value and the inner a COUNT to
hold returns from 'truename()'. The overall function return value
was always FCB_SUCCESS due to shadowing, however removing the
inner variable definition as a fix does not work due to sign
issues and intermixing of the variable uses, so rename the inner
variable.

Tested this patch using FDPP platform
1/ Simple rename of file with conditions for success (ok)
2/ Simple rename of file with conditions for failure - source missing (ok)
3/ Simple rename of file with conditions for failure - target exists (ok)

Fixes #16
2018-10-18 07:08:30 -04:00
Bart Oldeman e6d427834f Implement suggested instead of minimal fix for ludivmul.
See https://sourceforge.net/p/freedos/bugs/106/
(Gerd Grosse)
2018-09-06 10:30:04 -04:00
Bart Oldeman eda671d079 Fix division for some large numbers such as 0xFFFF01FF/0x10101FF
See also https://sourceforge.net/p/freedos/bugs/106/
(Gerd Grosse)
2018-09-06 10:12:41 -04:00
Bart Oldeman fa36d8aa25 Fix comments (Gerd Grosse, https://sourceforge.net/p/freedos/bugs/106/) 2018-09-06 10:07:00 -04:00
Bart Oldeman 5ff361314c ia16-elf-gcc: eliminate DOSDATA, DOSTEXT and C use of TGROUP.
Now that it understands relocations those are no longer necessary.
2018-07-12 14:27:03 -04:00
Bart Oldeman 1bb9496c48 ia16-elf-gcc: eliminate _EnableA20 and _DisableA20 wrappers. 2018-07-12 12:14:47 -04:00
Bart Oldeman 25071a8df2 ia16-elf-gcc: eliminate wrapper for init_call_p_0 and make it "noreturn". 2018-07-12 11:47:41 -04:00
Bart Oldeman 36e31078ce Merge branch 'ia16-elf-gcc' into fdos_master 2018-07-12 11:01:38 -04:00
Bart Oldeman 8ee8135d4f ia16-elf-gcc port: use CDECL = __attribute__((cdecl)) instead of varargs. 2018-07-12 10:56:26 -04:00
bartoldeman 0954613e2a
Merge pull request #1 from bartoldeman/ia16-elf-gcc
Ia16 elf gcc
2018-07-11 16:14:29 -04:00
bartoldeman fefd37f0dd
Merge branch 'master' into ia16-elf-gcc 2018-07-11 16:14:09 -04:00
bartoldeman ca7fb8e71b
Merge pull request #4 from tkchia/ia16-elf-gcc-post20180708
Simplify ia16-elf-gcc port, by taking advantage of recently-added gcc features
2018-07-11 16:06:59 -04:00
Tee-Kiah Chia 49d1939ed7 ia16-elf-gcc: remove need for far function wrappers 2018-07-08 18:10:18 +08:00
Tee-Kiah Chia fd770f50df ia16-elf-gcc: remove some DOSDATA(.) & DOSTEXT(.) uses; replace
with actual __far declarations which ia16-elf-gcc now supports
2018-04-21 10:36:42 +08:00
Tee-Kiah Chia fdbea16132 ia16-elf-gcc: use special .msdos_mz_{hdr, reloc} section names
recognized by my recent (post-20 Mar 2018) binutils-ia16 patches
2018-04-21 00:13:05 +08:00
bartoldeman fe57c89061
Merge pull request #3 from tkchia/ia16-elf-gcc
Minor fixes for mkfiles/gcc.mak and utils/exeflat.c
2018-04-07 15:42:10 -04:00
Tee-Kiah Chia 2111b543c1 Fix minor issues in diagnostic messages in utils/exeflat.c 2018-04-07 22:22:12 +08:00
Tee-Kiah Chia 7eec989c22 ia16-elf-gcc: use ia16-elf-objcopy instead of host objcopy
to process the ia16-elf object files
2018-04-07 22:20:37 +08:00
bartoldeman a954b21261
Merge pull request #2 from tkchia/ia16-elf-gcc
ia16-elf-gcc: update documentation to mention (new) ia16-elf-gcc packages for Ubuntu Trusty
2018-03-05 12:19:55 -05:00
Tee-Kiah Chia f2bd7233e9 ia16-elf-gcc: update docs.: pkgs. for Ubuntu Trusty now avail. 2018-03-04 23:43:56 +08:00
Bart Oldeman 9c39f76155 Fix ret in LSHLU/LSHRU long shift macros, since they already pop of stack. 2018-02-22 18:44:49 -05:00
Tee-Kiah Chia 7160ff10c2 ia16-elf-gcc: precompiled Ubuntu pkgs. as a way to get toolchain 2018-02-22 18:44:49 -05:00
Bart Oldeman a3a3c2cfe9 Fix ret in LSHLU/LSHRU long shift macros, since they already pop of stack. 2018-02-22 12:51:20 -05:00
Tee-Kiah Chia 0128621e1f ia16-elf-gcc: precompiled Ubuntu pkgs. as a way to get toolchain 2018-02-22 12:51:20 -05:00
Bart Oldeman e83ebed451 Add build instructions for ia16-elf-gcc. 2018-01-11 17:50:31 -05:00
Bart Oldeman a70f31bf61 ia16-elf-gcc: enable and fix basic warnings; don't do strict ptr aliasing for now 2018-01-11 17:50:31 -05:00
Bart Oldeman ce8e4fd091 Use static for GCC, which makes the kernel smaller (automatic inlining) 2018-01-11 17:50:31 -05:00
Bart Oldeman d7a05ab6cd For GCC builds use GNU make instead of wmake throughout.
This eliminates all build-dependencies on Open Watcom.
2018-01-11 17:50:31 -05:00
Bart Oldeman 7705558b3e Use "ar" instead of "wlib" in gcc build. 2018-01-11 17:50:31 -05:00
Bart Oldeman 9e04932d2b sys.com compiled with ia16-elf-gcc: fill in missing functions. 2018-01-11 17:50:31 -05:00
Bart Oldeman 89d97b18de Fix ASMCFUNC (FAR) functions for ia16-elf-gcc.
We need to use make the functions vararg (,...) to make them cdecl.
For FAR functions we need wrappers.
2018-01-11 17:50:31 -05:00
Bart Oldeman 9b5b2e7d60 Create init varieties for unsigned long helper functions.
An INITPATCH is used to make sure the correct symbols are used.
The GCC kernel now shows the copyright string and boots a little further.
2018-01-11 17:50:31 -05:00
Bart Oldeman 97003a8aca Introduce popargs and arg macros to distinguish PASCAL/STDCALL conventions.
GCC has -mrtd but the args are pushed in reverse versus PASCAL. So asm
routines have to use macros to obtain the stack arguments.
For the complex call_nls assembly, revert the arguments in C using a
preprocessor macro.
2018-01-11 17:50:31 -05:00
Bart Oldeman f6d62165e0 ia16-elf-gcc: introduce DOSTEXT and DOSDATA macros.
Using DOSTEXT(x) accesses x in LGROUP and DOSDATA(x) in DGROUP.
This is necessary since ia16-elf-gcc does not understand data
in far segments.

For non-macro'ed symbols, FP_SEG needs to be replaced by explicit
segment references.
2018-01-11 17:50:31 -05:00
Bart Oldeman 71a7d0d264 ia16-elf-gcc: provide GNU LD linker script and symbols to link kernel.
The resulting kernel and sys.com do not work yet (kernel prints 123 only).
Some functions in sys.com are placeholders.
2018-01-11 17:50:31 -05:00
Bart Oldeman 7bf4b77233 ia16-elf-gcc port: compile all asm files with -f elf.
Because ia16-elf-gcc and the GNU linker do not understand OMF we
need to use ELF everywhere.
This also means we cannot use "wrt", "seg" and "call/jmp far".
Most wrt's are superfluous, and seg and call/jmp far can be
replaced by explicit ?GROUP references (to be defined in the
linker script).
2018-01-11 17:50:31 -05:00
Bart Oldeman fbdbc4c25c C source code changes so the kernel can compile with ia16-elf-gcc.
Use "make all COMPILER=gcc".
Linking does not work yet with these changes.
2018-01-11 17:50:31 -05:00
Bart Oldeman 705268267c Use DOSTEXTFAR and DOSFAR for kbdType and internal_data. 2018-01-11 17:50:31 -05:00
Bart Oldeman 0b26c3f18f NLS: clean up to use the struct more and fewer relocations. 2018-01-11 17:50:31 -05:00