Image Map Image Map
Page 3 of 3 FirstFirst 123
Results 21 to 26 of 26

Thread: Intel 8085 Assembly -- Unsupported OpCodes

  1. #21
    Join Date
    Jul 2010
    Location
    Silicon Forest, Oregon, USA
    Posts
    726

    Default

    Quote Originally Posted by Chuck(G) View Post
    ... NEC V40/V50 chips. One interesting feature is that these chips had extra lines to tell you what segment (CS, DS, ES, SS) a memory reference was using, so you could conceivably hang 4MB of memory on one.
    Actually you can do the same with 8086/88 (but apparently not with 80188/186). 8086 and 8088 have S3-S4 status signals that are multiplexed with A16 and A17 address signals, that specify which segment is used for addressing. But it would be a kludge to use it for extending memory to 4MB using this feature. Using some kind of paging is more useful (LIM EMS?!).

    BTW - POP CS works on all 8088, 80C88, and NEC V20. And I assume will work on 8086/V30 as well.

    Thanks,
    Sergey

  2. #22
    Join Date
    Jan 2007
    Location
    Pacific Northwest, USA
    Posts
    34,933
    Blog Entries
    18

    Default

    Sure, LIM would do it. One could also use a bankswitching mechanism only on a single segment, to address pages of 1MB not in the base 1MB.

    BTW - POP CS works on all 8088, 80C88, and NEC V20. And I assume will work on 8086/V30 as well.
    Not on the V20! 0F is used as an instruction set extension byte, just as on the 80186 and other CPUs. 0F 20, for example is ADD4S on the V20.
    Last edited by Chuck(G); January 26th, 2014 at 09:26 PM.

  3. #23
    Join Date
    Jul 2010
    Location
    Silicon Forest, Oregon, USA
    Posts
    726

    Default

    Quote Originally Posted by Chuck(G) View Post
    Not on the V20! 0F is used as an instruction set extension byte, just as on the 80186 and other CPUs. 0F 20, for example is ADD4S on the V20.
    Right... I must be thinking about MOV CS,REG/MEM which will work on 8086/8088/V20/V30 but not on later CPUs (not that it is extremely useful )

  4. #24

    Default

    "You've got a couple of things wrong, however. The 10H instruction is an arithmetic (i.e. sign extended) right shift of HL, not a rotate. Very useful."

    Hi Chuck, I've used a lot of the undoc opcodes for 8085. DSUB 08h is a great one, LHLX, SHLX, LDSI, LHLI.. all great.
    I've never used instruction 10H; can you give me an example where ARHL 10H opcode is used (not as a 16 bit rotate, but for arithmetic?)

    cheers, Steve

  5. #25
    Join Date
    Jan 2007
    Location
    Pacific Northwest, USA
    Posts
    34,933
    Blog Entries
    18

    Default

    It's a sign-extended shift. Consider the following

    HL = 4 (0004h); after ARHL, HL=2 (0002h)

    HL=-4 (FFFCh); after ARHL, HL=-2 (FFFEh)

    That's what the "A" in ARHL is about--it preserves (and extends) the sign bit. Clearly, for unsigned arithmetic, this isn't terribly useful, but if your 16 bit ints are signed (32767≤HL≥-32768), you need an arithmetic right shift to divide by powers of 2.

    Back in the 8085 day, even if we'd known about the undocumented opcodes, we'd never have used them. You never know when support for an undocumented feature will be dropped. Simpler to ignore the codes than to be stuck trying to find them all in existing code and substituting working code.

  6. #26

    Default

    Ah! I see. Thanks Chuck. Kinda obvious now . Signed 16 bit divide by two.

    Cheers. Steve

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •