为摩托罗拉 68K 处理器编写操作系统.我可以效仿吗?我可以试驾操作系统开发吗? [英] Writing an OS for Motorola 68K processor. Can I emulate it? And can I test-drive OS development?

查看:14
本文介绍了为摩托罗拉 68K 处理器编写操作系统.我可以效仿吗?我可以试驾操作系统开发吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

下学期,我需要为摩托罗拉 68K 处理器编写一个基本操作系统,作为课程实验室材料的一部分.

Next term, I'll need to write a basic operating system for Motorola 68K processor as part of a course lab material.

是否有带有该处理器的基本硬件设置的 Linux 模拟器?因此,我和我的合作伙伴可以在我们的计算机上更快地进行调试,而不是物理地重新启动电路板之类的东西.

Is there a Linux emulator of a basic hardware setup with that processor? So my partners and I can debug quicker on our computers instead of physically restarting the board and stuff.

是否可以将测试驱动开发技术应用于操作系统开发?代码将主要是汇编和 C.尝试试驾的主要困难是什么?有什么建议吗?

Is it possible to apply test-driven development technique to OS development? Code will be mostly assembly and C. What will be the main difficulties with trying to test-drive this? Any advice on how to do it?

推荐答案

你当然可以 tdd 这个项目.首先通过简单的例程调用来解耦对硬件的所有访问,例如getch() 和 printf,那么您可以提供简单的模拟来提供测试输入和检查输出.然后,您可以使用 gcc、msdev 或 xcode 在 PC 上编写超过 90% 的项目.一旦您对解耦例程有了一定的信心,您将需要很少的硬件访问权限,然后才偶尔检查您的模拟是否按预期运行.

You certainly can tdd this project. First off decouple all accesses to the hardware with simple routine calls, e.g. getch() and printf, then you can provide simple mocks that provide test input and check output. You can then write well over 90% of the project on a PC using gcc, msdev or xcode. Once you have got some confidence in the decoupling routines you will need very little access to the hardware, and only then to occasionally check that your mocks are acting as you expect.

一直使用 C 直到找到特定的瓶颈,然后才求助于汇编程序.

Keep to C until you find a particular bottle neck, and only then resort to assembler.

这篇关于为摩托罗拉 68K 处理器编写操作系统.我可以效仿吗?我可以试驾操作系统开发吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆