Commit Graph

396 Commits

Author SHA1 Message Date
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
Bart Oldeman
fdac78cc67 Fix compilation with TC2 (no // comments; a global variable needs ASM) 2017-12-22 13:14:11 -05:00
Bart Oldeman
33d707ba7f Fix compilation with MSVC 1.52c.
Needs one more file from the c library, BSS_INIT all uninitialized
globals in config.c and a define of SEEK_SET.
2017-12-22 13:13:37 -05:00
Bart Oldeman
e82de4b707 Introduce end-of-line normalization 2017-12-22 09:37:31 -05:00
Bart Oldeman
ab6d98ff56 .gitignore: be more thorough 2017-12-22 09:37:31 -05:00
Stas Sergeev
44cf0a17a1 fix and enable i386 support
This gives ~5K size reduction with bc3.1.
Today no one uses pre-i386 CPUs so there is no good
reason against having an extra optimization.
2017-12-06 23:13:47 -05:00
Stas Sergeev
8187fd8153 disk: fix sectors count truncation for CHS [fixes #10]
LBA_to_CHS() uses geometry taken from BIOS, but LBA_Transfer()
was using the geometry from VBR. This caused "count" variable
to underflow over unsigned long, then corrupting the entire
DOS memory with the large read.

This patch makes LBA_to_CHS() to return the geometry to caller,
so that the calculus do always match.

Thanks to @ecm-pushbx and @andrewbird for helping to
nail this down.
2017-09-22 23:03:47 -04:00
Stas Sergeev
5fb0c4482d config: enable fat32 support
These days everyone wants fat32 support. :)
2017-09-22 07:12:15 -04:00
PerditionC
2835dfe920 Merge pull request #8 from stsp/chain
Implement CHAIN directive
2017-02-11 13:00:40 -05:00
Stas Sergeev
0b541ffd81 implement CHAIN directive for config.sys 2016-10-07 00:22:56 +03:00
Stas Sergeev
baad0b69dd remove trailing spaces in config.c 2016-10-06 23:01:14 +03:00
Stas Sergeev
5c168c350e add bc3 build support 2016-10-06 07:23:59 -04:00
Stas Sergeev
f4c9691ef5 fix watcom check
WATCOM var may be defined in autoexec.bat, but this doesn't
mean the user wants to build with watcom.
Check the COMPILER="WATCOM" instead.
2016-10-06 07:23:59 -04:00
Stas Sergeev
0b303a23b4 nasm16 no longer exists 2016-10-06 07:23:59 -04:00
Stas Sergeev
68693a71c5 add missing ASM to fix build
Without this I am getting undefined reference to
_ReturnAnyDosVersionExpected
2016-10-06 07:23:59 -04:00
Stas Sergeev
e698ae2b3b unix2dos bat files
ms-dos/pc-dos command.com does not understand unix line-endings.
2016-10-06 07:23:59 -04:00
PerditionC
63b31b301d Merge pull request #4 from lpproj/fix_20160206
some fixes (initial DTA and NUL device)
2016-10-05 17:50:51 -04:00
KJD
5406ba5a9b add initial tests for DOS absolute sector read/write 2016-05-12 19:44:39 -04:00
KJD
bdc2e068c4 remove some additional built files during clobber, ignore command.com in bin directory 2016-05-12 19:05:02 -04:00
KJD
99a5e09f28 update history (based on git log) 2016-05-10 00:50:08 -04:00
KJD
14906e110d Update contributors list 2016-05-10 00:06:15 -04:00
KJD
445aee81d3 merge changes with SVN source for building packagesignore svn or git hidden directories, default to build with win support, better usage message. 2016-05-09 23:35:14 -04:00
lpproj
cab8092ad6 Fix memory break in NUL device 2016-02-06 13:43:34 +09:00
lpproj
e024f72a4c Fix initial DTA 2016-02-06 13:32:36 +09:00
KJD
c9300387e7 Implement Int 2F/AX=120Bh based on RBIL description 2016-01-16 20:56:29 -05:00