Develop and Download Open Source Software

Browse Subversion Repository

Contents of /branches/4-stable/tests/shift.ttl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 8437 - (show annotations) (download)
Fri Dec 13 03:11:16 2019 UTC (4 years, 3 months ago) by doda
File size: 308 byte(s)
Tera Term 4.xx メンテナンス用ブランチを作成

1 num = $A5 ;10100101
2 cnt = 4
3
4 ; left 8bit rotate shift
5 rotleft = ((num << cnt) & $FF) + (((num << cnt) & $FF00) >> 8)
6
7 sprintf '0x%X' rotleft
8 messagebox inputstr ''
9
10
11 ; right 8bit rotate shift
12 rotright = (num >> cnt) + ((num << (8 - cnt)) & $FF)
13
14 sprintf '0x%X' rotright
15 messagebox inputstr ''

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26