0

I wrote an assembly for my own assembly language in C++. I'm very interesting in how is it possible to write assembly without any existing languages? For example, how the first assembly was written?

  • In assembler, of course. Most likely not even in assembly *language*, but by entering raw hex into a computer. Or, when done even earlier, by poking holes in cardboard cards. – Jongware Apr 09 '16 at 21:50
  • 1
    this has been asked and answered here many times....simple, pencil and paper, you write out the program however you want (using whatever asm syntax you need to keep track of the machine code) the convert that to machine code by hand, and then use the address, data and load switches to load it into your processor, then switch the run switch. – old_timer Apr 09 '16 at 21:55
  • 1
    Are you talking about *writing assembly* (e.g. writing an arbitrary program in assembly language), or *writing an assembler* (a program whose job is to translate assembly language into machine code)? – Nate Eldredge Apr 09 '16 at 22:47
  • 1
    As a practical example, [FASM](http://flatassembler.net/) is self-hosting. i.e. it's written in x86 asm. To solve the chicken/egg problem, you'd work out the necessary machine-code by hand. [The story of Mel](http://www.catb.org/jargon/html/story-of-mel.html) has some great insight into what it was like back in the early days when assemblers were new-fangled over-complicated software that "real programmers" looked down on. – Peter Cordes Apr 10 '16 at 00:39
  • 1
    Part of the answer even goes back to the history of the term "Assembler." Originally, this was not a program... Originally it was the person to whom the programmer handed his hand written or typed code who then translated from the mnemonics to machine language on punch cards or paper tape. – David Hoelzer Apr 10 '16 at 10:16
  • GNU assembler is good. but don't use masm at all.you should install in C:\masm32 only and you can't choose any other folder and you should make your project in c: otherwise you receive many errors and your program wont work well. nasm is good too but it doesn't have linker and you should some linker like gnu linker. – Amir Apr 10 '16 at 22:19

0 Answers0