Hi, as Blair (also) wants a shorter beep in FreeCOM, I suggest
to do the following:

- edit beep_l.c and beep_n.c and remove the sound() / delay() / nosound()
  and replace them by "printf("\b");" or similar. A more sophisticated
    solution would involve an option to the BEEP command of FreeCOM which
  would allow you to switch between BIOS beep and HARDWARE beep.

While we are at it, it would be very useful (modern PCs are too
fast for stock Turbo C delay()!) to replace all delay() calls.
The only ones outside the two beep*.c files are in command.c
and in cgetttime.c, and the latter should better call int 2a.84
or similar (some idle call) instead of using delay anyway, while
the former just uses the delay for hangForever...

I hope FreeCOM checks if the kernel supports FAT32 before it calls
FAT32 stuff? Did anybody test FreeCOM on stock MS DOS 6 kernels?

I have ASM sources to play sounds, delay for N ticks, stop sounds,
and to clear the screen while properly looking for the geometry...
But of course you can also get C versions of that if you want:

outb 43,b6 outb 42,low outb 42,high outb 61, inb 61 or 3 --> simple
  sound playing, low/high is a divisor for 1.2mhz clock.
outb 61, inb 61 and fc --> simple nosound
some fiddling with [40:6c] --> simple delay

Three library functions less, probably the whole CRT unit avoided
(in combination with using our own clearscreen) and no longer long
annoying beeps on some hardware (e.g. DOSEMU or Blair's PC).

Some other notes from my archives:

>   freecom/cmd/cls.c - uses int 10 to scroll, goxy() to move cursor, misc.h
>   SCREEN_ROWS / SCREEN_COLS for sizing, both macros using 40:xx values,
>   no EGA checks done, so SCREEN_ROWS could be bogus. Possible solutions:
>   use 25 if less than 25, or use 25 if 40:10 and 30 is not 00.
>   goxy.c hardcodes to page 0, 40:62 would be better...
>   int wherex() and int wherey() are from Turbo C conio.
> 
> #define MAX_X (*(unsigned int  far*)MK_FP(0x40, 0x4a))
> #define MAX_Y (*(unsigned char far*)MK_FP(0x40, 0x84))
> #define SCREEN_COLS MAX_X
> #define SCREEN_ROWS (MAX_Y + 1)
>   max_x is more or less a misnomer... but screen_cols=40:4a is okay
>   max_y also used in incline, tab completion, f5 key, typing.


Eric



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel

Reply via email to