= Basic Calc.
XBC value1 [ operation value2 ] [op value3 [... op value10] ] [[/output-type] [R] [Vn[R]]
-Value1/2: [type]digit.
type: z:decimal, x:hexadecimal, o:octal, t:hhmmss.xxx fmt.
Decimal is up to 19 digit,and may contain separator ",".
If type is ommitted,decimal when all digit is 0 to 9,
hexadecimal when all is valid hexadecimal digit,
t when hh:mm:ss format.
After decimal point,up to 9 digit is allowed,but for x
and o,decimal fraction is not supported.
For double word, concatenate 2 word hex-decimal by ".."
like as abcded01..23456789.
Overflow is ignored when Hex/Octal calc,
specify like as 0x00..12345678*0x100 to get double word result.
-value3..: up to 10 operators except !,<,>,&,|,^ .
operator has no priority, calculated sequentially left to right.
-operation: +,-,*,!,/,%, <,>,|,&,^.
('!':power, '<','>':shift, '^':exclusive OR.)
Shift or bit operation is not valid for time.
If operation missing,do base conversion.
Operand with type!=t is treated as seconds when calculated
with time operand. Multiply and divide between times is also
by the value of seconds.
Doubleword precision is for +,-,*,/,% only.
Overflow is move up to doubleword precision for decimal calc,
or ignored for octal/hex calc.
-output-type:result display type.
x:hexadecimal, o:octal, d:decimal, u:unsigned decimal,
z:decimal by zzz,zz9, uz:unsigned decimal by zzz,zz9,
t:hh:mm:ss.xxx edit fmt,
s:translation of UCS-4 unicode and its UCS-2 surrogate.
l(lower L):convert to clock from a word(seconds from 1970)
or double word(Mainframe TOD. In double word bit 51 is
unit of micro second).
When mainframe HOST-TOD is before 2000/01/01,
it is displayed as elapsed second from 1900/01/01.
If omitted,hexadecimal for decimal,decimal for octal
and hexadecimal and number of second for type=t.
Result of divide for decimal,precision is 1 up.
for x or o,residual is displayed.
-R:leave result string on to the cmd input line to use as
next XBC cmd input.
-Vn[R]:n digit under point, R:round.
(ex) XBC T010100 ; XBC xfe0100 ; XBC o177 ; XBC e8ff>3
XBC T012159.12+t005212.333 ; XBC xabcdef+1000
XBC 12345678..abcdef0/30a2 ; XBC 3acf19fe/l
xbc 1234.56*7.89 v2r ; xbc 123.45/6.789 vr
xbc 200/3.3*35 v2r ; xbc 1+2+3+4+5+6+7+8+9+10
xbc 1f468/s ==> x1f468/s:=d83ddc68
xbc d83ddc68 ==> xd83ddc68/s:=0001f468
(Command line tool XBC is also packaged in zip file.)