Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

Interesting Project: dosfetch like neofetch (Announce)

posted by Rugxulo Homepage, Usono, 21.03.2024, 05:07

> https://github.com/leahneukirchen/dosfetch
>
> One of the hallmarks of modern Linux CLI environments differentiating the
> various distro vendors is a linux tool called neofetch.  A tool
> which probes the local environment will let you know some of the key
> features or metrics of the local environment (CPU, RAM, DISK, NET usage,
> OS flavor, CPU vendor, Hypervisor vendor) and pretty print that info (great
> for CLI OS screen captures to make them nicer looking/more appealing). 
> Somewhat akin to a combination of `uname`, `top`, and others.

DJGPP's ShellUtils does have uname, which (since /beta/ 2.04 ?) does correctly report "FreeDOS". It actually prints (for me) "FreeDOS pc 7 10 i686 unknown". Not perfect but better than nothing. (As you know, some makefiles and shell scripts need this.)

I kept meaning to nitpick (not complain, just mention a few quirks) but never got around to it.

In particular, this kind of "Turbo Pascal" code can be portable across newer "{$mode tp}" dialect compilers and maybe even OSes (and avoid bugs with old compiler RTLs or lack of FAT32 support, etc). In other words, it shouldn't be tied exclusively to "TP 6+" or even Borland's specific TP implementation at all.

1). "Needs" TP 6+ because of inline asm {that dependency can be minimized}
2). Incorrectly reports "Disk: 31876/-57352 KB (156% free)" {FPC supports int64}
3). Incorrectly reports "Ext. Memory: -565568 KB"
4). Incorrectly reports "Floating Point Unit: no"
5). "uses crt, dos;"
- {CRT unit of TP has known problems with Delay and initialization}
- {DOS unit of TP is not FAT32 aware}
6). calls "int $12" for conventional memory
7). calls "int $15,$88" or "int $15,$E801" for extended memory
8). only calls "int $21,$36" for disk size
9). only calls "int $21,$3000" or "int $21,$3306" for DOS version
- DR-DOS 7 fakes being PC-DOS 6 unless you call "int $21, 'DR'" ($4452)
10). calls "int $11" for floppy and FPU

TP already has "dosversion" (use "hi", "lo"), "test8087", "memavail" (conv.), "intr" (calling int $11 or $12), "msdos" (calling int $21), "disksize", "diskfree" (FPC supports FAT32, i.e. int $21,$7303), "test8086" (0=8086, 1=286, 2=386).

 

Complete thread:

Back to the forum
Board view  Mix view
22049 Postings in 2034 Threads, 396 registered users, 231 users online (0 registered, 231 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum