Re: [Freedos-devel] Re: How to detect if fd #0/#1 are the local console

2004-08-07 Thread Bart Oldeman
Hi Tom,


  The only reliable way is to trap int10, write a character using int21 and
  see if it gets trapped.

 I've seen (N)ANSI.SYS implementations doing direct screen IO.

You're quite right about that so this is not good.

 however: talking about CLS, why not

   1'st) write ESC J  (or similar)
   2'nd) clear the screen, using BIOS.

 ALL screens will be blank then - as intended.

No, if the output goes to COM1 and not CON then the screen should be
cleared on COM1 and not CON.

Keep it simple, checking two bits ought to be enough:
ax=4400, bx=1, int21
if (ax  0x80) /* device */
  if (ax  0x10) /* fastcon */
use bios (int10)
  else
use escape sequences
else /* file */
  do nothing

MS COMMAND.COM actually does:

INT2F at 8d5e:3397: AX=1a00, BX=3391, CX=, DX=867e, DS=8d5e, ES=8d5e
INT21 (0) at 8d5e:33aa: AX=440c, BX=0001, CX=037f, DX=db6f, DS=8d5e,
INT21 (0) at 8d5e:33c0: AX=4400, BX=0001, CX=037f, DX=db6f, DS=8d5e,
INT10
(see also my previous email what happens if you clear the fastcon bit)

But NANSI.SYS doesn't support int2f/AX=1a00 or the device driver ioctl
corresponding to 440C, so the first two aren't that important -- on a
local display we can use int10 anyway.

Bart


---
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
___
Freedos-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freedos-devel


[Freedos-devel] ANNOUNCE: DISPLAY 0.11

2004-08-07 Thread Aitor SantamarĂ­a Merino
Hi all,
I announce version 0.11 of FD-DISPLAY, with several new features:
- It implements a new MODULE for the CGA hardware type (CGA adapters), 
thus making unnecessary the existence of a GRAFTABL tool for the FreeDOS 
project. This is yet untested (I have no CGA cards handy). Furthermore, 
any other GRAFTABL is prevented from loading
- It allocates buffers to XMS if available, thus saving 9-10KB of 
convenctional memory for each buffer (in the most frequent case of a 
single buffer, resident TPA memory size reduces to about 11KB. The 
SELECT buffer has now the approrpiate size (and may save even more KBs 
on CGA and EGA)
- DISPLAY is now DISPLAY.EXE (instead of DISPLAY.COM), with the same 
resident size, in the hope that it will bypass the kernel UMB allocation 
bug for COM files (as reported by Bernd). Notice that in few more 
versions it'll be turned into a SYS
- Better commandline parsing (tab, #10 are now blanks also)
- The maximum number of allocated buffers now depends on buffer size and 
available memory (and is no longer of 5), with a maximum of 8 (or the 
available memory)
- FIX: the limit mentioned in the previous item was not observed when 
you specify the fonts explicitely in the commandline.

Unfortunately, the new version (that has already been tested and seems 
to work) requires that FD-MODE be modified to admit this new version 
(it's simply that FD-MODE allows version 0.10, and has to check wether 
version=0.10 OR version=0.11).

Download links:
executable: 
http://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/dos/display/disp011x.zip
source: 
http://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/dos/display/disp011s.zip

Happy testing...
Aitor
---
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
___
Freedos-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freedos-devel