Imported Upstream version 0.1beta
[debian/yforth] / doublee.c
1 /* yForth? - Written by Luca Padovani (C) 1996/97
2  * ------------------------------------------------------------------------
3  * This software is FreeWare as long as it comes with this header in each
4  * source file, anyway you can use it or any part of it whatever
5  * you want. It comes without any warranty, so use it at your own risk.
6  * ------------------------------------------------------------------------
7  * Module name:     doublee.c
8  * Abstract:        double-extension word set
9  */
10
11 #include "yforth.h"
12 #include "doublee.h"
13
14 /**************************************************************************/
15 /* WORDS ******************************************************************/
16 /**************************************************************************/
17
18 void _two_rote() {
19         register DCell d1 = GET_DCELL(sp);
20         register DCell d2 = GET_DCELL(sp + 2);
21         register DCell d3 = GET_DCELL(sp + 4);
22         PUT_DCELL(sp, d3);
23         PUT_DCELL(sp + 2, d1);
24         PUT_DCELL(sp + 4, d2);
25 }
26
27 void _d_u_less() {
28         register UDCell ud1 = GET_DCELL(sp + 2);
29         register UDCell ud2 = GET_DCELL(sp);
30         sp += 3;
31         sp[0] = FFLAG(ud1 < ud2);
32 }
33