mirror of
https://github.com/forth-ev/VolksForth.git
synced 2024-12-25 10:29:25 +00:00
86 lines
5.4 KiB
Plaintext
86 lines
5.4 KiB
Plaintext
Screen 0 not modified
|
|
0 \\ Double words cas 10nov05
|
|
1
|
|
2 This File contains definitions for 32Bit Math
|
|
3
|
|
4 This definitions are already included in the volksFORTH Kernel:
|
|
5
|
|
6 2! 2@ 2drop 2dup 2over 2swap d+ d. d.r
|
|
7 d0= d< d= dabs dnegate
|
|
8
|
|
9
|
|
10
|
|
11
|
|
12
|
|
13
|
|
14
|
|
15
|
|
Screen 1 not modified
|
|
0 \ 2constant 2rot 2variable d- d2/ ks 22 dez 87
|
|
1
|
|
2 : 2constant Create , , does> 2@ ;
|
|
3
|
|
4 : 2rot ( d1 d2 d3 -- d2 d3 d1 ) 5 roll 5 roll ;
|
|
5
|
|
6 : 2variable Variable 2 allot ;
|
|
7
|
|
8 : d- ( d1 d2 -- d3 ) dnegate d+ ;
|
|
9
|
|
10 Code d2/ ( d1 -- d2 )
|
|
11 A pop D sar A rcr A push Next end-code
|
|
12
|
|
13
|
|
14
|
|
15
|
|
Screen 2 not modified
|
|
0 \ dmax dmin du< ks 22 dez 87
|
|
1
|
|
2 : dmax ( d1 d2 -- d3 )
|
|
3 2over 2over d< IF 2swap THEN 2drop ;
|
|
4
|
|
5 : dmin ( d1 d2 -- d3 )
|
|
6 2over 2over d< IF 2drop exit THEN 2swap 2drop ;
|
|
7
|
|
8 : du< ( 32b1 32b2 -- f )
|
|
9 rot 2dup = IF 2drop u< exit THEN u> -rot 2drop ;
|
|
10
|
|
11
|
|
12
|
|
13
|
|
14
|
|
15
|
|
Screen 3 not modified
|
|
0
|
|
1
|
|
2
|
|
3
|
|
4
|
|
5
|
|
6
|
|
7
|
|
8
|
|
9
|
|
10
|
|
11
|
|
12
|
|
13
|
|
14
|
|
15
|
|
Screen 4 not modified
|
|
0
|
|
1
|
|
2
|
|
3
|
|
4
|
|
5
|
|
6
|
|
7
|
|
8
|
|
9
|
|
10
|
|
11
|
|
12
|
|
13
|
|
14
|
|
15
|