about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2023-07-30 13:41:24 +0200
committerLeah Neukirchen <leah@vuxu.org>2023-07-30 13:41:24 +0200
commit53ad24ce6e5bfe81bf62e1e19f84b14cadd6e0c4 (patch)
treecf7b0c79f4776c9a5a9b3ddfe0edf54ef5cbfb43
parent3f0ad2122682f725311a934fc4732b32bea7dc0f (diff)
downloaddosfetch-53ad24ce6e5bfe81bf62e1e19f84b14cadd6e0c4.tar.gz
dosfetch-53ad24ce6e5bfe81bf62e1e19f84b14cadd6e0c4.tar.xz
dosfetch-53ad24ce6e5bfe81bf62e1e19f84b14cadd6e0c4.zip
compute base_memory from int 11h
This should work better on old systems.
-rw-r--r--dosfetch.pas7
1 files changed, 6 insertions, 1 deletions
diff --git a/dosfetch.pas b/dosfetch.pas
index c50cc97..014a793 100644
--- a/dosfetch.pas
+++ b/dosfetch.pas
@@ -23,8 +23,13 @@ begin
 end;
 
 procedure base_memory;
+var a : integer;
 begin
-   writeln(cmos($15) + 256*cmos($16), ' KB');
+   asm
+     int $12;
+     mov a, ax;
+   end;
+   writeln(a, ' KB');
 end;
 
 procedure extended_memory;