diff options
author | Jeffrey Armstrong <jeff@approximatrix.com> | 2024-12-02 16:59:10 -0500 |
---|---|---|
committer | Jeffrey Armstrong <jeff@approximatrix.com> | 2024-12-02 16:59:10 -0500 |
commit | ef1650d4c025858f1a0ce27768c1fb00d753f564 (patch) | |
tree | d5ac5da9b454f91d8feeee8d830d2e9fa642087e | |
parent | 4fe578bc33ecc8f279a00fa6c18cd78d3b558380 (diff) | |
download | GWFetch-ef1650d4c025858f1a0ce27768c1fb00d753f564.tar.gz GWFetch-ef1650d4c025858f1a0ce27768c1fb00d753f564.zip |
Added support for parsing mem command on freedos
-rw-r--r-- | gwfetch.bas | 6 |
1 files 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
|