Actually 0040:0084 is not reliable. 0040:0084 is populated by the EGA/VGA bios only. All variables after 0071 are not standardized and you cannot, generally speaking, rely on them. You might want to re-read the PC Bible by Michael Tischer ;-) I have an original copy available.
Anyway, the patch is easy. I guess the value is 0 on pre-EGA machines, as this area is zeroed at boot time. Which is consistent with the one line display if I read your code correctly. Detecting the video card before EGA/VGA is not simple. You need to make some tests. Again, the PC Bible provides an example of routine to do so, but I think this would be over-engineering in our case. Better keep this for a benchmark tool or if you have a diagnostic tool in freedos and just check for 0 at 0040:0084. Le 27.05.2015 20:35, JAYDEN CHARBONNEAU a écrit : > Huh.I thought all screens had the same columns and rows (Different > scales,obviously),but the same text slots.Apparently CGA monitors are > different. > > On Wed, May 27, 2015 at 2:20 PM, Mateusz Viste <mate...@viste.fr > <mailto:mate...@viste.fr>> wrote: > > On 25/05/2015 06:33, Ralf Quint wrote: > >> DIR: When using DIR/P, DIR seems to think that the screen is > 1-row high, > >> and asks for a keypress for every line (the screen is > CGA-based, 25 > rows). > > That must be some issue with your PC, works fine for me and > should not > > be related to 8086 code or not at all... > > Hi, I had a few minutes of time to look into this. And what I was > half-guessing two days ago seems correct: my PC is fine, that's > FreeCOM > who's buggy. > > Here is an extract of what makes the DIR command wait after a page of > text (extracted from SVN's trunk and slightly reformatted for better > mail readability): > > /* increment our line if paginating, display message at end of > screen */ > static int incline(void) { > if (!optP) return E_None; > if (++line >= MAX_Y) { > line = 0; > return pause(); > } > return 0; > } > > Now the obvious question of course is "what is MAX_Y?". And one grep > later, I've got the answer: > > $ grep 'MAX_Y' -R * > cmd/dir.c: if (++line >= MAX_Y) > include/misc.h:#define MAX_Y (*(unsigned char far*)MK_FP(0x40, 0x84)) > include/misc.h:#define SCREEN_ROWS (MAX_Y + 1) > (...) > > This is exactly what I was implying in my previous message - FreeCOM > doesn't care about CGA, and assumes that the screen's height will > always > be available under 0040:0084, which is true only for EGA+. > > Mateusz > > > > ------------------------------------------------------------------------------ > _______________________________________________ > Freedos-devel mailing list > Freedos-devel@lists.sourceforge.net > <mailto:Freedos-devel@lists.sourceforge.net> > https://lists.sourceforge.net/lists/listinfo/freedos-devel > > > > > ------------------------------------------------------------------------------ > > > _______________________________________________ > Freedos-devel mailing list > Freedos-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/freedos-devel ------------------------------------------------------------------------------ _______________________________________________ Freedos-devel mailing list Freedos-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-devel