aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeffrey Armstrong <jeff@approximatrix.com>2024-11-29 17:28:27 -0500
committerJeffrey Armstrong <jeff@approximatrix.com>2024-11-29 17:28:27 -0500
commit56c834361c57ba9fdec17ebc0adcbe2738309e85 (patch)
treed04f0fbcee68abb8ae322b7753dab0284717d615
parent0de2625936fd03430ff096d8d1d8357826587cc7 (diff)
downloadGWFetch-56c834361c57ba9fdec17ebc0adcbe2738309e85.tar.gz
GWFetch-56c834361c57ba9fdec17ebc0adcbe2738309e85.zip
chkdsk output is now converted to kilobytes.
-rw-r--r--gwfetch.bas9
1 files changed, 6 insertions, 3 deletions
diff --git a/gwfetch.bas b/gwfetch.bas
index 6baaddb..dc71cae 100644
--- a/gwfetch.bas
+++ b/gwfetch.bas
@@ -140,9 +140,12 @@
11090 IF LEN(MEMTOTAL$) = 0 OR LEN(MEMFREE$) = 0 THEN GOTO 11040 ELSE GOTO 11110
11100 RESUME 11110
11110 CLOSE#2
-11120 TOTRIM$ = MEMTOTAL$:GOSUB 30000:MEMTOTAL$ = TOTRIM$
-11130 TOTRIM$ = MEMFREE$:GOSUB 30000:MEMFREE$ = TOTRIM$
-11140 RETURN
+11119 REM Convert to kB since chkdsk is not going to return >1MB in most cases
+11120 MEMNUM = VAL(MEMTOTAL$):MEMNUM = INT(MEMNUM/1024)
+11130 TOTRIM$ = STR$(MEMNUM):GOSUB 30000:MEMTOTAL$ = TOTRIM$+"kB"
+11140 MEMNUM = VAL(MEMFREE$):MEMNUM = INT(MEMNUM/1024)
+11150 TOTRIM$ = STR$(MEMNUM):GOSUB 30000:MEMFREE$ = TOTRIM$+"kB"
+11160 RETURN
12000 REM CPU Identity
12001 CPUQ = 0:CPUID% = 0