fourth lecture
[sbs.git] / 4vo.fs
1 \ 4. lecture
2
3 : rr ( -- ) s" 4vo.fs" included ;
4 : :r rr ; \ ghci style
5
6 \ :noname \ ano-fkt
7
8 \ oop example: mini-examp.fs ( @ /pub/anton ...) oder bernd paysan webseite
9
10 \ live hax
11 \ > hex
12 \ > create foo
13 \ > 5 ,
14 \ > ' foo .
15 \ > ' foo >body .
16 \ > ' foo >body @ . 5 \ dazwischen steht das sogenannte `code field'
17
18 \ gforth schmaes
19 \ > here hex. \ (diese ausgabe)
20 \ > : foo 5 + ;
21 \ > here hex.
22 \ > : bar foo ;
23 \ > here hex.
24 \ > (diese ausgabe) 80 dump
25 \ > ' foo hex.
26 \ > ' foo >body hex.
27 \ > simple-see foo \ zwischencode \ ";s" aka "semis" aka "exit". wird fuer ';' kompiliert
28 \ > simple-see bar
29 \ addr von + in `simple-see foo' nehmen und
30 \ > <addr> 16 dump
31 \ \ und dann addressen dort nochmal dereferenzieren...
32 \ > <addr> @ 80 discode
33
34 \ \ besser: see-code
35
36
37 \ oder: > see +