Re: converting assembler from one cpu to another ?




<robertwessel2@xxxxxxxxx> wrote in message
news:1171492894.875720.35490@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
On Feb 14, 3:51 pm, "Rod Pemberton" <do_not_h...@xxxxxxxxxxx> wrote:
Unlike the 6502, the x86 isn't "orthogonal," i.e.,
certain addressing modes only exist for certain instructions. This
could be
one (trivial) problem translating 6502 to x86.


Calling the 6502 orthogonal is *really* a stretch.

:-)

I've got very new memories of x86, and very old of 6502... which are
probably somewhat romanticized... ;-)

It was more
regular than the 8080, but that's not saying very much. 32 bit x86 is
much more orthogonal than the 6502 is (not that I'd call any version
of x86 particularly orthogonal), and even the 16 bit stuff is
debatable.


But, seriously, the way I remember the 6502 (6510 actually) was that all
those addressing modes applied to nearly every instruction, i.e., mostly
orthogonal. Or, perhaps that was only acumulator instructions, well, memory
fades... Today, I really couldn't tell you what the registers were called
or how many registers there were without looking it up. I remember
zero-page addressing, jsr/rts, and the basic operation of various
instructions and that's about all. If I saw a good reference, it'd probably
all come flashing back. Anyway, that was part of the reason I mentioned the
Transactor and C=Hacking articles, so he'd have some accurate documentation
from the era instead of my faded/jaded memories...


Rod Pemberton


.



Relevant Pages

  • Re: Two Click disassembly/reassembly
    ... Map the extra x86 registers to memory. ... > equivalents to the string instructions. ... > got such a limited RISC like instruction set that the assembler is more ...
    (alt.lang.asm)
  • Re: PIC vs ARM assembler (no flamewar please)
    ... addressing modes - you don't have to use half a dozen instructions just ... perhaps including the CPU32 addressing modes (all ... And having some more registers ... The ARM instruction set is not particularly nice for assembler ...
    (comp.arch.embedded)
  • Re: TI MSP430
    ... Of course, the architecture is a simplified version of the TMS9900 CPU, which was derived from the TI 990 minicomputer, which was in turn a rip-off of the PDP-11 ISA, with slight changes (fewer addressing modes, allowing twice as many registers) to avoid patent issues... ... modes of the msp430 really are appropriate for their target applications, or whether they would have been better off with the PDP-11 arrangement. ... as long as you have a stack pointer and push/pop instructions. ...
    (comp.arch.embedded)
  • Re: TI MSP430
    ... rip-off of the PDP-11 ISA, with slight changes (fewer addressing modes, ... allowing twice as many registers) to avoid patent issues... ... I have a few comments about a pdp-11 comparison at: ... modes as the destination for two-operand instructions. ...
    (comp.arch.embedded)
  • Re: Help in getting application to access I/O space
    ... instructions that access it and you could write your own versions of ... Based on that address, I'm guessing x86. ... the registers are mapped as offsets into "I/O Space". ...
    (microsoft.public.windowsce.embedded)