<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
 IO.PutInt(Word.Insert(a,b,20,20));<BR> IO.PutInt(Word.Extract(1,1,50));<BR> IO.PutInt(Word.Extract(1,30,30));<BR><BR><BR>
Tony, there's discrepancy between Word.Extract and Word.Insert.<BR>
m3front does a better job of checking and optimizing Word.Extract.<BR>
 <BR>
 <BR>
For Insert it always does a runtime add, and a runtime range check against<BR>
the number of bits in integer. It isn't wrong, just could be better.<BR>
 <BR>
 <BR>
For Extract, it checks either constant against the number of bits,<BR>
if they are both constant, it checks the sum and calls extract_mn.<BR>
  If they are both constant and the sum is too large, it just generates<BR>
   code to cause a range fault at runtime check_hi(1 vs. 0).<BR>
   Probably that could be a little more direct.<BR>
If one is constant it calls extract_n, or a slightly optimized use of extract if<BR>
the other is constant.<BR>
 <BR>
 <BR>
I'll probably tackle this soon.<BR>
 <BR>
 <BR>
 - Jay<BR>                                     </body>
</html>