Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

Tiny C Compiler 0.9.27 (Announce)

posted by bencollver Homepage, 15.02.2026, 01:52

I reviewed Detlef Reimers changes in tcc4dos compared to the official 0.9.25 sources. The TCC source code directory tree was flattened and the files were renamed, but i was able to figure it out which files they corresponded to.

crt1.c
======

_start()

just before _controlfp() is the following TCC-specific inline ASM:

  asm("int $0x1A" : "=d" (_RNUM) : "a" (0), "d" (0));

https://delorie.com/djgpp/doc/rbinter/id/80/22.html

If i read this correctly, this gets the system time in ticks into a global variable named _RNUM. This change is only made in crt1.c and is not present in wincrt1.c.

This _RNUM variable is used by a pseudo-random number generator in graphic.c.

delay.s
=======

This is a new file. It looks like a wrapper around the watcom delay() function. I don't really understand why it is there, and i don't believe this file is being used.

dllcrt.c
========

_dllstart()

just before the return statement is the following TCC-specific inline ASM:

asm("int $0x21" : : "a" ((short) 0xC06), "d" ((char) 0xFF));

https://delorie.com/djgpp/doc/rbinter/id/78/25.html
https://delorie.com/djgpp/doc/rbinter/id/70/25.html

Appears to be "flush buffer and read character from stdin"

My guess is that this is debugging code to add a pause at the end of DLL initialization?

dpmi.s
======

DPMI.S: Functions for accessing DOS interrupts and memory.
For TCC under the HXRT DOS extender (see hxdos.c).

https://downloads.openwatcom.org/ftp/devel/docs/dpmi10.pdf

hxdos.c
=======

// HXDOS.C: Functions for accessing DOS interrupts and memory.
// For TCC under the HXRT DOS extender (see dpmi.s).

To me it looks as though hxdos.c uses routines defined in dpmi.s.
The routines in hxdos.c are used in in grp/graphic.c and the examples under the xmp/ directory.

libtcc.c
========

include paths are changed from /include to /inc

tccelf.c
========

library name is changed from libtcc1.a to libt.a

tccpe.c
=======

library name is changed from tcc1 (tcc1.dll?) to t (t.dll?)

dll/vedasadll.c
===============

VESA graphics functions.


* * *

dpmi.s and parts of hxdos.c look potentially useful.

I don't plan to write graphical programs, but if i did, i might prefer to use sdl4dos and pull changes from DOSBox-X.

https://github.com/pdpdds/sdl4dos

"The SDL1 library distributed with DOSBox-X had been heavily modified from the original to support for example native OS menus."

https://personaljuan.github.io/dosbox-x/BUILD.html#to-compile-dosbox-x-for-dos-with-hx-dos-platform

 

Complete thread:

Back to the forum
Board view  Mix view
23154 Postings in 2179 Threads, 404 registered users (0 online)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum