将二进制代码加载到硬件 [英] loading binary code to hardware

查看:199
本文介绍了将二进制代码加载到硬件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近研究了软件的详细工作.因此,他们学习了基于Altair 8800的PC并对其进行运行,他们使用BASIC语言创建了一个解释器,用于根据处理器指令集将程序翻译为机器代码.他们使用磁带以二进制格式的代码来提供解释程序.

  • 但是后来他们如何管理解释器的安装是编译器 直接访问硬件,因为他们只了解机器代码?

  • 考虑到我有一个处理器,并且根据我拥有的指令集 再次用汇编语言(使用操作码)开发了一个解释器 我需要将它们转换为机器代码,但如何将其输入 在今天的处理器中,是否使用磁带? 世界很难吗?

解决方案

他们使用磁带以二进制格式的代码来提供解释器.

CPU启动时,它将读取从某个地址开始的机器代码指令.我不知道8800,但是Altair 680在该地址没有RAM存储器,但ROM存储器(必须额外购买!).

在1970年代,ROM存储器通常是已经在工厂写入的存储器,生产后不能擦除,覆盖或修改. (就像今天在音乐商店中购买的CD一样.)

您可以为680购买的最简单的ROM包含一个程序,该程序可以评估从连接到计算机的终端"(例如键盘和屏幕)接收到的命令.如果您键入某个命令,该程序(而不是计算机本身)正在将另一个程序从磁带加载到RAM.

在680上,您可以购买并安装其他ROM-例如,已经包含基本解释程序的ROM.在这种情况下,您不必再将其从磁带加载到RAM中.

考虑我有一个处理器...如何将其送入处理器内存

正如我所写的:必须在CPU上附加一些内存,该内存已经包含了在启动CPU时执行的代码.

这可能已经是您的"代码(在使用微控制器时通常是这种情况)或某些代码正在从某处(例如从磁带)加载其他代码.

当今世界

打开计算机时,现代PC上的内存也已经包含一些程序.过于简单化,您可能会说此程序正在从硬盘加载操作系统...

i recently studying detail working of software.so learning the pc which is build on Altair 8800 and to run it they used BASIC language to created an interpreter to translate the program to the machine code based on the processor instruction set. They feed the interpreter in binary format code using tapes.

  • But later how they manage to install the interpreter are compiler directly to the hardware as they only understand machine code?

  • Consider i have a processor and based on the instruction set i have developed an interpreter in assembly language(using opcode) again i need to convert them to machine code but how to feed then into the processor memory ,is it using a magnetic tapes?in today's
    world it is difficult?

解决方案

They feed the interpreter in binary format code using tapes.

When a CPU starts up it reads machine code instructions starting at a certain address. I don't know about the 8800 but the Altair 680 did not have RAM memory but ROM memory (which had to be bought extra!) at that address.

In the 1970s ROM memory was typically memory which was already written in the factory and could not be erased, overwritten or modified after the production. (Like a CD bought in the music store today.)

The simplest ROM you could buy for the 680 contained a program which evaluated commands received from a "terminal" (e.g. a keyboard and a screen) connected to the computer. If you typed a certain command that program (and not the computer itself) was loading another program from a tape into RAM.

On the 680 you could buy and install a different ROM - for example a ROM already containing a basic interpreter. In this case you didn't have to load it from tape into RAM any more.

Consider i have a processor ... how to feed then into the processor memory

As I have written: There must be some memory attached to the CPU which already contains code which is executed when the CPU is started.

This may already be "your" code (which is often the case when using microcontrollers) or some code which is loading other code from somewhere (e.g. from a tape).

in today's world

Modern PCs also have memory already containing some program when the computer is switched on. Oversimplified you may say that this program is then loading the operating system from the hard disk...

这篇关于将二进制代码加载到硬件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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