diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2009-01-16 10:39:25 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2009-01-16 10:39:25 +0000 |
commit | c11fc57837acfd62de02d5fc28a83d7c3b4587a5 (patch) | |
tree | c7cfc9f3cb19cd9ce12a949d10b55f4489a76d65 /test | |
parent | eee0b5e4eae37ec56b78668c16d715c705a81a5c (diff) | |
download | libcss-c11fc57837acfd62de02d5fc28a83d7c3b4587a5.tar.gz libcss-c11fc57837acfd62de02d5fc28a83d7c3b4587a5.tar.bz2 |
Script to manufacture OPV word from 3 hex values.
svn path=/trunk/libcss/; revision=6074
Diffstat (limited to 'test')
-rwxr-xr-x | test/data/parse/makeopv.pl | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/data/parse/makeopv.pl b/test/data/parse/makeopv.pl new file mode 100755 index 0000000..8961d48 --- /dev/null +++ b/test/data/parse/makeopv.pl @@ -0,0 +1,11 @@ +#!/usr/bin/perl + +use warnings; +use strict; + +die "Usage: makeopv.pl <opcode> <flags> <value>\n" if (@ARGV != 3); + +my ($opcode, $flags, $value) = @ARGV; + +printf("0x%.8x\n", hex($opcode) | hex($flags) << 10 | hex($value) << 18); + |