[comp.lang.forth] Optimization with CWD

UNBCIC@BRFAPESP.BITNET (07/30/90)

      Some time ago, someone had posted the following code:

CODE 0> POP AX NEG AX CWD PUSH DX NEXT END-CODE

      Well, I think this was very interesting, so I created a word MY0> ,
with the above code, and test it against the original 0>. I tested
speed *AND* test the results of the two. BUT, for the value -32768,
it gave me -1! Can Mark Smiley (the poster of the code) tell me
something about this? The routine is really wrong or something wrong
happend in my system?


      Trying to be correct,
                         (8-DCS)

----------------------------------------------------------------------
DCS@CIC.UNB.ANDF.BR                           Daniel C. Sobral
UNBCIC@BRFAPESP.BITNET                            (8-DCS)

                                                 Only the cool survive
----------------------------------------------------------------------