diff options
author | k-m_schindler <k-m_schindler@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2013-02-28 17:09:15 +0000 |
---|---|---|
committer | k-m_schindler <k-m_schindler@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2013-02-28 17:09:15 +0000 |
commit | 109a1d715dd6742d53a242849f07675653b27e84 (patch) | |
tree | 3c2696d284cfe5da2ae3546a232ace551e95f3cb /tools/DoTags/DoTags.pas | |
parent | 690cae770f801a447cb31235694b8f85a20c4459 (diff) | |
download | usdx-109a1d715dd6742d53a242849f07675653b27e84.tar.gz usdx-109a1d715dd6742d53a242849f07675653b27e84.tar.xz usdx-109a1d715dd6742d53a242849f07675653b27e84.zip |
new tool for the calculation of four letter tags. Some ffmpeg files need these hard-coded. Includes binaries.
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@2957 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to '')
-rw-r--r-- | tools/DoTags/DoTags.pas | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/tools/DoTags/DoTags.pas b/tools/DoTags/DoTags.pas new file mode 100644 index 00000000..1e18ea12 --- /dev/null +++ b/tools/DoTags/DoTags.pas @@ -0,0 +1,26 @@ +program DoTags; +var + four_letters: string; + tag: int32; +begin + writeln ('Program for the calculation of 4 letter tags, little and big endian.'); + writeln ('Enter 4 letters:'); + readln (four_letters); + while length(four_letters) <> 4 do + begin + writeln ('This were ', length(four_letters), ' letter(s). Enter exactly 4 letters:'); + readln (four_letters); + end; + tag := ord(four_letters[4]) or (ord(four_letters[3]) shl 8) or (ord(four_letters[2]) shl 16) or (ord(four_letters[1]) shl 24); + writeln ('BE-TAG: $', hexStr(tag, 8)); + tag := ord(four_letters[1]) or (ord(four_letters[2]) shl 8) or (ord(four_letters[3]) shl 16) or (ord(four_letters[4]) shl 24); + writeln ('LE-TAG: $', hexStr(tag, 8)); + if four_letters[1] = '0' then + begin + writeln ('Maybe you want a digital zero in the first position. Here you go:'); + tag := ord(four_letters[4]) or (ord(four_letters[3]) shl 8) or (ord(four_letters[2]) shl 16); + writeln ('BE-TAG: $', hexStr(tag, 8)); + tag := (ord(four_letters[2]) shl 8) or (ord(four_letters[3]) shl 16) or (ord(four_letters[4]) shl 24); + writeln ('LE-TAG: $', hexStr(tag, 8)); + end; +end. |