home .. forth .. colorforth mail list archive ..

Re: [colorforth] Strage ColorForth results


--- "Roman Pavlyuk (personal)" <john@xxxxxxxxxxxxx>
wrote:
> Since in CF IF and -IF are implemented as jz and jnc
> opcodes
> that check values of Z and C flags respectively.
> 
> Try inserting '?' after the literal -- it compiles
> into test eax, eax,
> which should set Z flag (C flag is zeroed, but plz
> check with Inter's
> manual)

Hello Roman,

I don't think I'm following you.  I already have a '?'
inserted after the literal.

Again here is one version of the code:

: 0? ? drop if 0 ; then 1 ;

I would test this as

1 0?

or 

0 0?

So the ? is immediately following the literal 0 or
1.  Also half of the time this works.  If it was 
wrong all of the time I could understand it.
I'm quite puzzled by this.

> Good Luck. I did not test this, though
> 
> Roman

Please test it.  It's only one line of code but
it's driving me bonkers.

Regards,

John M. Drake


__________________________________
Do you Yahoo!?
Yahoo! Mail SpamGuard - Read only the mail you want.
http://antispam.yahoo.com/tools

---------------------------------------------------------------------
To unsubscribe, e-mail: colorforth-unsubscribe@xxxxxxxxxxxxxxxxxx
For additional commands, e-mail: colorforth-help@xxxxxxxxxxxxxxxxxx
Main web page - http://www.colorforth.com