First page Back Continue Last page Overview Graphics

Forth Example

Forth's extendability allows us to write launch even more simply!

: launch ( -- | launch the space shuttle )
	BEGIN
      ( H  M  S  HS )
	  00 00 06 60  T-  at  start-main-engine-3
	  00 00 06 48  T-  at  start-main-engine-2
	  00 00 06 36  T-  at  start-main-engine-1
	  00 00 00 00  T+  at  ignite-SRBS  release-SRBS
	  00 00 00 01  T+  is-time?
	UNTIL ;