Unexpected results when "((x shl 8) shr 8)" used in same statement
Original Reporter info from Mantis: AngusChisholm
-
Reporter name: Angus Chisholm
Original Reporter info from Mantis: AngusChisholm
- Reporter name: Angus Chisholm
Description:
For words with value above 255 ($00FF), the statement gives the same value as the original "x" instead of (x AND $00FF).
If the interim value of (x shl 8) is assigned to the word "temp", the statement "temp shr 8" gives a correct result.
Steps to reproduce:
File "shl_shr.pas" uploaded.
Additional information:
Not sure if this is working-as-designed (a known restriction), or a bug.
Mantis conversion info:
- Mantis ID: 33851
- OS: Windows
- OS Build: Win 10, 64 bit
- Build: 32 bit
- Platform: 386
- Version: 3.0.4
- Monitored by: » AngusChisholm (Angus Chisholm), » @CuriousKit (J. Gareth Moreton)