Is it true??
assume attrib=92h+4000h
db (attrib shr 8) and 0f0h 040h
while
struc DCC attrib ;for descriptors...
{
.limitL dw 0
.baseL dw 0
.baseM db 0
.attrib db attrib and 0ffh
.limitH db ((attrib shr 8) and 0f0h)
.baseH db 0
.size = $-.limitL
}
kkk DCC 92h+4000h .limitH generate 0d0h !!!!!!!!!!!
why?
if
change
.limitH db ((attrib shr 8) and 0f0h)
--->
.limitH db ((attrib and 0ff00h) shr 8 )and 0f0h
all is then OK...
assume attrib=92h+4000h
db (attrib shr 8) and 0f0h 040h
while
struc DCC attrib ;for descriptors...
{
.limitL dw 0
.baseL dw 0
.baseM db 0
.attrib db attrib and 0ffh
.limitH db ((attrib shr 8) and 0f0h)
.baseH db 0
.size = $-.limitL
}
kkk DCC 92h+4000h .limitH generate 0d0h !!!!!!!!!!!
why?
if
change
.limitH db ((attrib shr 8) and 0f0h)
--->
.limitH db ((attrib and 0ff00h) shr 8 )and 0f0h
all is then OK...
(attrib shr 8) evaluates to (92h+4000h shr 8), shift is calculated before the adding. You should change it to (attrib) shr 8 to get rid of that problem.
thx...
I am keen on your pdf reference....
I am keen on your pdf reference....