xref: /aoo4110/main/basic/source/inc/disas.hxx (revision b1cdbd2c)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef _DISAS_HXX
25 #define _DISAS_HXX
26 
27 #include "image.hxx"
28 #include "opcodes.hxx"
29 // find a place for this limit ( also used in
30 class SvStream;
31 #define MAX_LABELS 0x2000L
32 class SbiDisas {
33 	const SbiImage& rImg;
34 	SbModule* pMod;
35 	char	 cLabels[ MAX_LABELS ];		// Bitvektor fuer Labels
36 	sal_uInt32	 nOff;					// aktuelle Position
37 	sal_uInt32   nPC;					// Position des Opcodes
38 	SbiOpcode eOp;					// Opcode
39 	sal_uInt32   nOp1, nOp2;			// Operanden
40 	sal_uInt32	 nParts;				// 1, 2 oder 3
41 	sal_uInt32	 nLine;					// aktuelle Zeile
42 	sal_Bool 	 DisasLine( String& );
43 	sal_Bool	 Fetch();				// naechster Opcode
44 public:
45 	SbiDisas( SbModule*, const SbiImage* );
46 	void Disas( SvStream& );
47 	void Disas( String& );
48 									// NICHT AUFRUFEN
49 	void	 StrOp( String& );
50 	void	 Str2Op( String& );
51 	void	 ImmOp( String& );
52 	void	 OnOp( String& );
53 	void	 LblOp( String& );
54 	void	 ReturnOp( String& );
55 	void	 ResumeOp( String& );
56 	void	 PromptOp( String& );
57 	void	 CloseOp( String& );
58 	void	 CharOp( String& );
59 	void	 VarOp( String& );
60 	void	 VarDefOp( String& );
61 	void	 OffOp( String& );
62 	void	 TypeOp( String& );
63 	void	 CaseOp( String& );
64 	void	 StmntOp( String& );
65 	void	 StrmOp( String& );
66 };
67 
68 #endif
69