• Welcome to Overclockers Forums! Join us to reply in threads, receive reduced ads, and to customize your site experience!

And, Ds:si, Es:di

Overclockers is supported by our readers. When you click a link to make a purchase, we may earn a commission. Learn More.
I asked some knowledgable friends and was informed that "and" is a bitwise and, and ds:si and es:di have to do with 16bit memory access and segmentation.
 
I can't help you on the last two (know almost no assembly), but I can tell you what AND does.

AND - Bitwise AND

AND is a boolean operator, meaning if you give it two binary values, it will spit out a new one based on the two input. The truth table for AND looks like this:

Code:
      ^ | 1 0
     ===+=====
      1 | 1 0
      0 | 0 0

AND only produces a value of '1' when BOTH values being ANDed are equal to '1'. Here's an example of ANDing two different binary numbers:

10111010
10001010
----------
10001010

So ANDing effectivly masks off all the diffrences between the two numbers. As for practical use, I'm sure there is something usefull you could do with this masking effect.... I don't actually know because, as I said, I don't know much assembly.

JigPu
 
Hm, the way I've done it is to have a register or memory location on the page you're on have a memory address in it.

There's usually some sort of command that uses the indirect addressing as opposed to direct offset addressing.

Did I just make any sense at all? I'm not sure that I did. :D
 
Yeah, I can barely understand it rereading it. :D

Ok, what I meant to try to get across..

To be able to address a full address, you first need to have a memory location or register that is as large as the address, ie you need to have 32 bit mem locs or 32bit registers if you have 32bit addressable memory.

One way of being able to talk to a mem loc (which will have a 32 bit name) is to use paging. What this means is that you break up your memory into a bunch of pages, each of which contains a certain number of mem locs. The number of mem locs is deteremined by how much room in your command you have to address memory. If you have six bits to do this in you'll have 64 entries (2^6). When you actually make the call, the first (in the case of 6 bits) 26 bits are appended onto the location. The first 26 bits are what tell you what page you're on.

That was direct addressing.

You can also store an address in a register or mem loc. This would be how you access memory outside of your page. So the call would say look for the memory location in this register or at this mem loc which is on the current page.

That's indirect addressing.

Does that make more sense? ;)
 
Back