Coder's Guild Mailing List

Re: Memory question

Posted by Kspansel@xxx.xxx on 1999-04-29

In a message dated 4/29/99 4:32:11 PM Pacific Daylight Time, 
frankhale@xxxxxxxx.xxx.xxx writes:

> Okay I haven't tried your solution yet, but what I mean is I have 2
>  bytes say there values are 1 and 0 I want to combine them to make a
>  single word value.

Bits or Bytes?  if it bytes then the one byte would be the high byte and the 
other the low byte.  If your register name is IX, and is a 16 bit register, 
then you'd have, if you were going this way, an IH and IL or something of the 
sort.  

High Byte = 00000001b
Low Byte = 00000000b

IH = High Byte = 00000001b
IL = Low Byte = 00000000b

The low byte is just basically stuck to the end of the high byte.  

IX = 0000000100000000b = 256d

mov IL, 00000001
shl IL, 8               ;shifting it just puts it up into IH
or IL, 00000000     ;IL is 0 anyway cause shifting puts in zeros

This would get you a word value.  Please tell me if I'm not thinking along 
the same lines as you.  Or if this information is completely useless.  I'm 
very interested in you project...I have not done one myself, but this is just 
what I know from the 8086 intel series.