mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-13 03:54:06 +09:00
blink -> setCursorBlink
Former-commit-id: 37105b9ce26db26b45b649bbe4b9c0718792f4fb Former-commit-id: 10252f6825fa6afa0942220dee4f568be21fe64b
This commit is contained in:
@@ -62,19 +62,17 @@ end
|
|||||||
print("Rom basic "..DC2.._VERSION..DC4)
|
print("Rom basic "..DC2.._VERSION..DC4)
|
||||||
print("Copyright (C) 1994-2015 Lua.org, PUC-Rio")
|
print("Copyright (C) 1994-2015 Lua.org, PUC-Rio")
|
||||||
print(DC2..tostring(math.floor(getFreeMem()/1024+0.5))..DC4.." Kbytes free")
|
print(DC2..tostring(math.floor(getFreeMem()/1024+0.5))..DC4.." Kbytes free")
|
||||||
print("To boot your system, run 'boot()'")
|
|
||||||
print("Ok")
|
print("Ok")
|
||||||
|
|
||||||
while not native.isHalted() do
|
while not native.isHalted() do
|
||||||
while not native.isHalted() do
|
io.write(_COMPUTER.prompt)
|
||||||
io.write(_COMPUTER.prompt)
|
local s = io.read()
|
||||||
local s = io.read()
|
xpcall(
|
||||||
xpcall(
|
function() _G.runscript(s, "=stdin") end,
|
||||||
function() _G.runscript(s, "=stdin") end,
|
function(s) print(DLE..s) end -- it catches logical errors
|
||||||
function(s) print(DLE..s) end -- it catches logical errors
|
)
|
||||||
)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
native.closeInputString()
|
native.closeInputString()
|
||||||
__haltsystemexplicit__()
|
__haltsystemexplicit__()
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ _G.__scanforline__ = function(echo) -- pass '1' to not echo; pass nothing to ech
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- use Keys API to identify the keycode
|
-- use Keys API to identify the keycode
|
||||||
_G.__scanforchar__ = function(echo) -- pass '1' to not echo; pass nothing to echo
|
_G.__scanforkey__ = function(echo) -- pass '1' to not echo; pass nothing to echo
|
||||||
native.closeInputString()
|
native.closeInputString()
|
||||||
native.openInput(echo or 0)
|
native.openInput(echo or 0)
|
||||||
_G.__scanMode__ = "a_key"
|
_G.__scanMode__ = "a_key"
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ class BaseTerrarumComputer(val term: Teletype? = null) {
|
|||||||
|
|
||||||
val DEBUG_UNLIMITED_MEM = false
|
val DEBUG_UNLIMITED_MEM = false
|
||||||
|
|
||||||
val luaJ_globals: Globals = JsePlatform.standardGlobals()
|
val luaJ_globals: Globals = JsePlatform.debugGlobals()
|
||||||
|
|
||||||
var termOut: PrintStream? = null
|
var termOut: PrintStream? = null
|
||||||
private set
|
private set
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ internal class Term(globals: Globals, term: Teletype) {
|
|||||||
globals["term"]["getY"] = Term.GetCursorY(term)
|
globals["term"]["getY"] = Term.GetCursorY(term)
|
||||||
globals["term"]["setX"] = Term.SetCursorX(term)
|
globals["term"]["setX"] = Term.SetCursorX(term)
|
||||||
globals["term"]["setY"] = Term.SetCursorY(term)
|
globals["term"]["setY"] = Term.SetCursorY(term)
|
||||||
globals["term"]["blink"] = Term.SetCursorBlink(term)
|
globals["term"]["setCursorBlink"] = Term.SetCursorBlink(term)
|
||||||
globals["term"]["size"] = Term.GetSize(term)
|
globals["term"]["size"] = Term.GetSize(term)
|
||||||
globals["term"]["height"] = Term.GetHeight(term)
|
globals["term"]["height"] = Term.GetHeight(term)
|
||||||
globals["term"]["isCol"] = Term.IsColour(term)
|
globals["term"]["isCol"] = Term.IsColour(term)
|
||||||
|
|||||||
@@ -111,5 +111,8 @@
|
|||||||
{2}{153.90001pt}}
|
{2}{153.90001pt}}
|
||||||
\@writefile{toc}{\contentsline {section}{\numberline {4.1}Line Printer}{28}{section.4.1}}
|
\@writefile{toc}{\contentsline {section}{\numberline {4.1}Line Printer}{28}{section.4.1}}
|
||||||
\@writefile{toc}{\contentsline {subsection}{\numberline {4.1.1}Functions}{28}{subsection.4.1.1}}
|
\@writefile{toc}{\contentsline {subsection}{\numberline {4.1.1}Functions}{28}{subsection.4.1.1}}
|
||||||
\memsetcounter{lastsheet}{29}
|
\@writefile{lof}{\addvspace {10pt}}
|
||||||
\memsetcounter{lastpage}{29}
|
\@writefile{lot}{\addvspace {10pt}}
|
||||||
|
\@writefile{toc}{\contentsline {chapter}{\chapternumberline {5}References}{29}{chapter.5}}
|
||||||
|
\memsetcounter{lastsheet}{31}
|
||||||
|
\memsetcounter{lastpage}{31}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
This is LuaTeX, Version beta-0.80.0 (TeX Live 2015) (rev 5238) (format=lualatex 2015.10.5) 22 SEP 2016 13:09
|
This is LuaTeX, Version beta-0.80.0 (TeX Live 2015) (rev 5238) (format=lualatex 2015.10.5) 22 SEP 2016 18:24
|
||||||
restricted \write18 enabled.
|
restricted \write18 enabled.
|
||||||
file:line:error style messages enabled.
|
file:line:error style messages enabled.
|
||||||
**romapidoc.tex
|
**romapidoc.tex
|
||||||
@@ -552,7 +552,7 @@ luatexbase-attr: luatexbase.attributes["luaotfload@cursbase"] = 6
|
|||||||
luatexbase-attr: luatexbase.attributes["luaotfload@curscurs"] = 7
|
luatexbase-attr: luatexbase.attributes["luaotfload@curscurs"] = 7
|
||||||
luatexbase-attr: luatexbase.attributes["luaotfload@cursdone"] = 8
|
luatexbase-attr: luatexbase.attributes["luaotfload@cursdone"] = 8
|
||||||
luatexbase-attr: luatexbase.attributes["luaotfload@state"] = 9
|
luatexbase-attr: luatexbase.attributes["luaotfload@state"] = 9
|
||||||
luaotfload | main : fontloader loaded in 0.028 seconds
|
luaotfload | main : fontloader loaded in 0.033 seconds
|
||||||
luatexbase-mcb: inserting 'luaotfload.node_processor'
|
luatexbase-mcb: inserting 'luaotfload.node_processor'
|
||||||
at position 1 in 'pre_linebreak_filter'
|
at position 1 in 'pre_linebreak_filter'
|
||||||
luatexbase-mcb: inserting 'luaotfload.node_processor'
|
luatexbase-mcb: inserting 'luaotfload.node_processor'
|
||||||
@@ -1362,7 +1362,7 @@ Underfull \hbox (badness 10000) in paragraph at lines 292--292
|
|||||||
|
|
||||||
[12
|
[12
|
||||||
|
|
||||||
] [13] <mda.pdf, id=152, 597.51233pt x 845.0471pt>
|
] [13] <mda.pdf, id=157, 597.51233pt x 845.0471pt>
|
||||||
File: mda.pdf Graphic file (type pdf)
|
File: mda.pdf Graphic file (type pdf)
|
||||||
<use mda.pdf>
|
<use mda.pdf>
|
||||||
Package pdftex.def Info: mda.pdf used on input line 310.
|
Package pdftex.def Info: mda.pdf used on input line 310.
|
||||||
@@ -1439,37 +1439,41 @@ luaotfload | load : Lookup/name: "MyriadPro" -> "MyriadPro-Bold.otf" [19
|
|||||||
|
|
||||||
] [29
|
] [29
|
||||||
|
|
||||||
|
] [30
|
||||||
|
|
||||||
|
] [31
|
||||||
|
|
||||||
]
|
]
|
||||||
\tf@toc=\write5
|
\tf@toc=\write5
|
||||||
|
|
||||||
\openout5 = romapidoc.toc
|
\openout5 = romapidoc.toc
|
||||||
Package atveryend Info: Empty hook `BeforeClearDocument' on input line 470.
|
Package atveryend Info: Empty hook `BeforeClearDocument' on input line 480.
|
||||||
Package atveryend Info: Empty hook `AfterLastShipout' on input line 470.
|
Package atveryend Info: Empty hook `AfterLastShipout' on input line 480.
|
||||||
|
|
||||||
(./romapidoc.aux)
|
(./romapidoc.aux)
|
||||||
Package atveryend Info: Executing hook `AtVeryEndDocument' on input line 470.
|
Package atveryend Info: Executing hook `AtVeryEndDocument' on input line 480.
|
||||||
Package atveryend Info: Executing hook `AtEndAfterFileList' on input line 470.
|
Package atveryend Info: Executing hook `AtEndAfterFileList' on input line 480.
|
||||||
Package rerunfilecheck Info: File `romapidoc.out' has not changed.
|
Package rerunfilecheck Info: File `romapidoc.out' has not changed.
|
||||||
(rerunfilecheck) Checksum: 3DBAF2167B6CE65D6E1362AF2C8C72DF;1706.
|
(rerunfilecheck) Checksum: 03D8004877E474961620BACB7D2C8DE2;1800.
|
||||||
Package atveryend Info: Empty hook `AtVeryVeryEnd' on input line 470.
|
Package atveryend Info: Empty hook `AtVeryVeryEnd' on input line 480.
|
||||||
)
|
)
|
||||||
|
|
||||||
Here is how much of LuaTeX's memory you used:
|
Here is how much of LuaTeX's memory you used:
|
||||||
25435 strings out of 494693
|
25439 strings out of 494693
|
||||||
125010,552014 words of node,token memory allocated
|
125006,552014 words of node,token memory allocated
|
||||||
722 words of node memory still in use:
|
724 words of node memory still in use:
|
||||||
3 hlist, 1 vlist, 1 rule, 2 glue, 1 kern, 5 attribute, 140 glue_spec, 5 attri
|
3 hlist, 1 vlist, 1 rule, 2 glue, 1 kern, 5 attribute, 140 glue_spec, 5 attri
|
||||||
bute_list, 2 write nodes
|
bute_list, 2 write nodes
|
||||||
avail lists: 2:14425,3:270,4:3582,5:1296,6:6112,7:343,8:17,9:884,10:384
|
avail lists: 2:14425,3:272,4:3580,5:1297,6:6112,7:343,8:18,9:884,10:384
|
||||||
28549 multiletter control sequences out of 65536+600000
|
28550 multiletter control sequences out of 65536+600000
|
||||||
62 fonts using 5300671 bytes
|
62 fonts using 5300671 bytes
|
||||||
55i,12n,59p,1189b,492s stack positions out of 5000i,500n,10000p,200000b,100000s
|
55i,12n,59p,1189b,492s stack positions out of 5000i,500n,10000p,200000b,100000s
|
||||||
</Library/Fonts/MyriadPro-It.otf></Library/Fonts/MyriadPro-Regular.otf></Library
|
</Library/Fonts/MyriadPro-It.otf></Library/Fonts/MyriadPro-Regular.otf></Library
|
||||||
/Fonts/MyriadPro-Bold.otf>
|
/Fonts/MyriadPro-Bold.otf>
|
||||||
Output written on romapidoc.pdf (29 pages, 200660 bytes).
|
Output written on romapidoc.pdf (31 pages, 201848 bytes).
|
||||||
|
|
||||||
PDF statistics: 267 PDF objects out of 1000 (max. 8388607)
|
PDF statistics: 281 PDF objects out of 1000 (max. 8388607)
|
||||||
223 compressed objects within 3 object streams
|
235 compressed objects within 3 object streams
|
||||||
73 named destinations out of 1000 (max. 131072)
|
76 named destinations out of 1000 (max. 131072)
|
||||||
121 words of extra memory for PDF output out of 10000 (max. 10000000)
|
129 words of extra memory for PDF output out of 10000 (max. 10000000)
|
||||||
|
|
||||||
|
|||||||
@@ -13,3 +13,4 @@
|
|||||||
\BOOKMARK [0][-]{chapter.3}{\376\377\000C\000o\000m\000p\000a\000t\000i\000b\000i\000l\000i\000t\000y\000\040\000L\000a\000y\000e\000r\000s\040\024\000O\000p\000e\000n\000C\000o\000m\000p\000u\000t\000e\000r\000s}{}% 13
|
\BOOKMARK [0][-]{chapter.3}{\376\377\000C\000o\000m\000p\000a\000t\000i\000b\000i\000l\000i\000t\000y\000\040\000L\000a\000y\000e\000r\000s\040\024\000O\000p\000e\000n\000C\000o\000m\000p\000u\000t\000e\000r\000s}{}% 13
|
||||||
\BOOKMARK [0][-]{chapter.4}{\376\377\000P\000e\000r\000i\000p\000h\000e\000r\000a\000l\000s}{}% 14
|
\BOOKMARK [0][-]{chapter.4}{\376\377\000P\000e\000r\000i\000p\000h\000e\000r\000a\000l\000s}{}% 14
|
||||||
\BOOKMARK [1][-]{section.4.1}{\376\377\000L\000i\000n\000e\000\040\000P\000r\000i\000n\000t\000e\000r}{chapter.4}% 15
|
\BOOKMARK [1][-]{section.4.1}{\376\377\000L\000i\000n\000e\000\040\000P\000r\000i\000n\000t\000e\000r}{chapter.4}% 15
|
||||||
|
\BOOKMARK [0][-]{chapter.5}{\376\377\000R\000e\000f\000e\000r\000e\000n\000c\000e\000s}{}% 16
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
@@ -274,7 +274,7 @@ Note: cursor coordinates starts from one, not zero.
|
|||||||
\\ \\
|
\\ \\
|
||||||
term.setY(int) & nil & Sets Y coordinate of the cursor.
|
term.setY(int) & nil & Sets Y coordinate of the cursor.
|
||||||
\\ \\
|
\\ \\
|
||||||
term.blink(bool) & nil & Sets cursor blinking. \textbf{true} makes the cursor blink.
|
term.setCursorBlink(bool) & nil & Sets cursor blinking. \textbf{true} makes the cursor blink.
|
||||||
\\ \\
|
\\ \\
|
||||||
term.size() & int, int & Returns width and height of the terminal.
|
term.size() & int, int & Returns width and height of the terminal.
|
||||||
\\ \\
|
\\ \\
|
||||||
@@ -465,6 +465,16 @@ Line printers do not work indefinitely; ignoring the obvious depletion of ink, b
|
|||||||
lp.reset() & nil & Resets the line printer.
|
lp.reset() & nil & Resets the line printer.
|
||||||
\end{tabularx}
|
\end{tabularx}
|
||||||
|
|
||||||
|
\chapter{References}
|
||||||
|
|
||||||
|
Some of the texts are taken from following sources:
|
||||||
|
|
||||||
|
\begin{itemize}
|
||||||
|
\item Lua Manual version 5.2, Lua.org, POC-Rio
|
||||||
|
\item ComputerCraft, dan200
|
||||||
|
\item OpenComputers, MightyPirates
|
||||||
|
\end{itemize}
|
||||||
|
|
||||||
\afterpage{\pagestyle{empty}\null\newpage}
|
\afterpage{\pagestyle{empty}\null\newpage}
|
||||||
|
|
||||||
\end{document}
|
\end{document}
|
||||||
@@ -27,3 +27,4 @@
|
|||||||
\contentsline {chapter}{\chapternumberline {4}Peripherals}{27}{chapter.4}
|
\contentsline {chapter}{\chapternumberline {4}Peripherals}{27}{chapter.4}
|
||||||
\contentsline {section}{\numberline {4.1}Line Printer}{28}{section.4.1}
|
\contentsline {section}{\numberline {4.1}Line Printer}{28}{section.4.1}
|
||||||
\contentsline {subsection}{\numberline {4.1.1}Functions}{28}{subsection.4.1.1}
|
\contentsline {subsection}{\numberline {4.1.1}Functions}{28}{subsection.4.1.1}
|
||||||
|
\contentsline {chapter}{\chapternumberline {5}References}{29}{chapter.5}
|
||||||
|
|||||||
Reference in New Issue
Block a user