Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --local str = ""
- local tab = {}
- local gpu = component.list("gpu")()
- local screen = component.list("screen")()
- component.invoke(gpu, "bind", screen)
- local comp = computer
- do
- local w,h = component.invoke(gpu, "getResolution")
- component.invoke(gpu, "fill", 1, 1, w, h, " ")
- end
- gpu = component.proxy(gpu)
- function update()
- -- local free = comp.freeMemory()
- gpu.set(1, 1, "Memory used: " .. (comp.totalMemory()-comp.freeMemory()).." ")
- gpu.set(1,2 ,"Memory free: " .. comp.freeMemory().." ")
- gpu.set(1,3,"Total: " .. #tab .. " ")
- end
- update()
- while true do
- if comp.freeMemory() < 10 then
- gpu.set(1, 5, "Memory low! " ..comp.freeMemory())
- while comp.pullSignal() ~= "key_up" do end
- gpu.set(1, 5, " ")
- end
- --str = str .. "A"
- tab[#tab+1]="A"
- if (#tab % 100) == 0 then
- update()
- comp.pullSignal(0.05)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement