xref: /aoo42x/main/basic/source/inc/disas.hxx (revision cdf0e10c)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 #ifndef _DISAS_HXX
29 #define _DISAS_HXX
30 
31 #include "image.hxx"
32 #include "opcodes.hxx"
33 // find a place for this limit ( also used in
34 class SvStream;
35 #define MAX_LABELS 0x2000L
36 class SbiDisas {
37 	const SbiImage& rImg;
38 	SbModule* pMod;
39 	char	 cLabels[ MAX_LABELS ];		// Bitvektor fuer Labels
40 	sal_uInt32	 nOff;					// aktuelle Position
41 	sal_uInt32   nPC;					// Position des Opcodes
42 	SbiOpcode eOp;					// Opcode
43 	sal_uInt32   nOp1, nOp2;			// Operanden
44 	sal_uInt32	 nParts;				// 1, 2 oder 3
45 	sal_uInt32	 nLine;					// aktuelle Zeile
46 	sal_Bool 	 DisasLine( String& );
47 	sal_Bool	 Fetch();				// naechster Opcode
48 public:
49 	SbiDisas( SbModule*, const SbiImage* );
50 	void Disas( SvStream& );
51 	void Disas( String& );
52 									// NICHT AUFRUFEN
53 	void	 StrOp( String& );
54 	void	 Str2Op( String& );
55 	void	 ImmOp( String& );
56 	void	 OnOp( String& );
57 	void	 LblOp( String& );
58 	void	 ReturnOp( String& );
59 	void	 ResumeOp( String& );
60 	void	 PromptOp( String& );
61 	void	 CloseOp( String& );
62 	void	 CharOp( String& );
63 	void	 VarOp( String& );
64 	void	 VarDefOp( String& );
65 	void	 OffOp( String& );
66 	void	 TypeOp( String& );
67 	void	 CaseOp( String& );
68 	void	 StmntOp( String& );
69 	void	 StrmOp( String& );
70 };
71 
72 #endif
73