Making your own machine language

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Making your own machine language

BLOB
Hello...

I am still in chapter 3: Sequential Logic.. But I looked at chapter 4 and it said machine language... I was wondering if the book teaches you how to actually make the machine language or just to use it...

Does the book teach you to make the machine language? with our own instructions? say in the hack machine language (I dont know anything about it yet) there are mnemonics like null, M, D.. can we build a machine language so that we can use our own mnemonics? plz tell me if the book teaches that..
Reply | Threaded
Open this post in threaded view
|

Re: Making your own machine language

cadet1620
Administrator
BLOB wrote
Hello...

I am still in chapter 3: Sequential Logic.. But I looked at chapter 4 and it said machine language... I was wondering if the book teaches you how to actually make the machine language or just to use it...

Does the book teach you to make the machine language? with our own instructions? say in the hack machine language (I dont know anything about it yet) there are mnemonics like null, M, D.. can we build a machine language so that we can use our own mnemonics? plz tell me if the book teaches that..
Chapter 4 teaches the machine and assembly language syntax for the Hack computer.

Chapter 5 teaches the architecture that implements the machine language and has you build the CPU and computer that executes that machine language.

Chapter 6, the first software chapter, has you write an Assembler that converts the assembly language into machine language.

--Mark
Reply | Threaded
Open this post in threaded view
|

Re: Making your own machine language

BLOB
Thanx Mark for super quick reply... But, what about the machine language? how to write that using binary code? How did the people who first got the computer up and running write programs? I am pretty sure they did not hav machine language in the beginning... Can we write a simple machine language using binary code ourselves?
Reply | Threaded
Open this post in threaded view
|

Re: Making your own machine language

cadet1620
Administrator
BLOB wrote
Thanx Mark for super quick reply... But, what about the machine language? how to write that using binary code? How did the people who first got the computer up and running write programs? I am pretty sure they did not hav machine language in the beginning... Can we write a simple machine language using binary code ourselves?
The "machine language" is the binary code that the computer executes.  "Assembly language" is the human programming language that corresponds to the machine language.

The earliest computers didn't use machine language; they were programmed with plugboards.  See http://en.wikipedia.org/wiki/Plugboard for some pictures of a plugboard for an IBM 402 Accounting Machine.

Later, when stored program computers were developed, one of the common ways to enter the binary codes was with front panel switches.  Here's a video of loading a short program into a PDP-8 (an early mini-computer).

Normally one would enter a slightly longer program--a dozen or so instructions--called a "bootstrap" that would then read the operating system from the system's paper tape reader.

On an early mainframe I used, you would type the bootstrap program in with the console typewriter.  The bootstrap would load the first file form the system tape, which was a slightly more sophisticated loader that would load the OS from the system tape. If I remember correctly, the bootstrap was "I0H01000U0001000" (that's two 48-bit instructions).

--Mark
Reply | Threaded
Open this post in threaded view
|

Re: Making your own machine language

BLOB
Thanx... So, the presence of storage helped in making machine language symbols which addressed specific locations of the memory... I got one more question... I looked at the Data Latch circuit and I wondered if it could store memory even if the power is turned off.. I dont think any electronic system can store memory if the power is turned off(all the states will be zero when power is turned off)... How to store the memory permanently then? I know there are magnetic things (as in flash drives) to store memory temporarily but can we store temporary memory using electronic circuits (without using magnetism or any thing other than transistors)?
Reply | Threaded
Open this post in threaded view
|

Re: Making your own machine language

cadet1620
Administrator
BLOB wrote
Thanx... So, the presence of storage helped in making machine language symbols which addressed specific locations of the memory...

I got one more question... I looked at the  Data Latch circuit  and I wondered if it could store memory even if the power is turned off.. I dont think any electronic system can store memory if the power is turned off(all the states will be zero when power is turned off)... How to store the memory permanently then? I know there are magnetic things (as in flash drives) to store memory temporarily but can we store temporary memory using electronic circuits (without using magnetism or any thing other than transistors)?
Actually, in the real world sequential logic comes up in unknown states.  That the TECS hardware simulator's DFFs always start set to 0 is a simplification.

Modern real world memory is quite different than the TECS memory built from DFFs.  Many special techniques are used to make them small and fast.

Semiconductor EEPROMS and FLASH use "Floating Gate MOSFETs" to save their state when power is off.  I don't know enough about semiconductor physics to describe how they work.

--Mark
Reply | Threaded
Open this post in threaded view
|

Re: Making your own machine language

BLOB
Thanx Mark :)