From efe3864814443b09b563fe3359f3b82dc8bf925d Mon Sep 17 00:00:00 2001 From: Connor Olding Date: Wed, 2 Dec 2015 09:43:54 -0800 Subject: [PATCH] notes --- README.md | 9 +++++++++ lips.lua | 3 ++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5ec890b..f6517ad 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,10 @@ An assembler for the MIPS R4300i architecture, written in Lua. +This is not a 'true' assembler; it won't produce executable binary files. +This was intended to assist in hacking N64 games. +It does little more than output hex. + Not for production. Much of the code and syntax is untested and likely to change. Even this README is incomplete. @@ -37,11 +41,16 @@ Instructions were primarily referenced from [the N64 Toolkit: Opcodes.][n64op] A more in-depth look at instructions for MIPS IV processors in general is given by [the MIPS IV Instruction Set manual.][mipsiv] +[The MIPS64 Instruction Set manual][mips64] is sometimes useful. +Much of it doesn't apply to our older MIPS IV architecture, +but it's a little cleaner than the older manual. + There's also a brief and incomplete [overview of MIPS instructions.][overview] First-time writers of MIPS assembly may find this the most useful. [n64op]: https://github.com/mikeryan/n64dev/tree/master/docs/n64ops [mipsiv]: http://www.cs.cmu.edu/afs/cs/academic/class/15740-f97/public/doc/mips-isa.pdf +[mips64]: http://scc.ustc.edu.cn/zlsc/lxwycj/200910/W020100308600769158777.pdf [overview]: http://www.mrc.uidaho.edu/mrc/people/jff/digital/MIPSir.html ### Unimplemented diff --git a/lips.lua b/lips.lua index ac76e0d..497218f 100644 --- a/lips.lua +++ b/lips.lua @@ -982,7 +982,8 @@ function Parser:instruction() local im = self:const() local is_label = im[1] == 'LABELSYM' - -- this is really just semantics as far as i can tell + -- for us, this is just semantics. for a "real" assembler, + -- LA could add an appropriate RELO directive. if h == 'LI' and is_label then self:error('use LA for labels') end