|
1 /* |
|
2 * Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of the License "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 /* |
|
20 $Workfile: scr_opcodes.h $ |
|
21 |
|
22 Purpose: |
|
23 |
|
24 This file is used by the scr_inter.c. |
|
25 This file lists all the valid opcodes in the WLScriptParser. |
|
26 */ |
|
27 |
|
28 #ifndef SCR_OPCODES_H |
|
29 #define SCR_OPCODES_H |
|
30 |
|
31 #define JUMP_FW_S 0x80 |
|
32 #define JUMP_FW 0x01 |
|
33 #define JUMP_FW_W 0x02 |
|
34 #define JUMP_BW_S 0xA0 |
|
35 #define JUMP_BW 0x03 |
|
36 #define JUMP_BW_W 0x04 |
|
37 #define TJUMP_FW_S 0xC0 |
|
38 #define TJUMP_FW 0x05 |
|
39 #define TJUMP_FW_W 0x06 |
|
40 #define TJUMP_BW 0x07 |
|
41 #define TJUMP_BW_W 0x08 |
|
42 |
|
43 #define CALL_S 0x60 |
|
44 #define CALL 0x09 |
|
45 #define CALL_LIB_S 0x68 |
|
46 #define CALL_LIB 0x0A |
|
47 #define CALL_LIB_W 0x0B |
|
48 #define CALL_URL 0x0C |
|
49 #define CALL_URL_W 0x0D |
|
50 |
|
51 #define LOAD_VAR_S 0xE0 |
|
52 #define LOAD_VAR 0x0E |
|
53 #define STORE_VAR_S 0x40 |
|
54 #define STORE_VAR 0x0F |
|
55 #define INCR_VAR_S 0x70 |
|
56 #define INCR_VAR 0x10 |
|
57 #define DECR_VAR 0x11 |
|
58 |
|
59 |
|
60 #define LOAD_CONST_S 0x50 |
|
61 #define LOAD_CONST 0x12 |
|
62 #define LOAD_CONST_W 0x13 |
|
63 #define CONST_0 0x14 |
|
64 #define CONST_1 0x15 |
|
65 #define CONST_M1 0x16 |
|
66 #define CONST_ES 0x17 |
|
67 #define CONST_INVALID 0x18 |
|
68 #define CONST_TRUE 0x19 |
|
69 #define CONST_FALSE 0x1A |
|
70 |
|
71 #define INCR 0x1B |
|
72 #define DECR 0x1C |
|
73 #define ADD_ASG 0x1D |
|
74 #define SUB_ASG 0x1E |
|
75 #define UMINUS 0x1F |
|
76 #define ADD 0x20 |
|
77 #define SUB 0x21 |
|
78 #define MUL 0x22 |
|
79 #define DIV 0x23 |
|
80 #define IDIV 0x24 |
|
81 #define REM 0x25 |
|
82 |
|
83 #define B_AND 0x26 |
|
84 #define B_OR 0x27 |
|
85 #define B_XOR 0x28 |
|
86 #define B_NOT 0x29 |
|
87 #define B_LSHIFT 0x2A |
|
88 #define B_RSSHIFT 0x2B |
|
89 #define B_RSZSHIFT 0x2C |
|
90 |
|
91 #define EQ 0x2D |
|
92 #define LE 0x2E |
|
93 #define LT 0x2F |
|
94 #define GE 0x30 |
|
95 #define GT 0x31 |
|
96 #define NE 0x32 |
|
97 |
|
98 #define L_NOT 0x33 |
|
99 #define SCAND 0x34 |
|
100 #define SCOR 0x35 |
|
101 #define TOBOOL 0x36 |
|
102 |
|
103 |
|
104 #define POP 0x37 |
|
105 |
|
106 #define TYPEOF 0x38 |
|
107 #define ISVALID 0x39 |
|
108 |
|
109 #define RETURN 0x3A |
|
110 #define RETURN_ES 0x3B |
|
111 |
|
112 #define DEBUG_OP 0x3C |
|
113 |
|
114 |
|
115 void parse_opcode(NW_Byte *opcode, NW_Byte *param); |
|
116 |
|
117 #endif |
|
118 |
|
119 |