Author: smash Date: Tue Oct 16 06:33:21 2007 New Revision: 22126 Modified: trunk/docs/pdds/draft/pdd19_pir.pod
Log: [pdds] * some tweaks to pdd19_pir.pod * introduced '<var1> <op>= <var2>' instruction in pdd19_pir.pod Modified: trunk/docs/pdds/draft/pdd19_pir.pod ============================================================================== --- trunk/docs/pdds/draft/pdd19_pir.pod (original) +++ trunk/docs/pdds/draft/pdd19_pir.pod Tue Oct 16 06:33:21 2007 @@ -116,8 +116,8 @@ Heredocs work like single or double quoted strings. All lines up to the terminating delimiter is slurped into the string. The delimiter -has to be on its own line, at the begging of the line and with no trailing -whitespace. +has to be on its own line, at the beginning of the line and with no +trailing whitespace. Assignment of a heredoc: @@ -150,7 +150,7 @@ =item charset:"string constant" -Like above with a chracter set attached to the string. Valid character +Like above with a character set attached to the string. Valid character sets are currently: C<ascii> (the default), C<binary>, C<unicode> (with UTF-8 as the default encoding), and C<iso-8859-1>. @@ -491,13 +491,13 @@ =item if <var> goto <identifier> -If <var> evaluates as true, jump to the named identifier. Translate to -B<if var, identifier>>. +If B<var> evaluates as true, jump to the named B<identifier>. Translate to +B<if var, identifier>. =item unless <var> goto <identifier> -Unless <var> evaluates as true, jump to the named identifier. Translate to -B<unless var, identifier>. +Unless B<var> evaluates as true, jump to the named B<identifier>. Translate +to B<unless var, identifier>. =item if null <var> goto <identifier> @@ -511,14 +511,14 @@ =item if <var1> <relop> <var2> goto <identifier> -The B<relop> can be: B<<, <=, ==, != E<gt>= E<gt>> which translate to the -PASM opcodes B<lt>, B<le>, B<eq>, B<ne>, B<ge> or B<gt>. If B<var1> B<relop> -B<var2> evaluates as true, jump to the named B<identifier>. +The B<relop> can be: B<E<lt>, E<lt>=, ==, != E<gt>= E<gt>> which translate +to the PASM opcodes B<lt>, B<le>, B<eq>, B<ne>, B<ge> or B<gt>. If B<var1> +B<relop> B<var2> evaluates as true, jump to the named B<identifier>. =item unless <var1> <relop> <var2> goto <identifier> -The B<relop> can be: B<<, <=, ==, != E<gt>= E<gt>> which translate to the -PASM opcodes B<lt>, B<le>, B<eq>, B<ne>, B<ge> or B<gt>. Unless B<var1> +The B<relop> can be: B<E<lt>, E<lt>=, ==, != E<gt>= E<gt>> which translate +to the PASM opcodes B<lt>, B<le>, B<eq>, B<ne>, B<ge> or B<gt>. Unless B<var1> B<relop> B<var2> evaluates as true, jump to the named B<identifier>. =item <var1> = <var2> @@ -535,13 +535,21 @@ B<add>, B<sub>, B<mul>, B<div>, B<mod> and B<pow> arithmetic ops. B<binary> B<.> is B<concat> and only valid for string arguments. -B<<<> and B<E<gt>E<gt>> are arithmetic shifts B<shl> and B<shr>. +B<E<lt>E<lt>> and B<E<gt>E<gt>> are arithmetic shifts B<shl> and B<shr>. B<E<gt>E<gt>E<gt>> is the logical shift B<lsr>. B<&&>, B<||> and B<~~> are logic B<and>, B<or> and B<xor>. B<&>, B<|> and B<~> are binary B<band>, B<bor> and B<bxor>. +=item <var1> <op>= <var2> + +This is equivalent to +B<E<lt>var1E<gt> = E<lt>var1E<gt> E<lt>opE<gt> E<lt>var2E<gt>>. Where +B<op> is called an assignment operator and can be any of the following +binary operators described earlier: B<+>, B<->, B<*>, B</>, B<%>, B<.>, +B<&>, B<|>, B<~>, B<E<lt>E<lt>>, B<E<gt>E<gt>> or B<E<gt>E<gt>E<gt>>. + =item <var> = <var> [ <var> ] This generates either a keyed B<set> operation or B<substr var, var, @@ -604,25 +612,13 @@ =item <var> = addr <identifier> -Assign to B<var> the address of label identified by <identifier>. Translate +Assign to B<var> the address of label identified by B<identifier>. Translate to B<set_addr var, var>. =item <var> = null Set B<var> to null. Translate to B<null <var>. -=item <<, <<= - -TODO - -=item >>, >>= - -TODO - -=item >>>,>>>= - -TODO - =item addr Return the address of a label.