#!/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);


#!/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", oct($opcode) | oct($flags) << 10 | oct($value) << 18);


Use oct() instead of hex(). Can now consume binary input.
Use oct() instead of hex(). Can now consume binary input.

svn path=/trunk/libcss/; revision=6075
