sync on : sync rate 60
set text size 13 : set text font "arial"
rem setup memory bar type holder
type Membar
name$ as string
x1 as integer
y1 as integer
x2 as integer
y2 as integer
bdr as integer
width as integer
height as integer
memory as integer
endtype
dim Membar(3) as Membar
Membar(1).height = 8
Membar(1).width = 256
Membar(1).x1 = 10
Membar(1).y1 = 10
Membar(1).x2 = Membar(1).x1 + Membar(1).width
Membar(1).y2 = Membar(1).y1 + Membar(1).height
Membar(1).bdr = 2
Membar(1).name$ = "dmem"
Membar(1).memory = system dmem available()
Membar(1).memory = Membar(1).memory /1024
Membar(1).memory = Membar(1).memory /1024
Membar(2).height = 8
Membar(2).width = 256
Membar(2).x1 = 10
Membar(2).y1 = 40
Membar(2).x2 = Membar(2).x1 + Membar(2).width
Membar(2).y2 = Membar(2).y1 + Membar(2).height
Membar(2).bdr = 2
Membar(2).name$ = "smem"
Membar(2).memory = system smem available()
Membar(2).memory = Membar(2).memory /1024
Membar(2).memory = Membar(2).memory /1024
Membar(3).height = 8
Membar(3).width = 256
Membar(3).x1 = 10
Membar(3).y1 = 70
Membar(3).x2 = Membar(3).x1 + Membar(3).width
Membar(3).y2 = Membar(3).y1 + Membar(3).height
Membar(3).bdr = 2
Membar(3).name$ = "tmem"
Membar(3).memory = system tmem available()
Membar(3).memory = Membar(3).memory /1024
Membar(3).memory = Membar(3).memory /1024
disable escapekey
while escapekey()=0
for i = 1 to 3
Display_Membar(i)
next i
sync
endwhile
undim Membar(3)
end
function Display_Membar(Num)
ink rgb(192,192,192),1
box Membar(Num).x1,Membar(Num).y1,Membar(Num).x2,Membar(Num).y2
ink rgb(32,32,32),1
box Membar(Num).x1+Membar(Num).bdr,Membar(Num).y1+Membar(Num).bdr,Membar(Num).x2-Membar(Num).bdr,Membar(Num).y2-Membar(Num).bdr
if Membar(Num).memory > Membar(Num).width
ink rgb(32,192,32),1
box Membar(Num).x1+Membar(Num).bdr+1,Membar(Num).y1+Membar(Num).bdr+1,Membar(Num).x1+Membar(Num).width-Membar(Num).bdr-1,Membar(Num).y2-Membar(Num).bdr-1
else
ink rgb(32,192,32),1
box Membar(Num).x1+Membar(Num).bdr+1,Membar(Num).y1+Membar(Num).bdr+1,Membar(Num).x1+Membar(Num).memory-1,Membar(Num).y2-Membar(Num).bdr-1
endif
ink rgb(255,255,55),1
text Membar(Num).x1+Membar(Num).bdr+2,Membar(Num).y1 + Membar(Num).height+2,Membar(Num).name$+" "+STR$(Membar(Num).memory)+"megs"
endfunction
in this snippet look at these functions within the manual
system dmem available()
system smem available()
system tmem available()
change them to suit your requirements as there is a few others iirc.