Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
198 views
in Technique[技术] by (71.8m points)

assembly - loading binary code to hardware

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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...


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...