Re: Instr()



"dpb" <none@xxxxxxx> wrote in message news:f8vsvh$a14$1@xxxxxxxxxxx

I have to also admit I've not followed the X86 architecture and
while I'm sure there is some microcode involved, is it actually
accessible/modifiable once the chip is packaged?

Probably not. In fact on the processors I was referring to myself (far too many years ago now to remember!) it never was. Microcode was used only during the design of the chip and was not accessible thereafter on most machines on which that processor was installed. But I really wasn't talking about microcode when I posted my initial response about the difference between "machine code" and "Assembler". The microcode thing was mentioned later by someone else. I meant that writing machine code can be done either with or without the help of an Assembler, and that writing it without the help of an Assembler is a quite different and much harder task than using an Assembler.

When I first started writing machine code (on the 6502 processor) I used to write it by simply writing down the mnemonics (and sometimes just the hex numbers themselves, when I got more used to it) on paper and then writing some code in BASIC to "poke" those numbers into memory so that I could finally "call" the machine code routine to perform whatever task I wanted to do (usually writing some game or other). Writing machine code in that way was quite difficult, for all sorts of reasons, and I did it not because I thought it was somehow "macho" but rather because I simply could not afford to buy an Assembler (and, of course, there were initially no Assemblers available anyway for the machine I was using anyway). I soon decided to write myself an Assembler in BASIC. The Assembler I ended up writing did many of the things that modern Assemblers do in terms of allowing you to use names for loops and functions other things and automatically calculating offset values and automating various parts of the process and all sorts of things. Once I had perfected my "home grown" Asssembler the task of writing machine code programs became an order of magnitude easier that it was formerly when I used to "do it by hand". I was really just responding to Michael C's assertion that "machine code and Assembler are essentially the same", in which I assumed that Michael C was attempting to infer that I didn't know the difference myself, which I of course do.

Mike


.



Relevant Pages

  • Re: Instr()
    ... Microcode was used only during the design of the chip and was not accessible thereafter on most machines on which that processor was installed. ... I meant that writing machine code can be done either with or without the help of an Assembler, and that writing it without the help of an Assembler is a quite different and much harder task than using an Assembler. ...
    (microsoft.public.vb.general.discussion)
  • Re: Why machine code is so much better....
    ... Assembler is actually a higher level language than machine code.... ... Many machine code instructions actually run small microcode programs containing multiple steps. ... AMD and Intel CPU's etc. ...
    (borland.public.delphi.non-technical)
  • Re: Instr()
    ... Try turning off your computer and writing a machine code ... big difference between machine code and Assembler. ... And you could also say that machine code is microcode for wimps. ...
    (microsoft.public.vb.general.discussion)
  • Re: Time Gets Near For Agamemnon To Go
    ... Who needs an assembler when you've memorised the entire Z80 ... compiler is the last thing you would use. ... writing it directly in machine code. ... no. Aggy hasn't looked at compiler optimization at all. ...
    (rec.arts.drwho)
  • Re: translating Python to Assembler
    ... program in machine code, which is all 1's and 0's. ... assembler has to be compiled in order to convert the opcodes to ... IMHO this "compilation" if trivial compared to HLL ... since it's just a translation from opcodes to numbers ...
    (comp.lang.python)