Commit Graph

19 Commits

Author SHA1 Message Date
Jiri Malak
db43a4b343 far-fix: symbols BIOSInt13, UserInt13 and BIOSInt19 are far (in LGROUP)
these symbols are in LGROUP and generaly cannot be addressed by DGROUP:offset
for Turbo C DGROUP offset overflow because symbols are too far to be addressed by DGROUP offset
2024-07-15 15:21:36 -04:00
Jiri Malak
2985b3386c ow: use safer form of #pragma aux
using ISO standard reserved word form of #pragma aux
2024-07-11 06:35:41 -04:00
Jiri Malak
5304e657fd time.t: resolve issue with internal and standard C time.h files and remove all hacks
- fix issue by renaming header file and symbols which consolidate with standard C time.h
- rename also date.h for consistency
- remove all hacks from make files and from sys.c

now can share new dtime.h with standard C time.h without any collision that any order of internal and standard C header path is possible
2024-07-10 11:32:10 -04:00
Jiri Malak
4ca28252da code-mismatch: fix various kernel code discrepancies which break TURBO C build
main issue is missing ASM attributes that C and asm code uses different names
correct long constant by standard suffix 'L' or 'UL'
2024-07-10 11:30:20 -04:00
C. Masloch
3d1ba0d486 config: build master environment during FDCONFIG.SYS processing
lDebug wants to access the environment while executing
as a device driver. Instead of building it in a variable
then copying it to 68h:0 after FDCONFIG.SYS processing,
just build it there to begin with.
2023-07-03 07:37:00 -04:00
C. Masloch
d91c14723a kernel: optimise A20 check and enable/disable calls
Some assembly tricks:

* SMC instead of checking the XMS driver address
in the DOS DS stub,

* SMC so that the address goes right into a
`call far immediate` instruction,

* use `repe cmpsw` to compare multiple words (saves
space over the individual word compares),

* near calls to far functions use push cs to build
a far-call stack frame,

* segments 0 and FFFFh generated by segment arithmetic
instead of loading from memory,

* common case (A20 already enabled) made to be the case
where the conditional branch just falls through, which
may be slightly better.
2022-05-29 19:24: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
8ee8135d4f ia16-elf-gcc port: use CDECL = __attribute__((cdecl)) instead of varargs. 2018-07-12 10:56:26 -04: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
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
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
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
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
KJD
c431157156 FreeDOS kernel current - 2041+svn1709 2012-10-14 20:08:06 -04:00