From ef1650d4c025858f1a0ce27768c1fb00d753f564 Mon Sep 17 00:00:00 2001 From: Jeffrey Armstrong Date: Mon, 2 Dec 2024 16:59:10 -0500 Subject: Added support for parsing mem command on freedos --- gwfetch.bas | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gwfetch.bas b/gwfetch.bas index d85eac6..0445d20 100644 --- a/gwfetch.bas +++ b/gwfetch.bas @@ -56,7 +56,9 @@ 410 IF DOSBOX = 1 THEN GOSUB 14700:GOTO 500 419 REM MS-DOS version 4 and up should have MEM available as a cmd 420 IF OEM$ = "MS-DOS" AND VAL(DVERMAJOR$) >= 4 THEN CMD$ = "mem":GOSUB 5000:GOSUB 15000:GOTO 500 -430 CMD$ = "chkdsk":GOSUB 5000:GOSUB 11000 +429 REM FreeDOS mem is the spitting image of MS-DOS mem +430 IF OEM% = &HFD THEN CMD$ = "mem":GOSUB 5000:GOSUB 15000:GOTO 500 +440 CMD$ = "chkdsk":GOSUB 5000:GOSUB 11000 500 REM Just produce an MSDOS logo for now 510 DIM LOGO$(25) @@ -465,7 +467,7 @@ 15012 REM MEMFREE$ is the available memory in bytes 15020 MEMTOTAL$ = "":MEMFREE$ = "":MEMLINE$ = "" 15030 OPEN TMPFILE$ FOR INPUT AS #2 -15040 INPUT#2, MEMLINE$ +15040 LINE INPUT#2, MEMLINE$ 15050 IF INSTR(MEMLINE$, "Total memory") > 0 THEN GOTO 15070 15060 IF EOF(2) THEN GOTO 15070 ELSE GOTO 15040 15070 CLOSE #2 -- cgit v1.2.3