re: A83: LSB, MSB.


[Prev][Next][Index][Thread]

re: A83: LSB, MSB.




LSB = least significant byte, lower byte of a 2 byte value
MSB = most significant byte, higher byte of a 2 byte value

here's why I use these terms:

	hl = 123Fh     - h at the end means hex number

	here 12h = MSB; 3Fh = LSB

	if I do :  ld   (8000h),hl     ; hl to memory

	here's what mem looks like :

	8000h = 3Fh
        8001h = 12h

	the MSB is written 1st and then the LSB

	some people get confused by the switch when writing a 2 byte value
	to memory from a register, so when I talk about a 2 byte value in 
 	RAM I always say which is the MSB and LSB.

	It's like with lists on the 83 in RAM where the size of the list
 	is in the 1st 2 bytes of the list data , and it's LSB,MSB, 
	a list of size 1 would look like this in RAM : 01 00 for size bytes.
	so when you do : ld  hl,(address of list) hl = MSB,LSB and is usable.

Later,
Pat

------------------
Original text

From: "James Matthews" <matthews@tkb.att.ne.jp>, on 6/14/98 7:44 PM:

What are LSB and MSB...I know its Least-significant byte, and its the last
4 bits of a byte, and MSB is most-...., and its the first 4....but what's
the use of them? Is it just a term?

James.


References: