embedded systems developers tools, cross compilers
  Home  |   SwiftX Archive  |   SwiftForth Archive  |

DUP, AVR SwiftX

From: Gene Silvernail <genes_at_belhaven.com>
Date: Thu, 11 Apr 2002 17:04:36 -0700

Something as simple as DUP bit me. I've always assumed that DUP checks the stack and would error if the stack was empty, not so.

Don't have the exact number but....

When DUP is run on an empty stack I get the number 658, I believe, in return. Not 2 numbers, ie the original and a copy but just the one 658. No indication that that the stack was empty.

Late one night I actually provided 2 errors in a word that countered each other. The 1st was the use of DUP with an empty stack and the 2nd placed a number on the stack that made up for the empty DUP stack.

How or where does one look or find which words perform a test on the stack??

Gene SIlvernail

----------------------------------------------------------------------
swiftx_at_forth.com The SwiftX programming discussion email list
To unsubscribe, send subject "unsubscribe swiftx" to listar_at_forth.com
For help with listar commands, send subject "help" to listar_at_forth.com
Archives are located at http://www.forth.com/swiftx -- check them out!
----------------------------------------------------------------------
THIS LIST IS NOT FOR BUG REPORTS! Send bug reports to support_at_forth.com.
Received on Thu Apr 11 2002 - 17:06:06 PDT

This archive was generated by hypermail 2.2.0 : Wed Jan 07 2009 - 03:04:23 PST