The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: HiddenDragon on December 04, 2010, 02:03:02 AM

Title: Assembly Written
Post by: HiddenDragon on December 04, 2010, 02:03:02 AM
What's an assembler written in? It would have to be lower level than assembly language wouldn't it? The only things I can think of lower than assembly are writing in pure boolean equations and hardware. Just a random question that I was pondering.
Title: Re: Assembly Written
Post by: hutch-- on December 04, 2010, 02:38:06 AM
Most are written in C but some of the later ones are written in themselves, FASM for example.
Title: Re: Assembly Written
Post by: dedndave on December 04, 2010, 03:22:14 AM
they probably start out using someone elses compiler or assembler
after they get it up and running, they can use their own code (like Hutch said - FASM)

if you think about it, the first assembler for a new processor is probably a cross-assembler   :P
Title: Re: Assembly Written
Post by: redskull on December 04, 2010, 03:34:13 AM
Just try not to think about what the very first assembler was written in, or else your brain might explode  :bg

-r
Title: Re: Assembly Written
Post by: raymond on December 04, 2010, 03:56:46 AM
I remember coding my own assembler for the TRS-80. The instruction set was relatively small (~800 mnemonics) so I could hand-code the assembler myself and enter it through the keyboard!

Coupled with the crude "word processor" which I had hand-coded previously, I could then assemble from a text source code. :8) That made it a lot easier to modify/update programs instead of "patching" them! :bg
Title: Re: Assembly Written
Post by: Tight_Coder_Ex on December 04, 2010, 06:08:48 AM
The first assembler was written in what was known as a 1st generation or machine language.  This method was very error prone as addresses and offset needed to be calculated manually and done with front pannel switches in the 1950's.  It eventually evolved into punch cards and then magnetic tape. 

see Historical Perspective in http://en.wikipedia.org/wiki/Assembly_language

Today, assemblers can be written using most any language, but as Hutch stated, "C" is most probable.
Title: Re: Assembly Written
Post by: xandaz on December 04, 2010, 11:35:49 AM
   In the old ZX Spectrum days i made a few progs in Z80 assembly. I had to it manually with the manual in front of me beacause in those days there wasn't that much programs exchange. I imagine it had its own assemblers but they never got to my hand. Of course any changes to a source emply offsets/jumps changes so it was kind of a drag.
   I searched and came across this:
http://www.crossware.com/trialware/21499111/
   How do these guys dare to sell this? Bye
Title: Re: Assembly Written
Post by: BogdanOntanu on December 04, 2010, 12:23:27 PM
At start I have written my own assembler (Sol_Asm)  using another assembler (TASM).

However after a while it became more capable and I have written my assembler using my assembler ...

Hence today Sol_Asm(n+1)  is written in Sol_Asm(n)   :green



Title: Re: Assembly Written
Post by: vanjast on December 04, 2010, 05:27:03 PM
So what you therefore have,  is:

(Sol_Asm(i+1) = E(Sol_asm(i)...... for i=0 - to - n

There must be an asymptote to this development
:lol
Title: Re: Assembly Written
Post by: HiddenDragon on December 04, 2010, 06:04:45 PM
Hmmm thanks. I would have thought you would need to go to a lower level which would eventually trickle down to hardware.
Title: Re: Assembly Written
Post by: dedndave on December 08, 2010, 05:15:28 PM
oops
Title: Re: Assembly Written
Post by: dedndave on December 08, 2010, 05:17:08 PM
oops again
Title: Re: Assembly Written
Post by: clive on December 08, 2010, 06:22:08 PM
Quote from: HiddenDragon on December 04, 2010, 06:04:45 PM
Hmmm thanks. I would have thought you would need to go to a lower level which would eventually trickle down to hardware.

Well assembler language is designed to have a one-to-one relationship with the machine code instructions it represents. The machine and micro code basically drive internal state machines.

What the assembler application is written in is mostly irrelevant to it's function. For the most part such tools are developed on an existing system/architecture, and you end up with a "cross" development suite where the target architecture is different from the one hosting the tools. It is not necessary to develop the assembler on the target architecture, or use the native machine code. I use an x86 PC to develop ARM, MIPS and SPARC code, because it is a more effective and comfortable way of doing it.

Certainly simple code can be translated by hand, and entered with switches, or whatever. We haven't had to do that for decades, and the instruction sets were simpler.
Title: Re: Assembly Written
Post by: Crossware on December 08, 2010, 06:54:37 PM
Quote from: xandaz on December 04, 2010, 11:35:49 AM
   How do these guys dare to sell this? Bye

We'll stop selling it when people stop buying it!

Originally it was written in 6502 assembler.  Today it is written in C++.
Title: Re: Assembly Written
Post by: clive on December 08, 2010, 07:49:52 PM
Quote from: Crossware on December 08, 2010, 06:54:37 PM
We'll stop selling it when people stop buying it! Originally it was written in 6502 assembler.  Today it is written in C++.

And if it ran on a 3 GHz 6502 today it would probably smoke the C++ version. Though the C++ version is probably more feature rich and can handle much larger files.

Processors like the 6502, Z80, 68K, 8051, Z8, 8086, etc have lived on longer than most of us could have imagined, and I don't expect them to disappear now. If not in their original form, then buried in ASICs, Gate-Arrays, or FPGA. If it keeps selling, power to you.
Title: Re: Assembly Written
Post by: Gunther on December 09, 2010, 12:37:12 PM
Quote from: clive, December 08, 2010, at 07:49:52 pmAnd if it ran on a 3 GHz 6502 today it would probably smoke the C++ version.

That's for sure.

Gunther
Title: Re: Assembly Written
Post by: vanjast on December 11, 2010, 05:51:54 PM
Quote from: Crossware on December 08, 2010, 06:54:37 PM
... Today it is written in C++.
Aaarrghhh.. enemies of the state   :bg
Title: Re: Assembly Written
Post by: redskull on December 11, 2010, 10:51:46 PM
Quote from: vanjast on December 11, 2010, 05:51:54 PM
Quote from: Crossware on December 08, 2010, 06:54:37 PM
... Today it is written in C++.
Aaarrghhh.. enemies of the state   :bg

In a world of Java and .NET, C++ is the new assembly language.  You can have <gasp> pointers, and need to manage them yourself!  :lol
Title: Re: Assembly Written
Post by: hutch-- on December 12, 2010, 01:25:40 AM
 :bg

Yeah, you gotta watch those pointers. At least in assembler you can just use the address.  :P