Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

5
  • 2
    Often, clearing the other 24 bits of the register was unnecessary, even when you wanted to do arithmetic on character data if you only cared about 8 bits of the final result. And using the "translate" and "translate and test" instructions, you could often operate on character data without doing explicit arithmetic or using AND/OR type logic to twiddle individual bits.
    – alephzero
    Commented Jul 7, 2020 at 13:37
  • @alephzero :) sure, these are the detailed ways to handle it, still not changing the fact that registers weren't really meant for character handling at all.
    – Raffzahn
    Commented Jul 7, 2020 at 13:45
  • 1
    All of the above string instructions plus don't forget TR and TRT - super powerful, with applications beyond the obvious.
    – davidbak
    Commented Jul 7, 2020 at 14:38
  • @davidbak and CLCL and MVO/N (yes, it can be used beside BCD) and so on. TR(T) is an extrem versatile beast when combined. Want to test a string for certain characters? Make up a table with an entry for each character with the bits for attributes (like alpha, case, num, punctuation, whitespace) and translate a copy using a single TR String,Tab. Then OR it together using a single OC String+1(len-1),String and the last byte will contain the combined attributes. Use NC alike. And that's only the start. Building parsers can be done in a few machine instructions. Who needs so called HLLs?
    – Raffzahn
    Commented Jul 7, 2020 at 14:49
  • The 8088's register set allowed assembly-language programmers to use six general-purpose 16-bit registers, or five general-purpose 16-bit and two 8-bit, or four 16-bit and four 8-bit, three 16-bit and six 8-bit, or two 16-bit and eight 8-bit registers. This was very handy for when writing assembly-language code for tasks which needed more than six registers, but didn't need them all to be capable of holding more than eight bits, but compilers for high-level languages didn't really attempt to exploit this.
    – supercat
    Commented Jul 7, 2020 at 17:17