aboutsummaryrefslogtreecommitdiff
path: root/buzzard/demo6.th
blob: 75ec66784f18f2c7042dc2d520a649b71a71168d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
: foobar
  2
  [ 2 ,		  ( '[' turns the compiler off, allowing us to execute code )
    1 1 1 + + ,   ( and we compile in-line a 2 and a three )
		  ( the '2' means 'push the number following this' )
  ]
  + . cr
;

foobar

: 'foobar ' foobar ;    ( ' can only be run inside the compiler )
			( ' leaves the address of the following word
			    on the stack )

'foobar . cr

'foobar dump