An implementation of a word that returns the limit of a DO LOOP follows;
i.e.: in 10 0 DO I' I DROP LOOP it will return 10.
COMPILER
: I' ( -- ) [+ASSEMBLER] 4 R) D0 MOV 31 # D0 BCHG D0 S -) MOV
[PREVIOUS] ;
TARGET READY
SwiftX/68K FORCE CPU-30/33 ok
: dwb1 10 7 DO I . I' H. CR LOOP ; ok
dwb1 7 A
8 A
9 A
ok
The ported chipForth implementation would simply be
: I' ( -- ) [+ASSEMBLER] CELL R) S -) MOV [PREVIOUS] ;
Why is bit 31 set?
dwb1 7 8000000A
8 8000000A
9 8000000A
ok
----------------------------------------------------------------------
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 Mon Apr 22 2002 - 08:55:10 PDT
Subscribe to our e-mail list service. It's free for all SwiftForth and SwiftX users!
This archive was generated 06-Feb-2012. Archive updated nightly.