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

CONSTANT doesn't CREATE , DOES> @ anymore.

From: Bulgrien, Dennis <Dennis.Bulgrien_at_TripointGlobal.com>
Date: Fri, 3 Dec 2004 12:23:46 -0600

I was surprised when I investigated CONSTANT . SwiftX Reference manual
section 4.4 "...a CONSTANT's behavior is to return its value". Experience
shows that it has been improved such that it doesn't run code that fetches
(returns) a ROM value and pushes it onto the stack at run-time but now at
compile-time. The value is inlined the same as an EQU literal. CONSTANT
run-time speed has increased! though size increases too.

SwiftX ColdFire 3...
INTERPRETER ok
: KONSTANT CREATE , DOES> @ ; ok
TARGET ok
7 KONSTANT sevk ok
: tsevk sevk . ; ok
7 CONSTANT sevc ok
: tsevc sevc . ; ok
7 EQU seve ok
: tseve seve . ; ok
SEE tsevk
20005D5A sevk BSR 61F2
20005D5C . BRA 6000B3BE ok
SEE tsevc
20005D60 7 #Q D0 MOV 7007
20005D62 D0 A6 -) MOV 2D00
20005D64 . BRA 6000B3B6 ok
SEE tseve
20005D68 7 #Q D0 MOV 7007
20005D6A D0 A6 -) MOV 2D00
20005D6C . BRA 6000B3AE ok
----------------------------------------------------------------------
swiftx_at_forth.com The SwiftX programming discussion email list
To unsubscribe, send subject "unsubscribe" to swiftx-request_at_forth.com
For list command help, send subject "help" to swiftx-request_at_forth.com
Message archives are located at http://www.forth.com/archive/swiftx
----------------------------------------------------------------------
This list is a forum for SwiftX users. For product support and bug
reports, please send email to support_at_forth.com
----------------------------------------------------------------------
Received on Fri Dec 03 2004 - 10:24:08 PST

This archive was generated by hypermail 2.2.0 : Tue Dec 02 2008 - 03:04:50 PST