是否可以让 .NET/Mono 在 TI-84 或其他 TI 计算器上运行?
有人知道如何才能让 .NET 或 Mono 在 TI 图形计算器上运行吗?我知道完整的框架可能不适合该设备,但一个子集可能会很好地服务。
更新:当我说“.NET / Mono”时,我真正的意思是为设备编译一个 C# 或 VB.NET 应用程序,以便它可以执行。我知道 .NET Framework 很大并且不适合设备,但这不是必需的。您所需要的只是一个 .NET 风格的 API,它将设备的本机功能公开给 C# 或 VB.NET 编程语言。
我只是好奇是否有人研究过这个。我不知道它到底有什么实际应用,但肯定会很有趣。
Anyone know what it would take to get .NET or Mono to run on a TI graphing calculator? I know the full framework probably wouldn't fit on the device, but a subset would probably server very well.
Update: When I say ".NET / Mono," what I am really meaning is to get a C# or VB.NET application to compile for the device so it could execute. I know that the .NET Framework is HUGE and wouldn't fit on the device, but that's not what is necessary. All you'd need is a .NET style API that exposes the devices native functionality to the C# or VB.NET programming languages.
I'm just curious if anyone has looked into this. I don't know what practical applications it would really have, but would definitely be interesting.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
我会非常严重地怀疑这一点。 24K 内存。即使是一个子集也几乎无法容纳。
编辑:按照OP的要求,可以实现“类似.NET”的API,但说实话,这一点有点难以理解。 .NET 的价值不在于其“结构良好的 API”(因为它的结构并不特别令人惊奇);它在于 CIL 和托管代码的使用,以及一些从根本上依赖于这些代码的有趣功能(泛型、lambda 函数、委托等)。
I would very seriously doubt it. 24K of RAM. Even a subset would barely fit.
Edit: It would be possible to implement a ".NET-like" API, as asked by the OP, but to be honest, the point would be a little bit hard to see. The value of .NET is not in its "amazingly well structured API" (because it's not particularly amazingly structured); it's in the usage of the CIL and managed code, and some interesting features that fundamentally depend on those (generics, lambda functions, delegates, etc.).
这个虚构的嵌入式 .NET 平台 - 我们可以称之为“D2ME”,
对于.NET(和Mono)来说就像J2ME对于Java。
但值得注意的是,J2ME 标准要求设备至少具有 512K ROM 和 256K RAM。请记住,我们可能无法更改 TI-84 ROM,这意味着 J2ME 中的内容 位于 ROM 中,还必须适合计算器的 48K RAM。
即使省略了几乎所有 .NET 类和帮助函数,也可能实现这一点,从而抵消了大部分 .NET 的优点。
另外,如果您想要“.NET 的功能而不是运行时”,您需要什么? AC# 到本机编译器?当然可行,但是 VB.NET 的编码又如何呢?然后您还必须为 VB.NET 创建一个本机编译器。当然可以,但是很难。 CIL 的一点是要避免这种情况。
这给我们带来了编译的问题,特别是编译器的目标。 TI-84 有一个 8 位处理器,即 Z80,虽然其尺寸非常聪明,有严格的限制。我认为使用本机 Z80 指令很难执行类似于 C# 类型系统的任何操作。当然,它可以模拟像 Steve Wozniak 的 SWEET16 这样的 16 位 CPU,但这几乎会带来我们回到CIL。
总而言之,我认为这是那些“可能但非常不可能”的餐巾项目之一。我什至还没有触及性能问题。这是一个很好的思想实验,但我永远不会有动力去构建这样的东西。 :-)
This imaginary embedded .NET platform - we could call it "D2ME",
would be to .NET (and Mono) what J2ME is to Java.
Notably, however, the J2ME standard calls for a device with at least 512K ROM and 256K RAM. Keep in mind we can probably not change the TI-84 ROM, which means what in J2ME is in ROM, would also have to fit in the 48K of RAM of the calculator.
Even this could probably be achieved, if almost all .NET classes and help functions are omitted, thus negating most of the .NET benefits.
Also, if you want "the features of .NET but not the runtime", what are you asking for? A C# to native compiler? Of course doable, but what about those coding for VB.NET? Then you would have to create a native compiler for VB.NET as well. Of course, doable, but hard. One point of the CIL is to avoid that.
Which brings us to the matter of compilation, specifically the target of the compiler. The TI-84 has an 8-bit processor, the Z80, while pretty clever for its size, has severe constraints. I think it would be hard to do anything resembling the C# type system with native Z80 instructions. Of course, it could emulate a 16-bit CPU like Steve Wozniak's SWEET16, but that would almost bring us back to a CIL.
All in all, I think this is one of those "probably possible but very improbable" napkin projects. And I haven't even touched upon the issue of performance. It's a nice thought experiment, but I would never have the motivation to build something like that. :-)
您甚至必须专门设计本机应用程序以适应该空间。托管代码不可能容纳在 24k 中。
编辑:语言?首先,您必须移植 BCL。仅此一项就可能占用超过 48kb。
You'd have to specifically design even native applications to fit that space. There's no way that managed code could fit in 24k.
Edit: The languages? First, you'd have to port the BCL. That alone probably takes up more than 48kb.
尝试这样做几乎没有意义,特别是因为在如此有限的系统上运行虚拟机几乎不实用(如果你是一个贪图惩罚的人,并且你运行了 pcode 编译器,你可能会在 TI-84Ag 上运行 UCSD Pascal在桌面上而不是计算器上,但即使这样也拉伸了它)。面向对象的东西几乎完全不可能;即使是苹果公司(可能是第一个在桌面上主流 OO 框架的公司)也需要 Mac Plus、16/32 位处理器和 512K 内存来实现这一目标,而在第一批 Mac 发货一年多后,仍然使用单任务操作系统。请注意,这是在内存为 TI-89 3 倍的系统上使用本机 68000 代码实现的。
不过,如果您对低级黑客有足够的了解,您可能能够在 Nspire 上实现这一目标(需要注意的是,我不确定是否真的有人在 TI 之外这样做)。 Nspire 与 Nintendo DSi 大致属于同一级别(尽管只有一个处理器而不是两个),因此它的功能足够强大,值得参与黑客社区并创建 .NET 克隆之类的东西。
There's pretty close to no point to trying that, especially since a VM on such a limited system is just barely practical (you might get UCSD Pascal running on a TI-84Ag if you're a glutton for punishment and you have the pcode compiler running on the desktop instead of the calculator, but even that's stretching it). The OO stuff is almost entirely out of the question; even Apple, who was likely the first to mainstream OO frameworks on the desktop, needed the Mac Plus, a 16/32-bit processor, and 512K of memory to pull it off, over a year after the first Macs shipped, still using a single-tasking OS. And mind you that's with native 68000 code on a system with 3x the memory of a TI-89.
You might be able to pull it off on an Nspire though, if you know enough about low-level hacking (the caveat being that I'm not sure there's really anyone who does outside TI). The Nspire is vaguely in the same class as the Nintendo DSi (albeit with only one processor instead of two), so it's powerful enough to make getting involved in the hacking community and creating things like a .NET clone worthwhile.
我认为你最好使用TI-GCC。
I think you would be better off just using TI-GCC.
Vala 可能是你做 C# 之类的事情的唯一希望
http://live.gnome.org/Vala
Vala is probably your only hope to do anything like C#
http://live.gnome.org/Vala