Index: /trunk/abdev/BasicCompiler32/BasicCompiler.rc
===================================================================
--- /trunk/abdev/BasicCompiler32/BasicCompiler.rc	(revision 148)
+++ /trunk/abdev/BasicCompiler32/BasicCompiler.rc	(revision 148)
@@ -0,0 +1,412 @@
+//Microsoft Developer Studio generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include "afxres.h"
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// 日本語 resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_JPN)
+#ifdef _WIN32
+LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT
+#pragma code_page(932)
+#endif //_WIN32
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE DISCARDABLE 
+BEGIN
+    "resource.h\0"
+END
+
+2 TEXTINCLUDE DISCARDABLE 
+BEGIN
+    "#include ""afxres.h""\r\n"
+    "\0"
+END
+
+3 TEXTINCLUDE DISCARDABLE 
+BEGIN
+    "\r\n"
+    "\0"
+END
+
+#endif    // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Dialog
+//
+
+#if defined(APSTUDIO_INVOKED) || defined(JPN)
+#if defined(APSTUDIO_INVOKED)
+IDD_MAIN$(JPN) DIALOG DISCARDABLE  0, 0, 205, 229
+#else
+IDD_MAIN DIALOG DISCARDABLE  0, 0, 205, 229
+#endif
+STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
+CAPTION "ActiveBasic Compiler&Debugger"
+FONT 9, "ＭＳ Ｐゴシック"
+BEGIN
+    DEFPUSHBUTTON   "コンパイル",IDOK,148,208,50,14
+    LTEXT           "出力先:",IDC_STATIC,7,10,23,8
+    EDITTEXT        IDC_EXEPATH,34,7,164,14,ES_AUTOHSCROLL
+    CONTROL         "Progress1",IDC_PROGRESS,"msctls_progress32",0x0,13,56,
+                    179,14
+    GROUPBOX        "進行状況",IDC_STATIC,7,31,191,45
+    LTEXT           "準備中...",IDC_MESSAGE,13,44,161,8
+    GROUPBOX        "メッセージ リスト",IDC_STATIC,7,83,191,117
+    EDITTEXT        IDC_ERRORLIST,13,113,179,80,ES_MULTILINE | 
+                    ES_AUTOVSCROLL | ES_AUTOHSCROLL | WS_DISABLED | 
+                    WS_VSCROLL | WS_HSCROLL
+    CONTROL         "エラー",IDC_SHOWERROR,"Button",BS_AUTORADIOBUTTON | 
+                    BS_PUSHLIKE,13,97,35,10
+    CONTROL         "デバッグ",IDC_SHOWDEBUG,"Button",BS_AUTORADIOBUTTON | 
+                    BS_PUSHLIKE,50,97,35,10
+    EDITTEXT        IDC_DEBUGLIST,13,113,179,80,ES_MULTILINE | 
+                    ES_AUTOVSCROLL | ES_AUTOHSCROLL | NOT WS_VISIBLE | 
+                    WS_DISABLED | WS_VSCROLL | WS_HSCROLL
+    LTEXT           "Version",IDC_STATIC_VERSION,7,214,140,8
+END
+#endif
+
+#if defined(APSTUDIO_INVOKED) || defined(JPN)
+#if defined(APSTUDIO_INVOKED)
+IDD_VARLIST$(JPN) DIALOG DISCARDABLE  0, 0, 215, 199
+#else
+IDD_VARLIST DIALOG DISCARDABLE  0, 0, 215, 199
+#endif
+STYLE WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
+CAPTION "ブレーク ポイント"
+FONT 9, "ＭＳ Ｐゴシック"
+BEGIN
+    PUSHBUTTON      "閉じる",IDCANCEL,165,6,50,14
+    LTEXT           "対象領域:",IDC_STATIC,2,9,30,8
+    LTEXT           "対象スレッド:",IDC_STATIC,2,26,38,8
+    COMBOBOX        IDC_THREADCOMBO,43,24,69,100,CBS_DROPDOWNLIST | CBS_SORT | 
+                    WS_VSCROLL | WS_TABSTOP
+    CONTROL         "Tree1",IDC_VARTREE,"SysTreeView32",TVS_HASBUTTONS | 
+                    TVS_HASLINES | TVS_LINESATROOT | WS_BORDER | WS_TABSTOP,
+                    0,88,215,111
+    CONTROL         "グローバル",IDC_GLOBAL,"Button",BS_AUTORADIOBUTTON | 
+                    BS_PUSHLIKE,43,6,47,14
+    CONTROL         "ローカル",IDC_LOCAL,"Button",BS_AUTORADIOBUTTON | 
+                    BS_PUSHLIKE,92,6,47,14
+    LTEXT           "プロシージャ:",IDC_STATIC,2,43,39,8
+    COMBOBOX        IDC_PROCCOMBO,43,40,69,116,CBS_DROPDOWNLIST | WS_VSCROLL | 
+                    WS_TABSTOP
+    CONTROL         "システム変数を表示しない",IDC_HIDESYSVAR,"Button",
+                    BS_AUTOCHECKBOX | WS_TABSTOP,117,44,93,10
+    PUSHBUTTON      "ステップ(IN)",IDC_STEPIN,4,64,50,14
+    CONTROL         "",IDC_STATIC,"Static",SS_ETCHEDHORZ,0,59,215,1
+    CONTROL         "",IDC_STATIC,"Static",SS_ETCHEDHORZ,0,81,215,1
+    PUSHBUTTON      "ステップ(OVER)",IDC_STEPOVER,57,64,50,14
+END
+#endif
+
+#if defined(APSTUDIO_INVOKED) || defined(JPN)
+#if defined(APSTUDIO_INVOKED)
+IDD_CLIPMAIN$(JPN) DIALOGEX 0, 0, 332, 88
+#else
+IDD_CLIPMAIN DIALOGEX 0, 0, 332, 88
+#endif
+STYLE WS_CHILD
+FONT 9, "ＭＳ Ｐゴシック"
+BEGIN
+    PUSHBUTTON      "コンパイル",IDOK,0,0,37,13
+    EDITTEXT        IDC_EXEPATH,285,57,24,12,ES_AUTOHSCROLL | ES_READONLY | 
+                    NOT WS_VISIBLE
+    EDITTEXT        IDC_ERRORLIST,38,14,129,74,ES_MULTILINE | ES_AUTOVSCROLL | 
+                    ES_AUTOHSCROLL | WS_DISABLED | WS_VSCROLL | WS_HSCROLL
+    CONTROL         "ビルド",IDC_SHOWERROR,"Button",BS_AUTORADIOBUTTON | 
+                    BS_PUSHLIKE,0,20,37,12
+    CONTROL         "デバッグ",IDC_SHOWDEBUG,"Button",BS_AUTORADIOBUTTON | 
+                    BS_PUSHLIKE,0,34,37,12
+    EDITTEXT        IDC_DEBUGLIST,38,15,179,73,ES_MULTILINE | ES_AUTOVSCROLL | 
+                    ES_AUTOHSCROLL | NOT WS_VISIBLE | WS_DISABLED | 
+                    WS_VSCROLL | WS_HSCROLL
+    CONTROL         "Progress1",IDC_PROGRESS,"msctls_progress32",PBS_SMOOTH,
+                    38,1,293,12
+    LTEXT           "準備中...",IDC_MESSAGE,286,47,24,8,NOT WS_VISIBLE,
+                    WS_EX_TRANSPARENT
+    CONTROL         "",IDC_STATIC,"Static",SS_ETCHEDHORZ,0,16,39,1
+END
+#endif
+
+#if defined(APSTUDIO_INVOKED) || defined(ENG)
+#if defined(APSTUDIO_INVOKED)
+IDD_CLIPMAIN$(ENG) DIALOGEX 0, 0, 332, 88
+#else
+IDD_CLIPMAIN DIALOGEX 0, 0, 332, 88
+#endif
+STYLE WS_CHILD
+FONT 9, "ＭＳ Ｐゴシック", 0, 0, 0x1
+BEGIN
+    PUSHBUTTON      "Compile",IDOK,0,0,37,11
+    EDITTEXT        IDC_EXEPATH,285,57,24,12,ES_AUTOHSCROLL | ES_READONLY | 
+                    NOT WS_VISIBLE
+    EDITTEXT        IDC_ERRORLIST,38,13,129,75,ES_MULTILINE | ES_AUTOVSCROLL | 
+                    ES_AUTOHSCROLL | WS_DISABLED | WS_VSCROLL | WS_HSCROLL
+    CONTROL         "Error",IDC_SHOWERROR,"Button",BS_AUTORADIOBUTTON | 
+                    BS_PUSHLIKE,0,17,37,10
+    CONTROL         "Debug",IDC_SHOWDEBUG,"Button",BS_AUTORADIOBUTTON | 
+                    BS_PUSHLIKE,0,28,37,10
+    EDITTEXT        IDC_DEBUGLIST,38,14,179,74,ES_MULTILINE | ES_AUTOVSCROLL | 
+                    ES_AUTOHSCROLL | NOT WS_VISIBLE | WS_DISABLED | 
+                    WS_VSCROLL | WS_HSCROLL
+    CONTROL         "Progress1",IDC_PROGRESS,"msctls_progress32",PBS_SMOOTH,
+                    38,0,293,12
+    LTEXT           "Waiting...",IDC_MESSAGE,286,47,24,8,NOT WS_VISIBLE,
+                    WS_EX_TRANSPARENT
+    CONTROL         "",IDC_STATIC,"Static",SS_ETCHEDHORZ,0,13,39,1
+END
+#endif
+
+#if defined(APSTUDIO_INVOKED) || defined(ENG)
+#if defined(APSTUDIO_INVOKED)
+IDD_MAIN$(ENG) DIALOG DISCARDABLE  0, 0, 205, 229
+#else
+IDD_MAIN DIALOG DISCARDABLE  0, 0, 205, 229
+#endif
+STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
+CAPTION "ActiveBasic Compiler&Debugger"
+FONT 9, "ＭＳ Ｐゴシック"
+BEGIN
+    DEFPUSHBUTTON   "Compile",IDOK,148,208,50,14
+    LTEXT           "Output:",IDC_STATIC,7,10,22,8
+    EDITTEXT        IDC_EXEPATH,34,7,164,14,ES_AUTOHSCROLL
+    CONTROL         "Progress1",IDC_PROGRESS,"msctls_progress32",0x0,13,56,
+                    179,14
+    GROUPBOX        "Advance situation",IDC_STATIC,7,31,191,45
+    LTEXT           "ready...",IDC_MESSAGE,13,44,161,8
+    GROUPBOX        "Message list",IDC_STATIC,7,83,191,117
+    EDITTEXT        IDC_ERRORLIST,13,113,179,80,ES_MULTILINE | 
+                    ES_AUTOVSCROLL | ES_AUTOHSCROLL | WS_DISABLED | 
+                    WS_VSCROLL | WS_HSCROLL
+    CONTROL         "Error",IDC_SHOWERROR,"Button",BS_AUTORADIOBUTTON | 
+                    BS_PUSHLIKE,13,97,30,10
+    CONTROL         "Debug",IDC_SHOWDEBUG,"Button",BS_AUTORADIOBUTTON | 
+                    BS_PUSHLIKE,50,97,35,10
+    EDITTEXT        IDC_DEBUGLIST,13,113,179,80,ES_MULTILINE | 
+                    ES_AUTOVSCROLL | ES_AUTOHSCROLL | NOT WS_VISIBLE | 
+                    WS_DISABLED | WS_VSCROLL | WS_HSCROLL
+    LTEXT           "Version 4.00 Global Edition beta1",IDC_STATIC,7,214,98,
+                    8
+END
+#endif
+
+#if defined(APSTUDIO_INVOKED) || defined(ENG)
+#if defined(APSTUDIO_INVOKED)
+IDD_VARLIST$(ENG) DIALOG DISCARDABLE  0, 0, 215, 199
+#else
+IDD_VARLIST DIALOG DISCARDABLE  0, 0, 215, 199
+#endif
+STYLE WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
+CAPTION "Breakpoint"
+FONT 9, "ＭＳ Ｐゴシック"
+BEGIN
+    PUSHBUTTON      "Close",IDCANCEL,165,6,50,14
+    LTEXT           "Level:",IDC_STATIC,2,9,18,8
+    LTEXT           "Thread:",IDC_STATIC,2,26,22,8
+    COMBOBOX        IDC_THREADCOMBO,43,24,69,100,CBS_DROPDOWNLIST | CBS_SORT | 
+                    WS_VSCROLL | WS_TABSTOP
+    CONTROL         "Tree1",IDC_VARTREE,"SysTreeView32",TVS_HASBUTTONS | 
+                    TVS_HASLINES | TVS_LINESATROOT | WS_BORDER | WS_TABSTOP,
+                    0,88,215,111
+    CONTROL         "Global",IDC_GLOBAL,"Button",BS_AUTORADIOBUTTON | 
+                    BS_PUSHLIKE,43,6,47,14
+    CONTROL         "Local",IDC_LOCAL,"Button",BS_AUTORADIOBUTTON | 
+                    BS_PUSHLIKE,92,6,47,14
+    LTEXT           "Procedure:",IDC_STATIC,2,43,31,8
+    COMBOBOX        IDC_PROCCOMBO,43,40,69,116,CBS_DROPDOWNLIST | WS_VSCROLL | 
+                    WS_TABSTOP
+    CONTROL         "Hide system variables",IDC_HIDESYSVAR,"Button",
+                    BS_AUTOCHECKBOX | WS_TABSTOP,117,44,81,10
+    PUSHBUTTON      "Step In",IDC_STEPIN,4,64,50,14
+    CONTROL         "",IDC_STATIC,"Static",SS_ETCHEDHORZ,0,59,215,1
+    CONTROL         "",IDC_STATIC,"Static",SS_ETCHEDHORZ,0,81,215,1
+    PUSHBUTTON      "Step Over",IDC_STEPOVER,57,64,50,14
+END
+#endif
+
+#if defined(APSTUDIO_INVOKED) || defined(JPN)
+#if defined(APSTUDIO_INVOKED)
+IDD_DEBUGGER$(JPN) DIALOGEX 0, 0, 291, 148
+#else
+IDD_DEBUGGER DIALOGEX 0, 0, 291, 148
+#endif
+STYLE WS_CHILD
+FONT 9, "ＭＳ Ｐゴシック", 0, 0, 0x1
+BEGIN
+    LTEXT           "対象スレッド:",IDC_STATIC,5,21,38,8
+    COMBOBOX        IDC_THREADCOMBO,5,30,69,100,CBS_DROPDOWNLIST | CBS_SORT | 
+                    WS_VSCROLL | WS_TABSTOP
+    LTEXT           "プロシージャ:",IDC_STATIC,5,49,39,8
+    COMBOBOX        IDC_PROCCOMBO,5,58,69,116,CBS_DROPDOWNLIST | WS_VSCROLL | 
+                    WS_TABSTOP
+    CONTROL         "",IDC_STATIC,"Static",SS_ETCHEDHORZ,0,15,99,1
+    LTEXT           "dummy",IDC_VARPOS,98,0,35,41,NOT WS_VISIBLE,
+                    WS_EX_STATICEDGE
+    CONTROL         "List2",IDC_WATCHLIST,"SysListView32",LVS_REPORT | 
+                    LVS_EDITLABELS | WS_BORDER | WS_TABSTOP,171,9,60,50,
+                    WS_EX_ACCEPTFILES
+    LTEXT           "コマンド",IDC_STATIC,3,3,23,8
+END
+#endif
+
+IDD_DEBUGGER_TOOLBARBASE DIALOG DISCARDABLE  0, 0, 62, 15
+STYLE WS_CHILD | WS_VISIBLE
+FONT 9, "ＭＳ Ｐゴシック"
+BEGIN
+END
+
+#if defined(APSTUDIO_INVOKED) || defined(ENG)
+#if defined(APSTUDIO_INVOKED)
+IDD_DEBUGGER$(ENG) DIALOGEX 0, 0, 291, 148
+#else
+IDD_DEBUGGER DIALOGEX 0, 0, 291, 148
+#endif
+STYLE WS_CHILD
+FONT 9, "ＭＳ Ｐゴシック", 0, 0, 0x1
+BEGIN
+    LTEXT           "Thread:",IDC_STATIC,5,21,22,8
+    COMBOBOX        IDC_THREADCOMBO,5,30,69,100,CBS_DROPDOWNLIST | CBS_SORT | 
+                    WS_VSCROLL | WS_TABSTOP
+    LTEXT           "Procedure:",IDC_STATIC,5,49,31,8
+    COMBOBOX        IDC_PROCCOMBO,5,58,69,116,CBS_DROPDOWNLIST | WS_VSCROLL | 
+                    WS_TABSTOP
+    CONTROL         "",IDC_STATIC,"Static",SS_ETCHEDHORZ,0,15,99,1
+    LTEXT           "dummy",IDC_VARPOS,98,0,35,41,NOT WS_VISIBLE,
+                    WS_EX_STATICEDGE
+    CONTROL         "List2",IDC_WATCHLIST,"SysListView32",LVS_REPORT | 
+                    LVS_EDITLABELS | WS_BORDER | WS_TABSTOP,171,9,60,50,
+                    WS_EX_ACCEPTFILES
+    LTEXT           "コマンド",IDC_STATIC,3,3,23,8
+END
+#endif
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// DESIGNINFO
+//
+
+#ifdef APSTUDIO_INVOKED
+GUIDELINES DESIGNINFO DISCARDABLE 
+BEGIN
+    "IDD_MAIN$(JPN)", DIALOG
+    BEGIN
+        LEFTMARGIN, 7
+        RIGHTMARGIN, 198
+        TOPMARGIN, 7
+        BOTTOMMARGIN, 222
+    END
+
+    "IDD_VARLIST$(JPN)", DIALOG
+    BEGIN
+        BOTTOMMARGIN, 161
+    END
+
+    "IDD_MAIN$(ENG)", DIALOG
+    BEGIN
+        LEFTMARGIN, 7
+        RIGHTMARGIN, 198
+        TOPMARGIN, 7
+        BOTTOMMARGIN, 222
+    END
+
+    "IDD_VARLIST$(ENG)", DIALOG
+    BEGIN
+        BOTTOMMARGIN, 161
+    END
+
+    IDD_DEBUGGER_TOOLBARBASE, DIALOG
+    BEGIN
+        LEFTMARGIN, 7
+        RIGHTMARGIN, 55
+        TOPMARGIN, 7
+        BOTTOMMARGIN, 8
+    END
+END
+#endif    // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Icon
+//
+
+// Icon with lowest ID value placed first to ensure application icon
+// remains consistent on all systems.
+IDI_MAIN                ICON    DISCARDABLE     "icon1.ico"
+IDI_VARSTRUCT           ICON    DISCARDABLE     "VarStruct.ico"
+IDI_VARDATA             ICON    DISCARDABLE     "VarData.ico"
+IDI_VARSTR              ICON    DISCARDABLE     "VarStr.ico"
+IDI_VARARRAY            ICON    DISCARDABLE     "VarArray.ico"
+IDI_VARPTRSTRUCT        ICON    DISCARDABLE     "VarPtrStruct.ico"
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Toolbar
+//
+
+IDR_DEBUGGERTOOLBAR TOOLBAR DISCARDABLE  16, 15
+BEGIN
+    BUTTON      IDC_DEBUG_START
+    BUTTON      IDC_DEBUG_STEPOVER
+    BUTTON      IDC_DEBUG_STEPIN
+END
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Bitmap
+//
+
+IDR_DEBUGGERTOOLBAR     BITMAP  DISCARDABLE     "toolbar_debugger.bmp"
+IDR_DEBUGGERTOOLBAR_DISABLED BITMAP  DISCARDABLE     "toolbar_debugger_disable.bmp"
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Menu
+//
+
+IDR_DEBUGGER_VARLIST_MENU MENU DISCARDABLE 
+BEGIN
+    POPUP "dummy"
+    BEGIN
+        MENUITEM "一般システム変数を表示する",  IDM_SHOW_DEFAULTSYSTEM_VAR
+        MENUITEM "RADシステム変数を表示する",   IDM_SHOW_RAD_VAR
+        MENUITEM "GUID変数を表示する",          IDM_SHOW_GUID_VAR
+    END
+END
+
+#endif    // 日本語 resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif    // not APSTUDIO_INVOKED
+
Index: /trunk/abdev/BasicCompiler32/BasicCompiler.vcproj
===================================================================
--- /trunk/abdev/BasicCompiler32/BasicCompiler.vcproj	(revision 148)
+++ /trunk/abdev/BasicCompiler32/BasicCompiler.vcproj	(revision 148)
@@ -0,0 +1,2065 @@
+<?xml version="1.0" encoding="shift_jis"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="BasicCompiler32"
+	ProjectGUID="{11F0E9AB-EAEC-4616-A9DD-838073342CBB}"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\Debug"
+			IntermediateDirectory=".\Debug"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="1"
+				TypeLibraryName=".\Debug/BasicCompiler.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\cpplibs\boost;..\BasicCompiler_Common\include"
+				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;JPN"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				PrecompiledHeaderFile=".\Debug/BasicCompiler.pch"
+				AssemblerListingLocation=".\Debug/"
+				ObjectFile=".\Debug/"
+				ProgramDataBaseFileName=".\Debug/"
+				BrowseInformation="1"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="4"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG,JPN"
+				Culture="1041"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="comctl32.lib psapi.lib"
+				OutputFile="../ActiveBasic/BasicCompiler32.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="true"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Debug/BasicCompiler32.pdb"
+				SubSystem="2"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				AdditionalManifestFiles="manifest.xml"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+				SuppressStartupBanner="true"
+				OutputFile=".\Debug/BasicCompiler.bsc"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\Release"
+			IntermediateDirectory=".\Release"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="1"
+				TypeLibraryName=".\Release/BasicCompiler.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="2"
+				FavorSizeOrSpeed="1"
+				AdditionalIncludeDirectories="..\cpplibs\boost;..\BasicCompiler_Common\include"
+				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;JPN"
+				StringPooling="true"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="true"
+				RuntimeTypeInfo="true"
+				PrecompiledHeaderFile=".\Release/BasicCompiler.pch"
+				AssemblerListingLocation=".\Release/"
+				ObjectFile=".\Release/"
+				ProgramDataBaseFileName=".\Release/"
+				BrowseInformation="0"
+				BrowseInformationFile=".\Release/"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG,JPN"
+				Culture="1041"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="comctl32.lib psapi.lib"
+				OutputFile="../ActiveBasic/BasicCompiler32.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				ProgramDatabaseFile=".\Release/BasicCompiler32.pdb"
+				SubSystem="2"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				AdditionalManifestFiles="manifest.xml"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+				SuppressStartupBanner="true"
+				OutputFile=".\Release/BasicCompiler.bsc"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="English_Rel|Win32"
+			OutputDirectory=".\English_Rel"
+			IntermediateDirectory=".\English_Rel"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="1"
+				TypeLibraryName=".\English_Rel/BasicCompiler.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="..\cpplibs\boost;..\BasicCompiler_Common\include"
+				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;ENG"
+				StringPooling="true"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="true"
+				PrecompiledHeaderFile=".\English_Rel/BasicCompiler.pch"
+				AssemblerListingLocation=".\English_Rel/"
+				ObjectFile=".\English_Rel/"
+				ProgramDataBaseFileName=".\English_Rel/"
+				BrowseInformation="2"
+				BrowseInformationFile=".\English_Rel/"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG,ENG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="odbc32.lib odbccp32.lib comctl32.lib"
+				OutputFile="../ActiveBasic/BasicCompiler32.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				ProgramDatabaseFile=".\English_Rel/BasicCompiler32.pdb"
+				SubSystem="2"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				AdditionalManifestFiles="manifest.xml"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+				SuppressStartupBanner="true"
+				OutputFile=".\English_Rel/BasicCompiler.bsc"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+			>
+			<File
+				RelativePath="BasicCompiler.rc"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCResourceCompilerTool"
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCResourceCompilerTool"
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="English_Rel|Win32"
+					>
+					<Tool
+						Name="VCResourceCompilerTool"
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<Filter
+				Name="32及び64共通"
+				>
+				<File
+					RelativePath="..\BasicCompiler_Common\BasicCompiler.cpp"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="English_Rel|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\BasicCompiler_Common\calculation.cpp"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="English_Rel|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\BasicCompiler_Common\Compile.cpp"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="English_Rel|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\BasicCompiler_Common\Diagnose.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\BasicCompiler_Common\error.cpp"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="English_Rel|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\BasicCompiler_Common\gc.cpp"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="English_Rel|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\BasicCompiler_Common\hash.cpp"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="English_Rel|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\BasicCompiler_Common\MakeExe.cpp"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="English_Rel|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\BasicCompiler_Common\NumOpe_GetType.cpp"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="English_Rel|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\BasicCompiler_Common\Object.cpp"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="English_Rel|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\BasicCompiler_Common\OldStatement.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\BasicCompiler_Common\Overload.cpp"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="English_Rel|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\BasicCompiler_Common\RSrcSection.cpp"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="English_Rel|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\BasicCompiler_Common\StrOperation.cpp"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="English_Rel|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+				</File>
+				<Filter
+					Name="Intermediate"
+					>
+					<File
+						RelativePath="..\BasicCompiler_Common\CommandFormat.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="English_Rel|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\BasicCompiler_Common\Intermediate_Step1.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="English_Rel|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\BasicCompiler_Common\Intermediate_Step2.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="English_Rel|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\BasicCompiler_Common\Resource.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="English_Rel|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+					</File>
+				</Filter>
+				<Filter
+					Name="Parts"
+					>
+					<File
+						RelativePath="..\BasicCompiler_Common\DataTable.cpp"
+						>
+					</File>
+					<File
+						RelativePath="..\BasicCompiler_Common\LoopRefCheck.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="English_Rel|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\BasicCompiler_Common\NonVolatile.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="English_Rel|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+					</File>
+				</Filter>
+				<Filter
+					Name="Debug（共通）"
+					>
+					<File
+						RelativePath="..\BasicCompiler_Common\BreakPoint.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="English_Rel|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\BasicCompiler_Common\BreakPoint.h"
+						>
+					</File>
+					<File
+						RelativePath="..\BasicCompiler_Common\CDebugThreadInfo.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="English_Rel|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\BasicCompiler_Common\Debug.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="English_Rel|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\BasicCompiler_Common\debug.h"
+						>
+					</File>
+					<File
+						RelativePath="..\BasicCompiler_Common\DebugMiddleFile.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="English_Rel|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\BasicCompiler_Common\DebugSection.h"
+						>
+					</File>
+					<File
+						RelativePath="..\BasicCompiler_Common\VarList.cpp"
+						>
+					</File>
+					<File
+						RelativePath="..\BasicCompiler_Common\WatchList.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\$(InputName)1.obj"
+								XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\$(InputName)1.obj"
+								XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="English_Rel|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\$(InputName)1.obj"
+								XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
+							/>
+						</FileConfiguration>
+					</File>
+				</Filter>
+				<Filter
+					Name="Type"
+					>
+					<File
+						RelativePath="..\BasicCompiler_Common\Class.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="English_Rel|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\BasicCompiler_Common\Class.h"
+						>
+					</File>
+					<File
+						RelativePath="..\BasicCompiler_Common\Enum.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="English_Rel|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\BasicCompiler_Common\Enum.h"
+						>
+					</File>
+				</Filter>
+				<Filter
+					Name="Schedule"
+					>
+					<File
+						RelativePath="..\BasicCompiler_Common\PESchedule.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="English_Rel|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\BasicCompiler_Common\PESchedule.h"
+						>
+					</File>
+				</Filter>
+				<Filter
+					Name="LexicalScoping"
+					>
+					<File
+						RelativePath="..\BasicCompiler_Common\LexicalScoping.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="English_Rel|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\BasicCompiler_Common\LexicalScoping.h"
+						>
+					</File>
+				</Filter>
+				<Filter
+					Name="Constant"
+					>
+					<File
+						RelativePath="..\BasicCompiler_Common\Const.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="English_Rel|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\BasicCompiler_Common\Const.h"
+						>
+					</File>
+				</Filter>
+				<Filter
+					Name="Variable"
+					>
+					<File
+						RelativePath="..\BasicCompiler_Common\VariableOpe.cpp"
+						>
+					</File>
+					<File
+						RelativePath="..\BasicCompiler_Common\VariableOpe.h"
+						>
+					</File>
+				</Filter>
+				<Filter
+					Name="Procedure"
+					>
+					<File
+						RelativePath="..\BasicCompiler_Common\ParamImpl.cpp"
+						>
+					</File>
+					<File
+						RelativePath="..\BasicCompiler_Common\Subroutine.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="English_Rel|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+					</File>
+				</Filter>
+			</Filter>
+			<Filter
+				Name="Compile"
+				>
+				<File
+					RelativePath="Compile_Statement.cpp"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="English_Rel|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="Compile_Var.cpp"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="English_Rel|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="MakePeHdr.cpp"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="English_Rel|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+				</File>
+				<Filter
+					Name="Calculation"
+					>
+					<File
+						RelativePath="Compile_Calc.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="English_Rel|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="Compile_Calc_PushVar.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="English_Rel|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="Compile_Set_Var.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="English_Rel|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="increment.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="English_Rel|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="NumOpe.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="English_Rel|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="NumOpe_Arithmetic.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="English_Rel|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="NumOpe_Logical.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="English_Rel|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="NumOpe_Relation.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="English_Rel|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="NumOpe_TypeOperation.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="English_Rel|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+					</File>
+				</Filter>
+				<Filter
+					Name="Object"
+					>
+					<File
+						RelativePath="Compile_Object.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="English_Rel|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+					</File>
+				</Filter>
+				<Filter
+					Name="Opcode"
+					>
+					<File
+						RelativePath="op32_main.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="English_Rel|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+					</File>
+				</Filter>
+				<Filter
+					Name="Procedure"
+					>
+					<File
+						RelativePath="Compile_CallProc.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="English_Rel|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="Compile_Func.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="English_Rel|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="Compile_ProcOp.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="English_Rel|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="CParameter.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="English_Rel|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="OperatorProc.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="English_Rel|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+					</File>
+				</Filter>
+			</Filter>
+			<Filter
+				Name="Common Classes"
+				>
+				<File
+					RelativePath="..\BasicCompiler_Common\src\Smoothie.cpp"
+					>
+				</File>
+				<Filter
+					Name="Meta Parts"
+					>
+					<File
+						RelativePath="..\BasicCompiler_Common\src\Member.cpp"
+						>
+					</File>
+					<File
+						RelativePath="..\BasicCompiler_Common\src\Method.cpp"
+						>
+					</File>
+					<File
+						RelativePath="..\BasicCompiler_Common\src\Namespace.cpp"
+						>
+					</File>
+					<File
+						RelativePath="..\BasicCompiler_Common\Procedure.cpp"
+						>
+					</File>
+					<File
+						RelativePath="..\BasicCompiler_Common\src\Prototype.cpp"
+						>
+					</File>
+					<File
+						RelativePath="..\BasicCompiler_Common\src\Symbol.cpp"
+						>
+					</File>
+					<File
+						RelativePath="..\BasicCompiler_Common\Type.cpp"
+						>
+					</File>
+					<File
+						RelativePath="..\BasicCompiler_Common\TypeDef.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="English_Rel|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\BasicCompiler_Common\Variable.cpp"
+						>
+					</File>
+				</Filter>
+				<Filter
+					Name="Lexical Parts"
+					>
+					<File
+						RelativePath="..\BasicCompiler_Common\src\Source.cpp"
+						>
+					</File>
+				</Filter>
+				<Filter
+					Name="Operation Statements"
+					>
+					<File
+						RelativePath="..\BasicCompiler_Common\src\Exception.cpp"
+						>
+					</File>
+				</Filter>
+			</Filter>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl"
+			>
+			<File
+				RelativePath="..\BasicCompiler_Common\BasicCompiler.h"
+				>
+			</File>
+			<File
+				RelativePath="..\BasicCompiler_Common\BasicFixed.h"
+				>
+			</File>
+			<File
+				RelativePath="CommandValue.h"
+				>
+			</File>
+			<File
+				RelativePath="..\BasicCompiler_Common\common.h"
+				>
+			</File>
+			<File
+				RelativePath="Opcode.h"
+				>
+			</File>
+			<Filter
+				Name="言語対応文字列"
+				>
+				<File
+					RelativePath="..\BasicCompiler_Common\common_msg_eng.h"
+					>
+				</File>
+				<File
+					RelativePath="..\BasicCompiler_Common\common_msg_jpn.h"
+					>
+				</File>
+			</Filter>
+			<Filter
+				Name="Parts_h"
+				>
+				<File
+					RelativePath="..\BasicCompiler_Common\NonVolatile.h"
+					>
+				</File>
+			</Filter>
+			<Filter
+				Name="Common Classes"
+				>
+				<File
+					RelativePath="..\BasicCompiler_Common\include\Smoothie.h"
+					>
+				</File>
+				<Filter
+					Name="Meta Parts"
+					>
+					<File
+						RelativePath="..\BasicCompiler_Common\include\logger.h"
+						>
+					</File>
+					<File
+						RelativePath="..\BasicCompiler_Common\include\Namespace.h"
+						>
+					</File>
+					<File
+						RelativePath="..\BasicCompiler_Common\Parameter.h"
+						>
+					</File>
+					<File
+						RelativePath="..\BasicCompiler_Common\Procedure.h"
+						>
+					</File>
+					<File
+						RelativePath="..\BasicCompiler_Common\include\Symbol.h"
+						>
+					</File>
+					<File
+						RelativePath="..\BasicCompiler_Common\Type.h"
+						>
+					</File>
+					<File
+						RelativePath="..\BasicCompiler_Common\TypeDef.h"
+						>
+					</File>
+					<File
+						RelativePath="..\BasicCompiler_Common\Variable.h"
+						>
+					</File>
+					<Filter
+						Name="Prototype"
+						>
+						<File
+							RelativePath="..\BasicCompiler_Common\include\Member.h"
+							>
+						</File>
+						<File
+							RelativePath="..\BasicCompiler_Common\include\Method.h"
+							>
+						</File>
+						<File
+							RelativePath="..\BasicCompiler_Common\include\Prototype.h"
+							>
+						</File>
+					</Filter>
+				</Filter>
+				<Filter
+					Name="Lexical Parts"
+					>
+					<File
+						RelativePath="..\BasicCompiler_Common\include\Source.h"
+						>
+					</File>
+				</Filter>
+				<Filter
+					Name="Operation Statements"
+					>
+					<File
+						RelativePath="..\BasicCompiler_Common\include\Exception.h"
+						>
+					</File>
+				</Filter>
+			</Filter>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+			>
+			<File
+				RelativePath="icon1.ico"
+				>
+			</File>
+			<File
+				RelativePath="toolbar_debugger.bmp"
+				>
+			</File>
+			<File
+				RelativePath="toolbar_debugger_disable.bmp"
+				>
+			</File>
+			<File
+				RelativePath="VarArray.ico"
+				>
+			</File>
+			<File
+				RelativePath="VarData.ico"
+				>
+			</File>
+			<File
+				RelativePath="VarPtrStruct.ico"
+				>
+			</File>
+			<File
+				RelativePath="VarStr.ico"
+				>
+			</File>
+			<File
+				RelativePath="VarStruct.ico"
+				>
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
Index: /trunk/abdev/BasicCompiler32/BasicCompiler32.sln
===================================================================
--- /trunk/abdev/BasicCompiler32/BasicCompiler32.sln	(revision 148)
+++ /trunk/abdev/BasicCompiler32/BasicCompiler32.sln	(revision 148)
@@ -0,0 +1,23 @@
+﻿
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual C++ Express 2005
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BasicCompiler32", "BasicCompiler.vcproj", "{11F0E9AB-EAEC-4616-A9DD-838073342CBB}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Win32 = Debug|Win32
+		English_Rel|Win32 = English_Rel|Win32
+		Release|Win32 = Release|Win32
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{11F0E9AB-EAEC-4616-A9DD-838073342CBB}.Debug|Win32.ActiveCfg = Debug|Win32
+		{11F0E9AB-EAEC-4616-A9DD-838073342CBB}.Debug|Win32.Build.0 = Debug|Win32
+		{11F0E9AB-EAEC-4616-A9DD-838073342CBB}.English_Rel|Win32.ActiveCfg = English_Rel|Win32
+		{11F0E9AB-EAEC-4616-A9DD-838073342CBB}.English_Rel|Win32.Build.0 = English_Rel|Win32
+		{11F0E9AB-EAEC-4616-A9DD-838073342CBB}.Release|Win32.ActiveCfg = Release|Win32
+		{11F0E9AB-EAEC-4616-A9DD-838073342CBB}.Release|Win32.Build.0 = Release|Win32
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal
Index: /trunk/abdev/BasicCompiler32/CParameter.cpp
===================================================================
--- /trunk/abdev/BasicCompiler32/CParameter.cpp	(revision 148)
+++ /trunk/abdev/BasicCompiler32/CParameter.cpp	(revision 148)
@@ -0,0 +1,390 @@
+#include "../BasicCompiler_Common/common.h"
+#include "opcode.h"
+
+int ParamImpl::NewTempParameters( const string &procName, const Parameters &params, int SecondParmNum ){
+	if( SecondParmNum == -1 ) SecondParmNum = (int)params.size();
+
+	///////////////////////////////////////////////////////
+	// 一時オブジェクトをあらかじめスタックに積んでおく
+	///////////////////////////////////////////////////////
+
+	useTempObject = false;
+
+	//一時参照の数
+	nCountOfTempObjects = 0;
+
+	BOOL bEllipse;
+	if(params.size()){
+		if(params[params.size()-1]->GetBasicType()==DEF_ELLIPSE) bEllipse=1;
+		else bEllipse=0;
+	}
+	else bEllipse=0;
+
+	for(int i2=ParmsNum-1;i2>=0;i2--){
+		useTempParameters[i2] = false;
+
+		if(bEllipse&&i2<=(int)params.size()-2) bEllipse=0;
+
+		if(i2==0){
+			if( params[i2]->GetVarName() == "_System_LocalThis" ){
+				//オブジェクトメンバの第一パラメータのThisポインタ
+				continue;
+			}
+		}
+		if( i2==0||i2==1 ){
+			if( params[i2]->GetVarName() == procName ){
+				//オブジェクトメンバの第一または第二パラメータの戻り値用オブジェクト
+				continue;
+			}
+		}
+
+		Type dummyType;
+		BOOL bByVal;
+		if(bEllipse){
+			NumOpe_GetType( Parms[i2], Type(), dummyType );
+			bByVal=1;
+		}
+		else{
+			dummyType = *params[i2];
+			bByVal = ( params[i2]->IsRef() == false ) ? TRUE:FALSE;
+		}
+
+
+		if( !bByVal ){
+			//ポインタ参照
+			if(Parms[i2][0]==1&&Parms[i2][1]==ESC_BYVAL){
+				//ポインタ指定
+				continue;
+			}
+
+			if( !GetVarType( Parms[i2], Type(), FALSE ) ){
+				//変数ではないとき
+				Type calcType;
+				NumOpe( Parms[i2], dummyType, calcType );
+				//↑ここでスタックに積む
+
+				nCountOfTempObjects++;
+
+				if( !calcType.IsStruct() ){
+					//一時参照を作成
+
+					//push esp
+					op_push( REG_ESP );
+
+					nCountOfTempObjects++;
+				}
+
+				bool result = CheckDifferentType(
+					dummyType,
+					calcType,
+					procName.c_str(),
+					i2);
+
+				if( result ){
+					useTempParameters[i2] = true;
+					useTempObject = true;
+
+					types[i2] = calcType;
+				}
+			}
+		}
+	}
+
+	return nCountOfTempObjects * PTR_SIZE;
+}
+
+void ParamImpl::DeleteTempParameters(){
+	///////////////////////////////////////////////////////
+	// 一時オブジェクトを破棄
+	///////////////////////////////////////////////////////
+	if( !useTempObject ) return;
+
+	for(int i2=ParmsNum-1;i2>=0;i2--){
+		if( useTempParameters[i2] ){
+			if( types[i2].IsStruct() ){
+				// 構造体の一時メモリ
+
+				//メモリを解放する
+
+				//call free
+				extern UserProc *pSub_free;
+				op_call(pSub_free);
+			}
+			else{
+				if( types[i2].Is64() ){
+					//pop ... 参照を消す
+					//pop ... 上位32ビット
+					//pop ... 下位32ビット
+					op_add_esp( PTR_SIZE * 3 );
+				}
+				else{
+					//pop ... 参照を消す
+					//pop ... 値を消す
+					op_add_esp( PTR_SIZE * 2 );
+				}
+			}
+		}
+	}
+}
+
+void ParamImpl::SetStructParameter( const Type &baseType, const char *expression ){
+	int object_size = baseType.GetClass().GetSize();
+
+	//push object_size
+	op_push_V(object_size);
+
+	//call calloc
+	extern UserProc *pSub_calloc;
+	op_call(pSub_calloc);
+
+	//push eax（ここでプッシュされた値が実際にパラメータとして引き渡される）
+	op_push(REG_EAX);
+
+	//push eax
+	op_push(REG_EAX);
+
+	Type calcType;
+	BOOL bUseHeap;
+	NumOpe( expression,
+		baseType,
+		calcType,
+		&bUseHeap );
+
+	// ※スタックにある二つのデータ（コピー先、コピー元）の値を必要とする
+	SetStructVariable( baseType, calcType, bUseHeap );
+}
+
+int ParamImpl::SetParameter( const string &procName, const Parameters &params, int SecondParmNum ){
+	if( SecondParmNum == -1 ) SecondParmNum = (int)params.size();
+
+	///////////////////////////////////////////////////////////
+	// パラメータをレジスタ及びスタックフレームにセット
+	///////////////////////////////////////////////////////////
+	int i2,i3;
+
+	BOOL bEllipse;
+	if( params.size() ){
+		if(params[params.size()-1]->GetBasicType()==DEF_ELLIPSE) bEllipse=1;
+		else bEllipse=0;
+	}
+	else bEllipse=0;
+
+	BOOL bHas_System_LocalThis=0;
+	if(ParmsNum>=1){
+		if( params[0]->GetVarName() == "_System_LocalThis" ){
+			bHas_System_LocalThis=1;
+		}
+	}
+
+	//戻り値用の変数名を取得
+	const char *lpszVarNameToReturn = (procName[0]==1&&procName[1]==ESC_OPERATOR)?"_System_ReturnValue":procName.c_str();
+
+	//パラメータをレジスタとスタックに格納
+	int ParmSize=0;
+	RELATIVE_VAR RelativeVar;
+	int nCountOfNowTempObjects = 0;
+	for(i2=ParmsNum-1;i2>=0;i2--){
+		if(bEllipse&&i2<=(int)params.size()-2) bEllipse=0;
+
+		if(i2==0){
+			if( params[i2]->GetVarName() == "_System_LocalThis" ){
+				//オブジェクトメンバの第一パラメータのThisポインタ
+				continue;
+			}
+		}
+		if(i2==0||i2==1){
+			if( params[i2]->GetVarName() == lpszVarNameToReturn ){
+				//オブジェクトメンバの第一または第二パラメータの戻り値用オブジェクト
+				continue;
+			}
+		}
+
+		Type dummyType;
+		BOOL bByVal;
+		if(bEllipse){
+			NumOpe_GetType( Parms[i2], Type(), dummyType );
+			bByVal=1;
+		}
+		else{
+			dummyType = *params[i2];
+			bByVal = ( params[i2]->IsRef() == false ) ? TRUE:FALSE;
+		}
+
+		if(bByVal==1){
+			//値参照
+
+			if(Parms[i2][0]==1&&Parms[i2][1]==ESC_BYVAL){
+				char temp2[255];
+				sprintf(temp2,"%s関数の第%dパラメータ",procName,i2+1);
+				SetError(19,temp2,cp);
+				continue;
+			}
+
+			if( dummyType.IsStruct() ){
+				SetStructParameter( dummyType, Parms[i2] );
+				goto next;
+			}
+
+			extern LONG_PTR ProcPtr_BaseIndex;
+			LONG_PTR back_ProcPtr_BaseIndex = ProcPtr_BaseIndex;
+			if( dummyType.IsProcPtr() ){
+				ProcPtr_BaseIndex = dummyType.GetIndex();
+			}
+			else{
+				ProcPtr_BaseIndex=-1;
+			}
+
+			BOOL bCalcUseHeap;
+			Type calcType;
+			if( !NumOpe( Parms[i2], dummyType, calcType, &bCalcUseHeap ) ){
+				break;
+			}
+
+			ProcPtr_BaseIndex=back_ProcPtr_BaseIndex;
+
+			if( calcType.IsObject() ){
+				if( !dummyType.IsObject()
+					||
+					dummyType.IsObject() &&
+					!dummyType.GetClass().IsEqualsOrSubClass( &calcType.GetClass() ) ){
+						//キャスト演算子のオーバーロードに対応する
+						CallCastOperatorProc( calcType, bCalcUseHeap,dummyType );
+				}
+			}
+
+			if(!bEllipse){
+				//型チェック
+				// TODO: _System_ReturnValueが考慮されていない？
+				if(bHas_System_LocalThis) i3=i2-1;
+				else i3=i2;
+				CheckDifferentType(
+					dummyType,
+					calcType,
+					procName.c_str(),
+					i3);
+			}
+
+			if( dummyType.IsDouble() ){
+				ChangeTypeToDouble( calcType.GetBasicType() );
+				ParmSize+=sizeof(long)*2;
+			}
+			else if( dummyType.IsSingle() ){
+				ChangeTypeToSingle( calcType.GetBasicType() );
+				ParmSize+=sizeof(long);
+			}
+			else if( dummyType.Is64() ){
+				ChangeTypeToInt64( calcType.GetBasicType() );
+				ParmSize+=sizeof(long)*2;
+			}
+			else if( dummyType.IsLong() || dummyType.IsDWord()
+				|| dummyType.IsPointer()
+				|| dummyType.IsObject() || dummyType.IsStruct() ){
+					ChangeTypeToLong( calcType.GetBasicType() );
+					ParmSize+=sizeof(long);
+			}
+			else if( dummyType.IsInteger() || dummyType.IsWord() ){
+				ChangeTypeToInteger( calcType.GetBasicType() );
+				ParmSize+=sizeof(long);
+			}
+			else if( dummyType.IsSByte() || dummyType.IsByte() || dummyType.IsBoolean() ){
+				ChangeTypeToByte( calcType.GetBasicType() );
+				ParmSize+=sizeof(long);
+			}
+			else{
+				SetError(300,NULL,cp);
+			}
+		}
+		else{
+			//ポインタ参照
+			if(Parms[i2][0]==1&&Parms[i2][1]==ESC_BYVAL){
+				//ポインタ指定
+
+				Type calcType;
+				if( !NumOpe( Parms[i2]+2, dummyType, calcType) ){
+					break;
+				}
+
+				ChangeTypeToLong( calcType.GetBasicType() );
+
+				dummyType.PtrLevelUp();
+
+				//型チェック
+				if(bHas_System_LocalThis) i3=i2-1;
+				else i3=i2;
+				CheckDifferentType(
+					dummyType,
+					calcType,
+					procName.c_str(),
+					i3);
+			}
+			else{
+				if( useTempParameters[i2] ){
+					//一時オブジェクトをコピー
+
+					if( !types[i2].IsStruct() ){
+						// 一時参照のための領域を考慮する
+						nCountOfNowTempObjects++;
+					}
+
+					nCountOfNowTempObjects++;
+
+					//mov eax, dword ptr[esp+offset]
+					op_mov_RM(
+						sizeof(long),
+						REG_EAX,
+						REG_ESP,
+						( ( ParmsNum - i2 - 1 ) + ( nCountOfTempObjects - nCountOfNowTempObjects ) ) * PTR_SIZE,
+						MOD_BASE_DISP32 );
+
+					//push eax
+					op_push(REG_EAX);
+				}
+				else{
+					//変数のアドレスを取得
+					Type varType;
+					if(GetVarOffset(
+						false,
+						false,
+						Parms[i2],
+						&RelativeVar,
+						varType)){
+							if( !dummyType.IsAny() ){
+								//型チェックを行う
+								if( dummyType.GetBasicType() == varType.GetBasicType() ){
+									if( dummyType.IsObject() ){
+										if( !dummyType.GetClass().IsEqualsOrSubClass( &varType.GetClass() ) ){
+											SetError(11,Parms[i2],cp);
+										}
+									}
+									else if( dummyType.IsStruct() ){
+										if( !dummyType.GetClass().IsEquals( &varType.GetClass() ) ){
+											SetError(11,Parms[i2],cp);
+										}
+									}
+								}
+								else if( (varType.GetBasicType()&FLAG_PTR)
+									&&((varType.GetBasicType()^FLAG_PTR)==dummyType.GetBasicType())){
+									//仮引数がポインタ参照で、実引数が配列の先頭ポインタのとき
+								}
+								else{
+									SetError(11,Parms[i2],cp);
+								}
+							}
+
+							//変数アドレスをレジスタにセット
+							SetVarPtrToEax(&RelativeVar);
+
+							//push eax
+							op_push(REG_EAX);
+					}
+				}
+			}
+
+			ParmSize+=PTR_SIZE;
+		}
+
+next:;
+	}
+
+	return ParmSize;
+}
Index: /trunk/abdev/BasicCompiler32/Compile_Calc.cpp
===================================================================
--- /trunk/abdev/BasicCompiler32/Compile_Calc.cpp	(revision 148)
+++ /trunk/abdev/BasicCompiler32/Compile_Calc.cpp	(revision 148)
@@ -0,0 +1,656 @@
+#include "../BasicCompiler_Common/common.h"
+#include "Opcode.h"
+
+void ChangeTypeToDouble_ToFpuReg(int OldType){
+	//現在のスタックの内容を実数レジスタに保存する
+	//NumOpeの直後専用
+	if(OldType==DEF_DOUBLE){
+		//fld qword ptr[esp]
+		op_fld_ptr_esp(DEF_DOUBLE);
+
+		//add esp,8
+		op_add_esp(8);
+	}
+	else if(OldType==DEF_SINGLE){
+		//fld dword ptr[esp]
+		op_fld_ptr_esp(DEF_SINGLE);
+
+		//add esp,4
+		op_add_esp(4);
+	}
+	else if(OldType==DEF_LONG){
+		//fild dword ptr[esp]
+		op_fld_ptr_esp(DEF_LONG);
+
+		//add esp,4
+		op_add_esp(4);
+	}
+	else if(OldType==DEF_DWORD){
+		//pop eax
+		op_pop(REG_EAX);
+
+		//push 0
+		op_push_V(0);
+
+		//push eax
+		op_push(REG_EAX);
+
+		//fild qword ptr[esp]
+		OpBuffer[obp++]=(char)0xDF;
+		OpBuffer[obp++]=(char)0x2C;
+		OpBuffer[obp++]=(char)0x24;
+
+		//add esp,8
+		op_add_esp(8);
+	}
+}
+void ChangeTypeToDouble(int OldType){
+	//現在のスタックの内容をdouble型に変換する
+	//NumOpeの直後専用
+	if(OldType==DEF_DOUBLE) return;
+	else if(OldType==DEF_SINGLE){
+		//fld dword ptr[esp]
+		op_fld_ptr_esp(DEF_SINGLE);
+
+		//sub esp,4
+		op_sub_esp(4);
+
+		//fstp qword ptr[esp]
+		OpBuffer[obp++]=(char)0xDD;
+		OpBuffer[obp++]=(char)0x1C;
+		OpBuffer[obp++]=(char)0x24;
+	}
+	else if(OldType==DEF_INT64||OldType==DEF_QWORD){
+		//64ビット整数型
+
+		//fild qword ptr[esp]
+		op_fld_ptr_esp(DEF_INT64);
+
+		//fstp qword ptr[esp]
+		OpBuffer[obp++]=(char)0xDD;
+		OpBuffer[obp++]=(char)0x1C;
+		OpBuffer[obp++]=(char)0x24;
+	}
+	else if(IsWholeNumberType(OldType)){
+		//その他整数型
+
+		if(IsSignedType(OldType)){
+			//符号あり
+
+			if(OldType==DEF_INTEGER || (isUnicode&&OldType==DEF_CHAR)){
+				//pop eax
+				op_pop(REG_EAX);
+
+				//movsx eax,ax
+				OpBuffer[obp++]=(char)0x0F;
+				OpBuffer[obp++]=(char)0xBF;
+				OpBuffer[obp++]=(char)0xC0;
+
+				//push eax
+				op_push(REG_EAX);
+			}
+			else if(OldType==DEF_SBYTE || (isUnicode==false&&OldType==DEF_CHAR)){
+				//pop eax
+				op_pop(REG_EAX);
+
+				//movsx eax,al
+				OpBuffer[obp++]=(char)0x0F;
+				OpBuffer[obp++]=(char)0xBE;
+				OpBuffer[obp++]=(char)0xC0;
+
+				//push eax
+				op_push(REG_EAX);
+			}
+
+			//fild dword ptr[esp]
+			op_fld_ptr_esp(DEF_LONG);
+
+			//sub esp,4
+			op_sub_esp(4);
+		}
+		else{
+			//符号なし
+
+			//pop eax
+			op_pop(REG_EAX);
+
+			//push 0
+			op_push_V(0);
+
+			//push eax
+			op_push(REG_EAX);
+
+			//fild qword ptr[esp]
+			OpBuffer[obp++]=(char)0xDF;
+			OpBuffer[obp++]=(char)0x2C;
+			OpBuffer[obp++]=(char)0x24;
+		}
+
+		//fstp qword ptr[esp]
+		OpBuffer[obp++]=(char)0xDD;
+		OpBuffer[obp++]=(char)0x1C;
+		OpBuffer[obp++]=(char)0x24;
+	}
+	else SetError(9,NULL,cp);
+}
+void ChangeTypeToSingle(int OldType){
+	//現在のスタックの内容をfloat型に変換する
+	//NumOpeの直後専用
+	if(OldType==DEF_SINGLE) return;
+	else if(OldType==DEF_DOUBLE){
+		//fld qword ptr[esp]
+		op_fld_ptr_esp(DEF_DOUBLE);
+
+		//add esp,4
+		op_add_esp(4);
+
+		//fstp dword ptr[esp]
+		OpBuffer[obp++]=(char)0xD9;
+		OpBuffer[obp++]=(char)0x1C;
+		OpBuffer[obp++]=(char)0x24;
+	}
+	else if(OldType==DEF_INT64||OldType==DEF_QWORD){
+		//64ビット整数型
+
+		//fild qword ptr[esp]
+		op_fld_ptr_esp(DEF_INT64);
+
+		//add esp,4
+		op_add_esp(4);
+
+		//fstp dword ptr[esp]
+		OpBuffer[obp++]=(char)0xD9;
+		OpBuffer[obp++]=(char)0x1C;
+		OpBuffer[obp++]=(char)0x24;
+	}
+	else if(IsWholeNumberType(OldType)){
+		//その他整数型
+
+		if(IsSignedType(OldType)){
+			//符号あり
+
+			if(OldType==DEF_INTEGER || (isUnicode&&OldType==DEF_CHAR)){
+				//pop eax
+				op_pop(REG_EAX);
+
+				//movsx eax,ax
+				OpBuffer[obp++]=(char)0x0F;
+				OpBuffer[obp++]=(char)0xBF;
+				OpBuffer[obp++]=(char)0xC0;
+
+				//push eax
+				op_push(REG_EAX);
+			}
+			else if(OldType==DEF_SBYTE || (isUnicode==false&&OldType==DEF_CHAR)){
+				//pop eax
+				op_pop(REG_EAX);
+
+				//movsx eax,al
+				OpBuffer[obp++]=(char)0x0F;
+				OpBuffer[obp++]=(char)0xBE;
+				OpBuffer[obp++]=(char)0xC0;
+
+				//push eax
+				op_push(REG_EAX);
+			}
+
+			//fild dword ptr[esp]
+			op_fld_ptr_esp(DEF_LONG);
+		}
+		else{
+			//符号なし
+
+			//fild dword ptr[esp]
+			op_fld_ptr_esp(DEF_LONG);
+		}
+
+		//fstp dword ptr[esp]
+		OpBuffer[obp++]=(char)0xD9;
+		OpBuffer[obp++]=(char)0x1C;
+		OpBuffer[obp++]=(char)0x24;
+	}
+	else SetError(9,NULL,cp);
+}
+
+void ChangeTypeToInt64(int OldType){
+	//現在のスタックの内容をInt64型に変換する
+	//NumOpeの直後専用
+	if(Is64Type(OldType)) return;
+
+	else if(OldType==DEF_DOUBLE){
+		//fld qword ptr[esp]
+		op_fld_ptr_esp(DEF_DOUBLE);
+
+		//fistp qword ptr[esp]
+		op_fistp_ptr_esp( sizeof(_int64) );
+	}
+	else if(OldType==DEF_SINGLE){
+		//fld dword ptr[esp]
+		op_fld_ptr_esp(DEF_SINGLE);
+
+		//sub esp,4
+		op_sub_esp(4);
+
+		//fistp qword ptr[esp]
+		op_fistp_ptr_esp( sizeof(_int64) );
+	}
+	else if(IsWholeNumberType(OldType)){
+		//その他整数
+
+		if(IsSignedType(OldType)){
+			//符号あり
+
+			//pop eax
+			op_pop(REG_EAX);
+
+			//cdq
+			op_cdq();
+
+			//push edx
+			op_push(REG_EDX);
+
+			//push eax
+			op_push(REG_EAX);
+		}
+		else{
+			//符号なし
+
+			//pop eax
+			op_pop(REG_EAX);
+
+			//push 0
+			op_push_V(0);
+
+			//push eax
+			op_push(REG_EAX);
+		}
+	}
+	else SetError(9,NULL,cp);
+}
+void ChangeTypeToLong(int OldType){
+	//現在のスタックの内容をLong型に変換する
+	//NumOpeの直後専用
+	if(OldType==DEF_DOUBLE){
+
+		//fld qword ptr[esp]
+		op_fld_ptr_esp(DEF_DOUBLE);
+
+		//add esp,4
+		op_add_esp(4);
+
+		//fistp dword ptr[esp]
+		op_fistp_ptr_esp( sizeof(long) );
+	}
+	else if(OldType==DEF_SINGLE){
+		//fld dword ptr[esp]
+		op_fld_ptr_esp(DEF_SINGLE);
+
+		//fistp dword ptr[esp]
+		op_fistp_ptr_esp( sizeof(long) );
+	}
+	else if(OldType==DEF_INT64||OldType==DEF_QWORD){
+		//pop eax
+		op_pop(REG_EAX);
+
+		//add esp,4
+		op_add_esp(4);
+
+		//push eax
+		op_push(REG_EAX);
+	}
+}
+void ChangeTypeToInteger(int OldType){
+	//現在のスタックの内容をInteger型に変換する
+	if(OldType==DEF_BOOLEAN||
+		OldType==DEF_BYTE||
+		OldType==DEF_WORD||OldType==DEF_INTEGER || (isUnicode&&OldType==DEF_CHAR)) return;
+	else if(OldType==DEF_SBYTE || (isUnicode==false&&OldType==DEF_CHAR)){
+		//pop eax
+		op_pop(REG_EAX);
+
+		//movsx eax,al
+		OpBuffer[obp++]=(char)0x0F;
+		OpBuffer[obp++]=(char)0xBE;
+		OpBuffer[obp++]=(char)0xC0;
+
+		//push eax
+		op_push(REG_EAX);
+	}
+	else{
+		ChangeTypeToLong(OldType);
+
+		//pop eax
+		op_pop(REG_EAX);
+
+		//and eax,0000FFFFh
+		OpBuffer[obp++]=(char)0x25;
+		*((long *)(OpBuffer+obp))=0x0000FFFF;
+		obp+=sizeof(long);
+
+		//push eax
+		op_push(REG_EAX);
+	}
+}
+void ChangeTypeToByte(int OldType){
+	//現在のスタックの内容をbyte型に変換する
+	if(OldType==DEF_BYTE||OldType==DEF_SBYTE || (isUnicode==false&&OldType==DEF_CHAR)) return;
+
+	ChangeTypeToLong(OldType);
+
+	//pop eax
+	op_pop(REG_EAX);
+
+	//and eax,000000FFh
+	OpBuffer[obp++]=(char)0x25;
+	*((long *)(OpBuffer+obp))=0x000000FF;
+	obp+=sizeof(long);
+
+	//push eax
+	op_push(REG_EAX);
+}
+
+
+
+
+
+
+
+
+
+void RestoreDefaultRegisterFromStackMemory( int type ){
+	//現在のスタックの内容を実数レジスタに保存する
+	//NumOpeの直後専用
+	if(type==DEF_DOUBLE){
+		//fld qword ptr[esp]
+		op_fld_ptr_esp(DEF_DOUBLE);
+
+		//add esp,8
+		op_add_esp(8);
+	}
+	else if(type==DEF_SINGLE){
+		//fld dword ptr[esp]
+		op_fld_ptr_esp(DEF_SINGLE);
+
+		//add esp,4
+		op_add_esp(4);
+	}
+	else if( Is64Type( type ) ){
+		//pop eax
+		op_pop(REG_EAX);
+
+		//pop edx
+		op_pop(REG_EDX);
+	}
+	else{
+		//pop eax
+		op_pop(REG_EAX);
+	}
+}
+
+void SetVariableFromEax(int VarType,int CalcType,RELATIVE_VAR *pRelativeVar){
+	/////////////////////////////////////////////////
+	// eaxの内容を変数にコピーするコードを抽出
+	/////////////////////////////////////////////////
+
+	if(VarType==DEF_BOOLEAN){
+		//bool
+		SetBooleanVariable(CalcType,pRelativeVar);
+	}
+	else if( IsRealNumberType( VarType ) ){
+		// Double/Single型変数へレジスタの値を代入
+		SetRealVariable(VarType, CalcType, pRelativeVar);
+	}
+	else if( IsWholeNumberType( VarType ) || VarType == DEF_OBJECT ){
+		int typeSize = GetTypeSize( VarType, -1 );
+
+		//整数変数へraxの値を格納する
+		SetWholeVariable( typeSize, CalcType, pRelativeVar );
+	}
+	else{
+		SetError(300,NULL,cp);
+	}
+}
+
+void OpcodeCalc( const char *Command ){
+	int i,i2,i3;
+	char variable[VN_SIZE];
+
+
+
+	//////////////////////////////////////
+	// インクリメント・デクリメント
+	//////////////////////////////////////
+
+	for(i=0;;i++){
+		if(Command[i]=='\"'){
+			//ダブルクォートは不正なのでエラー扱い
+			variable[i]=0;
+			SetError(3,variable,cp);
+			return;
+		}
+
+		if(Command[i]=='('){
+			i2=GetStringInPare(variable+i,Command+i);
+			i+=i2-1;
+			continue;
+		}
+		if(Command[i]=='['){
+			i2=GetStringInBracket(variable+i,Command+i);
+			i+=i2-1;
+			continue;
+		}
+		if(Command[i]=='\0'){
+
+			///////////////////////////////////
+			// インクリメント・デクリメント
+			///////////////////////////////////
+
+			if(i>2){
+				if(Command[i-2]=='+'&&Command[i-1]=='+'){
+					//インクリメント
+					variable[i-2]=0;
+					IncDec(CALC_ADDITION,variable,"1");
+					return;
+				}
+				else if(Command[i-2]=='-'&&Command[i-1]=='-'){
+					//デクリメント
+					variable[i-2]=0;
+					IncDec(CALC_SUBTRACTION,variable,"1");
+					return;
+				}
+			}
+
+
+			//先端部分の識別子をエラーキーワードにする
+			for(i=0;;i++){
+				if(!IsVariableChar(Command[i])){
+					variable[i]=0;
+					break;
+				}
+				variable[i]=Command[i];
+			}
+
+			if(GetVarType(variable,Type(),0)){
+				//変数リストに該当したとき
+				SetError(1,NULL,cp);
+			}
+			else{
+				if(GetConstHash(variable)){
+					//定数リストに該当したとき
+					SetError(1,NULL,cp);
+				}
+				else{
+					//変数リスト、定数リストに該当しないとき
+					SetError(3,variable,cp);
+				}
+			}
+			return;
+		}
+
+		i2=GetCalcId(Command+i,&i3);
+		if(i2){
+			variable[i]=0;
+
+			if(Command[i]=='=') break;
+
+			if(Command[i+1+i3]=='='){
+				IncDec(i2,variable,Command+i+1+i3+1);
+				return;
+			}
+		}
+
+		variable[i]=Command[i];
+	}
+
+	if(Command[i+1]=='\0'){
+		SetError(1,NULL,cp);
+		return;
+	}
+
+
+
+	///////////////////////////////////////////////////////////////
+	// インデクサのsetアクセサ（[]=演算子のオーバーロードに対応）
+	///////////////////////////////////////////////////////////////
+
+	char ObjName[VN_SIZE],array_element[VN_SIZE];
+	GetArrayElement(variable,ObjName,array_element);
+	if(array_element[0]){
+		Type varType;
+		if( GetVarType(ObjName,varType,0) && varType.IsObject() ){
+			char temporary[VN_SIZE];
+			sprintf(temporary,"%s.%c%c%c",ObjName,1,ESC_OPERATOR,CALC_ARRAY_SET);
+
+			char temp2[VN_SIZE];
+			sprintf(temp2,"%s,%s",array_element,Command+i+1);
+
+			int idProc;
+			void *pProc;
+			idProc=GetProc(temporary,(void **)&pProc);
+			if(idProc){
+				CallProc(idProc,pProc,temporary,temp2,Type());
+				return;
+			}
+		}
+	}
+
+
+	if( lstrcmpi( variable, "This" ) == 0 ){
+		SetError(133,NULL,cp);
+		return;
+	}
+
+
+	////////////////////////////////////////
+	// 変数のタイプ型を識別して、演算を行う
+	////////////////////////////////////////
+
+	Type varType;
+
+	//型を識別
+	if( !GetVarType(variable,varType,false) ){
+
+		// プロパティ用のメソッドを呼び出す
+		if(!CallPropertyMethod( variable, Command+i+1, Type() )){
+			//エラーを表示
+			GetVarType(variable,varType,true);
+		}
+
+		return;
+	}
+
+	extern LONG_PTR ProcPtr_BaseIndex;
+	if(varType.IsProcPtr()) ProcPtr_BaseIndex=varType.GetIndex();
+	else ProcPtr_BaseIndex=-1;
+
+	RELATIVE_VAR VarRelativeVar;
+	if( varType.IsStruct() ){
+		//代入コピーに備える
+
+		//変数アドレスを取得
+		if(!GetVarOffsetReadWrite(
+			variable,
+			&VarRelativeVar,
+			varType)) return;
+
+		SetVarPtrToEax(&VarRelativeVar);
+
+		//push eax
+		op_push(REG_EAX);
+	}
+
+
+	//NumOpe...（スタックに答えが格納される）
+	BOOL bCalcUseHeap;
+	Type calcType;
+	if( !NumOpe(Command+i+1,varType,calcType,&bCalcUseHeap) ){
+		return;
+	}
+
+	//変数アドレスを取得
+	if(!GetVarOffsetReadWrite(
+		variable,
+		&VarRelativeVar,
+		varType)) return;
+
+	if(varType.GetBasicType()&FLAG_PTR){
+		SetError(14,variable,cp);
+		return;
+	}
+
+	if( varType.IsStruct() ){
+		//構造体インスタンスへの代入
+		SetStructVariable(varType,calcType,bCalcUseHeap);
+		return;
+	}
+
+	if( calcType.IsObject() && !calcType.Equals( varType ) ){
+		bool isUpCast = false;
+		if( varType.IsObject() ){
+			if( varType.GetClass().IsEqualsOrSubClass( &calcType.GetClass() ) ){
+				isUpCast = true;
+			}
+		}
+		if( !isUpCast ){
+			//キャスト演算子のオーバーロードに対応する
+			CallCastOperatorProc(calcType,bCalcUseHeap,varType);
+		}
+	}
+
+
+	if( varType.IsObject() && Smoothie::Meta::blittableTypes.IsExist( calcType ) ){
+		// Blittable型をオブジェクトとして扱う
+		vector<UserProc *> userProcs;
+		Smoothie::Meta::blittableTypes.GetClass( calcType ).GetStaticMethods().Enum( "_Create", userProcs );
+		if( userProcs.size() != 1 ){
+			SetError();
+			return;
+		}
+		UserProc *pUserProc = userProcs[0];
+
+		// call System.[TypeClass]._Create
+		op_call( pUserProc );
+
+		// push eax
+		op_push( REG_EAX );
+
+		calcType = pUserProc->ReturnType();
+	}
+
+
+	/////////////////////////////////
+	// 右辺、左辺の型チェックを行う
+	/////////////////////////////////
+
+	CheckDifferentType(varType,calcType,0,0);
+
+
+	/////////////////////////////////////////////////
+	// スタックの内容を変数にコピーするコードを抽出
+	/////////////////////////////////////////////////
+
+	//eax、edx:eax、またはst(0)にスタック上のデータを取り出す
+	RestoreDefaultRegisterFromStackMemory( calcType.GetBasicType() );
+
+	SetVariableFromEax(varType.GetBasicType(),calcType.GetBasicType(),&VarRelativeVar);
+}
Index: /trunk/abdev/BasicCompiler32/Compile_Calc_PushVar.cpp
===================================================================
--- /trunk/abdev/BasicCompiler32/Compile_Calc_PushVar.cpp	(revision 148)
+++ /trunk/abdev/BasicCompiler32/Compile_Calc_PushVar.cpp	(revision 148)
@@ -0,0 +1,735 @@
+#include "../BasicCompiler_Common/common.h"
+#include "Opcode.h"
+
+void SetReg_RealVariable(int type,RELATIVE_VAR *pRelativeVar){
+	if(pRelativeVar->dwKind==VAR_GLOBAL){
+		if(pRelativeVar->bOffsetOffset){
+			//fld ptr[ecx+offset]
+			op_fld_base_offset(type,REG_ECX,(int)pRelativeVar->offset);
+			obp-=sizeof(long);
+			pobj_GlobalVarSchedule->add();
+			obp+=sizeof(long);
+		}
+		else{
+			//mov ecx,offset
+			op_mov_RV(REG_ECX,(int)pRelativeVar->offset);
+			obp-=sizeof(long);
+			pobj_GlobalVarSchedule->add();
+			obp+=sizeof(long);
+
+			//fld ptr[ecx]
+			op_fld_basereg(type,REG_ECX);
+		}
+	}
+	else if(pRelativeVar->dwKind==VAR_REFGLOBAL){
+		SetError(300,NULL,cp);
+	}
+	else if(pRelativeVar->dwKind==VAR_LOCAL){
+		if(pRelativeVar->bOffsetOffset){
+			//fld ptr[ebp+ecx+offset]
+			op_fld_base_offset_ex(type,REG_EBP,REG_ECX,(int)pRelativeVar->offset,USE_OFFSET);
+			obp-=sizeof(long);
+			AddLocalVarAddrSchedule();
+			obp+=sizeof(long);
+		}
+		else{
+			//fld ptr[ebp+offset]
+			op_fld_base_offset(type,REG_EBP,(int)pRelativeVar->offset);
+			obp-=sizeof(long);
+			AddLocalVarAddrSchedule();
+			obp+=sizeof(long);
+		}
+	}
+	else if(pRelativeVar->dwKind==VAR_REFLOCAL){
+		if(pRelativeVar->bOffsetOffset){
+			//add ecx,qword ptr[ebp+offset]
+			op_add_RM(sizeof(long),REG_ECX,REG_EBP,(int)pRelativeVar->offset,MOD_BASE_DISP32);
+			obp-=sizeof(long);
+			AddLocalVarAddrSchedule();
+			obp+=sizeof(long);
+		}
+		else{
+			//mov ecx,qword ptr[ebp+offset]
+			op_mov_RM(sizeof(long),REG_ECX,REG_EBP,(int)pRelativeVar->offset,MOD_BASE_DISP32);
+			obp-=sizeof(long);
+			AddLocalVarAddrSchedule();
+			obp+=sizeof(long);
+		}
+
+		goto directmem;
+	}
+	else if(pRelativeVar->dwKind==VAR_DIRECTMEM){
+directmem:
+		//fld ptr[ecx]
+		op_fld_basereg(type,REG_ECX);
+	}
+}
+void SetReg_WholeVariable(int type,RELATIVE_VAR *pRelativeVar,int reg, bool is64Head){
+	int varSize;
+
+	varSize=GetTypeSize(type,-1);
+
+	if(varSize==sizeof(_int64)){
+		//64ビットの場合はedx:eaxにロード
+		if(reg!=REG_EAX){
+			SetError(300,NULL,cp);
+			return;
+		}
+
+		//下位32ビットをeaxにロード
+		SetReg_WholeVariable(DEF_LONG,pRelativeVar,REG_EAX);
+
+		//上位32ビットをedxにロード
+		SetReg_WholeVariable(DEF_LONG,pRelativeVar,REG_EDX, true);
+
+		return;
+	}
+
+	int offsetOf64Head = 0;
+	if( is64Head ){
+		offsetOf64Head = sizeof(long);
+	}
+
+	if(pRelativeVar->dwKind==VAR_GLOBAL){
+		if(pRelativeVar->bOffsetOffset){
+			//mov reg, ptr[ecx+offset]
+			op_mov_RM(varSize,reg,REG_ECX,(int)pRelativeVar->offset + offsetOf64Head,MOD_BASE_DISP32);
+		}
+		else{
+			//mov reg, ptr[offset]
+			op_mov_RM(varSize,reg,0,(int)pRelativeVar->offset + offsetOf64Head,MOD_DISP32);
+		}
+		obp-=sizeof(long);
+		pobj_GlobalVarSchedule->add();
+		obp+=sizeof(long);
+	}
+	else if(pRelativeVar->dwKind==VAR_REFGLOBAL){
+		if(pRelativeVar->bOffsetOffset){
+			//add ecx,qword ptr[offset]
+			op_add_RM(varSize,REG_ECX,REG_NON,(int)pRelativeVar->offset,MOD_DISP32);
+		}
+		else{
+			//mov ecx,qword ptr[offset]
+			op_mov_RM(varSize,REG_ECX,REG_NON,(int)pRelativeVar->offset,MOD_DISP32);
+		}
+		obp-=sizeof(long);
+		pobj_GlobalVarSchedule->add();
+		obp+=sizeof(long);
+
+		goto directmem;
+	}
+	else if(pRelativeVar->dwKind==VAR_LOCAL){
+		if(pRelativeVar->bOffsetOffset){
+			//mov reg, ptr[ebp+ecx+offset]
+			op_mov_RM_ex(varSize,reg,REG_EBP,REG_ECX,(int)pRelativeVar->offset + offsetOf64Head,USE_OFFSET);
+		}
+		else{
+			//mov reg, ptr[ebp+offset]
+			op_mov_RM(varSize,reg,REG_EBP,(int)pRelativeVar->offset + offsetOf64Head,MOD_BASE_DISP32);
+		}
+		obp-=sizeof(long);
+		AddLocalVarAddrSchedule();
+		obp+=sizeof(long);
+	}
+	else if(pRelativeVar->dwKind==VAR_REFLOCAL){
+		if(pRelativeVar->bOffsetOffset){
+			//add ecx,qword ptr[ebp+offset]
+			op_add_RM(varSize,REG_ECX,REG_EBP,(int)pRelativeVar->offset,MOD_BASE_DISP32);
+		}
+		else{
+			//mov ecx,qword ptr[ebp+offset]
+			op_mov_RM(varSize,REG_ECX,REG_EBP,(int)pRelativeVar->offset,MOD_BASE_DISP32);
+		}
+		obp-=sizeof(long);
+		AddLocalVarAddrSchedule();
+		obp+=sizeof(long);
+
+		goto directmem;
+	}
+	else if(pRelativeVar->dwKind==VAR_DIRECTMEM){
+directmem:
+		if( is64Head ){
+			//mov reg, ptr[ecx]
+			op_mov_RM(varSize,reg,REG_ECX,offsetOf64Head,MOD_BASE_DISP8);
+		}
+		else{
+			//mov reg, ptr[ecx]
+			op_mov_RM(varSize,reg,REG_ECX,0,MOD_BASE);
+		}
+	}
+}
+
+
+
+
+
+void PushDoubleVariable(RELATIVE_VAR *pRelativeVar){
+	if(pRelativeVar->dwKind==VAR_GLOBAL){
+		if(pRelativeVar->bOffsetOffset){
+			//push dword ptr[ecx+offset+sizeof(long)]
+			OpBuffer[obp++]=(char)0xFF;
+			OpBuffer[obp++]=(char)0xB1;
+			*((long *)(OpBuffer+obp))=pRelativeVar->offset+sizeof(long);
+			pobj_GlobalVarSchedule->add();
+			obp+=sizeof(long);
+
+			//push dword ptr[ecx+offset]
+			OpBuffer[obp++]=(char)0xFF;
+			OpBuffer[obp++]=(char)0xB1;
+			*((long *)(OpBuffer+obp))=pRelativeVar->offset;
+			pobj_GlobalVarSchedule->add();
+			obp+=sizeof(long);
+		}
+		else{
+			//push dword ptr[offset+sizeof(long)]
+			OpBuffer[obp++]=(char)0xFF;
+			OpBuffer[obp++]=(char)0x35;
+			*((long *)(OpBuffer+obp))=pRelativeVar->offset+sizeof(long);
+			pobj_GlobalVarSchedule->add();
+			obp+=sizeof(long);
+
+			//push dword ptr[offset]
+			OpBuffer[obp++]=(char)0xFF;
+			OpBuffer[obp++]=(char)0x35;
+			*((long *)(OpBuffer+obp))=pRelativeVar->offset;
+			pobj_GlobalVarSchedule->add();
+			obp+=sizeof(long);
+		}
+	}
+	else if(pRelativeVar->dwKind==VAR_REFGLOBAL){
+		SetError(300,NULL,cp);
+	}
+	else if(pRelativeVar->dwKind==VAR_LOCAL){
+		if(pRelativeVar->bOffsetOffset){
+			//add ecx,offset+sizeof(long)
+			OpBuffer[obp++]=(char)0x81;
+			OpBuffer[obp++]=(char)0xC1;
+			*((long *)(OpBuffer+obp))=pRelativeVar->offset+sizeof(long);
+			AddLocalVarAddrSchedule();
+			obp+=sizeof(long);
+
+			//push dword ptr[ebp+ecx]
+			OpBuffer[obp++]=(char)0xFF;
+			OpBuffer[obp++]=(char)0x74;
+			OpBuffer[obp++]=(char)0x0D;
+			OpBuffer[obp++]=(char)0x00;
+
+			//sub ecx,sizeof(long)
+			OpBuffer[obp++]=(char)0x83;
+			OpBuffer[obp++]=(char)0xE9;
+			OpBuffer[obp++]=(char)0x04;
+
+			//push dword ptr[ebp+ecx]
+			OpBuffer[obp++]=(char)0xFF;
+			OpBuffer[obp++]=(char)0x74;
+			OpBuffer[obp++]=(char)0x0D;
+			OpBuffer[obp++]=(char)0x00;
+		}
+		else{
+			//push dword ptr[ebp+offset+sizeof(long)]
+			OpBuffer[obp++]=(char)0xFF;
+			OpBuffer[obp++]=(char)0xB5;
+			*((long *)(OpBuffer+obp))=pRelativeVar->offset+sizeof(long);
+			AddLocalVarAddrSchedule();
+			obp+=sizeof(long);
+
+			//push dword ptr[ebp+offset]
+			OpBuffer[obp++]=(char)0xFF;
+			OpBuffer[obp++]=(char)0xB5;
+			*((long *)(OpBuffer+obp))=pRelativeVar->offset;
+			AddLocalVarAddrSchedule();
+			obp+=sizeof(long);
+		}
+	}
+	else if(pRelativeVar->dwKind==VAR_REFLOCAL){
+		//mov eax,dword ptr[ebp+offset]
+		OpBuffer[obp++]=(char)0x8B;
+		OpBuffer[obp++]=(char)0x85;
+		*((long *)(OpBuffer+obp))=pRelativeVar->offset;
+		AddLocalVarAddrSchedule();
+		obp+=sizeof(long);
+
+		if(pRelativeVar->bOffsetOffset){
+			//add eax,ecx
+			OpBuffer[obp++]=(char)0x03;
+			OpBuffer[obp++]=(char)0xC1;
+		}
+
+		//push dword ptr[eax+sizeof(long)]
+		OpBuffer[obp++]=(char)0xFF;
+		OpBuffer[obp++]=(char)0x70;
+		OpBuffer[obp++]=(char)0x04;
+
+		//push dword ptr[eax]
+		OpBuffer[obp++]=(char)0xFF;
+		OpBuffer[obp++]=(char)0x30;
+	}
+	else if(pRelativeVar->dwKind==VAR_DIRECTMEM){
+		//push dword ptr[ecx+sizeof(long)]
+		OpBuffer[obp++]=(char)0xFF;
+		OpBuffer[obp++]=(char)0xB1;
+		*((long *)(OpBuffer+obp))=sizeof(long);
+		obp+=sizeof(long);
+
+		//push dword ptr[ecx]
+		OpBuffer[obp++]=(char)0xFF;
+		OpBuffer[obp++]=(char)0x31;
+	}
+}
+void PushLongVariable(RELATIVE_VAR *pRelativeVar){
+	if(pRelativeVar->dwKind==VAR_GLOBAL){
+		if(pRelativeVar->bOffsetOffset){
+			//push dword ptr[ecx+offset]
+			OpBuffer[obp++]=(char)0xFF;
+			OpBuffer[obp++]=(char)0xB1;
+			*((long *)(OpBuffer+obp))=pRelativeVar->offset;
+			pobj_GlobalVarSchedule->add();
+			obp+=sizeof(long);
+		}
+		else{
+			//push dword ptr[offset]
+			OpBuffer[obp++]=(char)0xFF;
+			OpBuffer[obp++]=(char)0x35;
+			*((long *)(OpBuffer+obp))=pRelativeVar->offset;
+			pobj_GlobalVarSchedule->add();
+			obp+=sizeof(long);
+		}
+	}
+	else if(pRelativeVar->dwKind==VAR_REFGLOBAL){
+		//mov eax,dword ptr[offset]
+		op_mov_RM( sizeof(long), REG_EAX, REG_NON, (int)pRelativeVar->offset, MOD_DISP32 );
+		obp-=sizeof(long);
+		pobj_GlobalVarSchedule->add();
+		obp+=sizeof(long);
+
+		if(pRelativeVar->bOffsetOffset){
+			//add eax,ecx
+			OpBuffer[obp++]=(char)0x03;
+			OpBuffer[obp++]=(char)0xC1;
+		}
+
+		//push dword ptr[eax]
+		OpBuffer[obp++]=(char)0xFF;
+		OpBuffer[obp++]=(char)0x30;
+	}
+	else if(pRelativeVar->dwKind==VAR_LOCAL){
+		if(pRelativeVar->bOffsetOffset){
+			//add ecx,offset
+			OpBuffer[obp++]=(char)0x81;
+			OpBuffer[obp++]=(char)0xC1;
+			*((long *)(OpBuffer+obp))=pRelativeVar->offset;
+			AddLocalVarAddrSchedule();
+			obp+=sizeof(long);
+
+			//push dword ptr[ebp+ecx]
+			OpBuffer[obp++]=(char)0xFF;
+			OpBuffer[obp++]=(char)0x74;
+			OpBuffer[obp++]=(char)0x0D;
+			OpBuffer[obp++]=(char)0x00;
+		}
+		else{
+			//push dword ptr[ebp+offset]
+			OpBuffer[obp++]=(char)0xFF;
+			OpBuffer[obp++]=(char)0xB5;
+			*((long *)(OpBuffer+obp))=pRelativeVar->offset;
+			AddLocalVarAddrSchedule();
+			obp+=sizeof(long);
+		}
+	}
+	else if(pRelativeVar->dwKind==VAR_REFLOCAL){
+		//mov eax,dword ptr[ebp+offset]
+		OpBuffer[obp++]=(char)0x8B;
+		OpBuffer[obp++]=(char)0x85;
+		*((long *)(OpBuffer+obp))=pRelativeVar->offset;
+		AddLocalVarAddrSchedule();
+		obp+=sizeof(long);
+
+		if(pRelativeVar->bOffsetOffset){
+			//add eax,ecx
+			OpBuffer[obp++]=(char)0x03;
+			OpBuffer[obp++]=(char)0xC1;
+		}
+
+		//push dword ptr[eax]
+		OpBuffer[obp++]=(char)0xFF;
+		OpBuffer[obp++]=(char)0x30;
+	}
+	else if(pRelativeVar->dwKind==VAR_DIRECTMEM){
+		//push dword ptr[ecx]
+		OpBuffer[obp++]=(char)0xFF;
+		OpBuffer[obp++]=(char)0x31;
+	}
+}
+void PushIntegerVariable(RELATIVE_VAR *pRelativeVar){
+	if(pRelativeVar->dwKind==VAR_GLOBAL){
+		if(pRelativeVar->bOffsetOffset){
+			//movsx eax,word ptr[ecx+offset]
+			OpBuffer[obp++]=(char)0x0F;
+			OpBuffer[obp++]=(char)0xBF;
+			OpBuffer[obp++]=(char)0x81;
+			*((long *)(OpBuffer+obp))=pRelativeVar->offset;
+			pobj_GlobalVarSchedule->add();
+			obp+=sizeof(long);
+		}
+		else{
+			//movsx eax,word ptr[offset]
+			OpBuffer[obp++]=(char)0x0F;
+			OpBuffer[obp++]=(char)0xBF;
+			OpBuffer[obp++]=(char)0x05;
+			*((long *)(OpBuffer+obp))=pRelativeVar->offset;
+			pobj_GlobalVarSchedule->add();
+			obp+=sizeof(long);
+		}
+	}
+	else if(pRelativeVar->dwKind==VAR_REFGLOBAL){
+		//mov ebx,dword ptr[offset]
+		op_mov_RM( sizeof(long), REG_EBX, REG_NON, (int)pRelativeVar->offset, MOD_DISP32 );
+		obp-=sizeof(long);
+		pobj_GlobalVarSchedule->add();
+		obp+=sizeof(long);
+
+		if(pRelativeVar->bOffsetOffset){
+			//add ebx,ecx
+			OpBuffer[obp++]=(char)0x03;
+			OpBuffer[obp++]=(char)0xD9;
+		}
+
+		//movsx eax,word ptr[ebx]
+		OpBuffer[obp++]=(char)0x0F;
+		OpBuffer[obp++]=(char)0xBF;
+		OpBuffer[obp++]=(char)0x03;
+	}
+	else if(pRelativeVar->dwKind==VAR_LOCAL){
+		if(pRelativeVar->bOffsetOffset){
+			//add ecx,offset
+			OpBuffer[obp++]=(char)0x81;
+			OpBuffer[obp++]=(char)0xC1;
+			*((long *)(OpBuffer+obp))=pRelativeVar->offset;
+			AddLocalVarAddrSchedule();
+			obp+=sizeof(long);
+
+			//movsx eax,word ptr[ebp+ecx]
+			OpBuffer[obp++]=(char)0x0F;
+			OpBuffer[obp++]=(char)0xBF;
+			OpBuffer[obp++]=(char)0x44;
+			OpBuffer[obp++]=(char)0x0D;
+			OpBuffer[obp++]=(char)0x00;
+		}
+		else{
+			//movsx eax,word ptr[ebp+offset]
+			OpBuffer[obp++]=(char)0x0F;
+			OpBuffer[obp++]=(char)0xBF;
+			OpBuffer[obp++]=(char)0x85;
+			*((long *)(OpBuffer+obp))=pRelativeVar->offset;
+			AddLocalVarAddrSchedule();
+			obp+=sizeof(long);
+		}
+	}
+	else if(pRelativeVar->dwKind==VAR_REFLOCAL){
+		//mov ebx,dword ptr[ebp+offset]
+		OpBuffer[obp++]=(char)0x8B;
+		OpBuffer[obp++]=(char)0x9D;
+		*((long *)(OpBuffer+obp))=pRelativeVar->offset;
+		AddLocalVarAddrSchedule();
+		obp+=sizeof(long);
+
+		if(pRelativeVar->bOffsetOffset){
+			//add ebx,ecx
+			OpBuffer[obp++]=(char)0x03;
+			OpBuffer[obp++]=(char)0xD9;
+		}
+
+		//movsx eax,word ptr[ebx]
+		OpBuffer[obp++]=(char)0x0F;
+		OpBuffer[obp++]=(char)0xBF;
+		OpBuffer[obp++]=(char)0x03;
+	}
+	else if(pRelativeVar->dwKind==VAR_DIRECTMEM){
+		//movsx eax,word ptr[ecx]
+		OpBuffer[obp++]=(char)0x0F;
+		OpBuffer[obp++]=(char)0xBF;
+		OpBuffer[obp++]=(char)0x01;
+	}
+
+	//push eax
+	op_push(REG_EAX);
+}
+void PushWordVariable(RELATIVE_VAR *pRelativeVar){
+	//xor eax,eax（eaxを0に初期化する）
+	op_zero_reg(REG_EAX);
+
+	if(pRelativeVar->dwKind==VAR_GLOBAL){
+		if(pRelativeVar->bOffsetOffset){
+			//mov ax,word ptr[ecx+offset]
+			OpBuffer[obp++]=(char)0x66;
+			OpBuffer[obp++]=(char)0x8B;
+			OpBuffer[obp++]=(char)0x81;
+			*((long *)(OpBuffer+obp))=pRelativeVar->offset;
+			pobj_GlobalVarSchedule->add();
+			obp+=sizeof(long);
+		}
+		else{
+			//mov ax,word ptr[offset]
+			OpBuffer[obp++]=(char)0x66;
+			OpBuffer[obp++]=(char)0xA1;
+			*((long *)(OpBuffer+obp))=pRelativeVar->offset;
+			pobj_GlobalVarSchedule->add();
+			obp+=sizeof(long);
+		}
+	}
+	else if(pRelativeVar->dwKind==VAR_REFGLOBAL){
+		//mov ebx,dword ptr[offset]
+		op_mov_RM( sizeof(long), REG_EBX, REG_NON, (int)pRelativeVar->offset, MOD_DISP32 );
+		obp-=sizeof(long);
+		pobj_GlobalVarSchedule->add();
+		obp+=sizeof(long);
+
+		if(pRelativeVar->bOffsetOffset){
+			//add ebx,ecx
+			OpBuffer[obp++]=(char)0x03;
+			OpBuffer[obp++]=(char)0xD9;
+		}
+
+		//mov ax,word ptr[ebx]
+		OpBuffer[obp++]=(char)0x66;
+		OpBuffer[obp++]=(char)0x8B;
+		OpBuffer[obp++]=(char)0x03;
+	}
+	else if(pRelativeVar->dwKind==VAR_LOCAL){
+		if(pRelativeVar->bOffsetOffset){
+			//add ecx,offset
+			OpBuffer[obp++]=(char)0x81;
+			OpBuffer[obp++]=(char)0xC1;
+			*((long *)(OpBuffer+obp))=pRelativeVar->offset;
+			AddLocalVarAddrSchedule();
+			obp+=sizeof(long);
+
+			//mov ax,word ptr[ebp+ecx]
+			OpBuffer[obp++]=(char)0x66;
+			OpBuffer[obp++]=(char)0x8B;
+			OpBuffer[obp++]=(char)0x44;
+			OpBuffer[obp++]=(char)0x0D;
+			OpBuffer[obp++]=(char)0x00;
+		}
+		else{
+			//mov ax,word ptr[ebp+offset]
+			OpBuffer[obp++]=(char)0x66;
+			OpBuffer[obp++]=(char)0x8B;
+			OpBuffer[obp++]=(char)0x85;
+			*((long *)(OpBuffer+obp))=pRelativeVar->offset;
+			AddLocalVarAddrSchedule();
+			obp+=sizeof(long);
+		}
+	}
+	else if(pRelativeVar->dwKind==VAR_REFLOCAL){
+		//mov ebx,dword ptr[ebp+offset]
+		OpBuffer[obp++]=(char)0x8B;
+		OpBuffer[obp++]=(char)0x9D;
+		*((long *)(OpBuffer+obp))=pRelativeVar->offset;
+		AddLocalVarAddrSchedule();
+		obp+=sizeof(long);
+
+		if(pRelativeVar->bOffsetOffset){
+			//add ebx,ecx
+			OpBuffer[obp++]=(char)0x03;
+			OpBuffer[obp++]=(char)0xD9;
+		}
+
+		//mov ax,word ptr[ebx]
+		OpBuffer[obp++]=(char)0x66;
+		OpBuffer[obp++]=(char)0x8B;
+		OpBuffer[obp++]=(char)0x03;
+	}
+	else if(pRelativeVar->dwKind==VAR_DIRECTMEM){
+		//mov ax,word ptr[ecx]
+		OpBuffer[obp++]=(char)0x66;
+		OpBuffer[obp++]=(char)0x8B;
+		OpBuffer[obp++]=(char)0x01;
+	}
+
+	//push eax
+	op_push(REG_EAX);
+}
+void PushCharVariable(RELATIVE_VAR *pRelativeVar){
+	if(pRelativeVar->dwKind==VAR_GLOBAL){
+		if(pRelativeVar->bOffsetOffset){
+			//movsx eax,byte ptr[ecx+offset]
+			OpBuffer[obp++]=(char)0x0F;
+			OpBuffer[obp++]=(char)0xBE;
+			OpBuffer[obp++]=(char)0x81;
+			*((long *)(OpBuffer+obp))=pRelativeVar->offset;
+			pobj_GlobalVarSchedule->add();
+			obp+=sizeof(long);
+		}
+		else{
+			//movsx eax,byte ptr[offset]
+			OpBuffer[obp++]=(char)0x0F;
+			OpBuffer[obp++]=(char)0xBE;
+			OpBuffer[obp++]=(char)0x05;
+			*((long *)(OpBuffer+obp))=pRelativeVar->offset;
+			pobj_GlobalVarSchedule->add();
+			obp+=sizeof(long);
+		}
+	}
+	else if(pRelativeVar->dwKind==VAR_REFGLOBAL){
+		//mov ebx,dword ptr[offset]
+		op_mov_RM( sizeof(long), REG_EBX, REG_NON, (int)pRelativeVar->offset, MOD_DISP32 );
+		obp-=sizeof(long);
+		pobj_GlobalVarSchedule->add();
+		obp+=sizeof(long);
+
+		if(pRelativeVar->bOffsetOffset){
+			//add ebx,ecx
+			OpBuffer[obp++]=(char)0x03;
+			OpBuffer[obp++]=(char)0xD9;
+		}
+
+		//movsx eax,byte ptr[ebx]
+		OpBuffer[obp++]=(char)0x0F;
+		OpBuffer[obp++]=(char)0xBE;
+		OpBuffer[obp++]=(char)0x03;
+	}
+	else if(pRelativeVar->dwKind==VAR_LOCAL){
+		if(pRelativeVar->bOffsetOffset){
+			//add ecx,offset
+			OpBuffer[obp++]=(char)0x81;
+			OpBuffer[obp++]=(char)0xC1;
+			*((long *)(OpBuffer+obp))=pRelativeVar->offset;
+			AddLocalVarAddrSchedule();
+			obp+=sizeof(long);
+
+			//movsx eax,byte ptr[ebp+ecx]
+			OpBuffer[obp++]=(char)0x0F;
+			OpBuffer[obp++]=(char)0xBE;
+			OpBuffer[obp++]=(char)0x44;
+			OpBuffer[obp++]=(char)0x0D;
+			OpBuffer[obp++]=(char)0x00;
+		}
+		else{
+			//movsx eax,byte ptr[ebp+offset]
+			OpBuffer[obp++]=(char)0x0F;
+			OpBuffer[obp++]=(char)0xBE;
+			OpBuffer[obp++]=(char)0x85;
+			*((long *)(OpBuffer+obp))=pRelativeVar->offset;
+			AddLocalVarAddrSchedule();
+			obp+=sizeof(long);
+		}
+	}
+	else if(pRelativeVar->dwKind==VAR_REFLOCAL){
+		//mov ebx,dword ptr[ebp+offset]
+		OpBuffer[obp++]=(char)0x8B;
+		OpBuffer[obp++]=(char)0x9D;
+		*((long *)(OpBuffer+obp))=pRelativeVar->offset;
+		AddLocalVarAddrSchedule();
+		obp+=sizeof(long);
+
+		if(pRelativeVar->bOffsetOffset){
+			//add ebx,ecx
+			OpBuffer[obp++]=(char)0x03;
+			OpBuffer[obp++]=(char)0xD9;
+		}
+
+		//movsx eax,byte ptr[ebx]
+		OpBuffer[obp++]=(char)0x0F;
+		OpBuffer[obp++]=(char)0xBE;
+		OpBuffer[obp++]=(char)0x03;
+	}
+	else if(pRelativeVar->dwKind==VAR_DIRECTMEM){
+		//movsx eax,byte ptr[ecx]
+		OpBuffer[obp++]=(char)0x0F;
+		OpBuffer[obp++]=(char)0xBE;
+		OpBuffer[obp++]=(char)0x01;
+	}
+
+	//push eax
+	op_push(REG_EAX);
+}
+void PushByteVariable(RELATIVE_VAR *pRelativeVar){
+	//xor eax,eax（eaxを0に初期化する）
+	op_zero_reg(REG_EAX);
+
+	if(pRelativeVar->dwKind==VAR_GLOBAL){
+		if(pRelativeVar->bOffsetOffset){
+			//mov al,byte ptr[ecx+offset]
+			OpBuffer[obp++]=(char)0x8A;
+			OpBuffer[obp++]=(char)0x81;
+			*((long *)(OpBuffer+obp))=pRelativeVar->offset;
+			pobj_GlobalVarSchedule->add();
+			obp+=sizeof(long);
+		}
+		else{
+			//mov al,byte ptr[offset]
+			OpBuffer[obp++]=(char)0xA0;
+			*((long *)(OpBuffer+obp))=pRelativeVar->offset;
+			pobj_GlobalVarSchedule->add();
+			obp+=sizeof(long);
+		}
+	}
+	else if(pRelativeVar->dwKind==VAR_REFGLOBAL){
+		//mov ebx,dword ptr[offset]
+		op_mov_RM( sizeof(long), REG_EBX, REG_NON, (int)pRelativeVar->offset, MOD_DISP32 );
+		obp-=sizeof(long);
+		pobj_GlobalVarSchedule->add();
+		obp+=sizeof(long);
+
+		if(pRelativeVar->bOffsetOffset){
+			//add ebx,ecx
+			OpBuffer[obp++]=(char)0x03;
+			OpBuffer[obp++]=(char)0xD9;
+		}
+
+		//mov al,byte ptr[ebx]
+		OpBuffer[obp++]=(char)0x8A;
+		OpBuffer[obp++]=(char)0x03;
+	}
+	else if(pRelativeVar->dwKind==VAR_LOCAL){
+		if(pRelativeVar->bOffsetOffset){
+			//add ecx,offset
+			OpBuffer[obp++]=(char)0x81;
+			OpBuffer[obp++]=(char)0xC1;
+			*((long *)(OpBuffer+obp))=pRelativeVar->offset;
+			AddLocalVarAddrSchedule();
+			obp+=sizeof(long);
+
+			//mov al,byte ptr[ebp+ecx]
+			OpBuffer[obp++]=(char)0x8A;
+			OpBuffer[obp++]=(char)0x44;
+			OpBuffer[obp++]=(char)0x0D;
+			OpBuffer[obp++]=(char)0x00;
+		}
+		else{
+			//mov al,byte ptr[ebp+offset]
+			OpBuffer[obp++]=(char)0x8A;
+			OpBuffer[obp++]=(char)0x85;
+			*((long *)(OpBuffer+obp))=pRelativeVar->offset;
+			AddLocalVarAddrSchedule();
+			obp+=sizeof(long);
+		}
+	}
+	else if(pRelativeVar->dwKind==VAR_REFLOCAL){
+		//mov ebx,dword ptr[ebp+offset]
+		OpBuffer[obp++]=(char)0x8B;
+		OpBuffer[obp++]=(char)0x9D;
+		*((long *)(OpBuffer+obp))=pRelativeVar->offset;
+		AddLocalVarAddrSchedule();
+		obp+=sizeof(long);
+
+		if(pRelativeVar->bOffsetOffset){
+			//add ebx,ecx
+			OpBuffer[obp++]=(char)0x03;
+			OpBuffer[obp++]=(char)0xD9;
+		}
+
+		//mov al,byte ptr[ebx]
+		OpBuffer[obp++]=(char)0x8A;
+		OpBuffer[obp++]=(char)0x03;
+	}
+	else if(pRelativeVar->dwKind==VAR_DIRECTMEM){
+		//mov al,byte ptr[ecx]
+		OpBuffer[obp++]=(char)0x8A;
+		OpBuffer[obp++]=(char)0x01;
+	}
+
+	//push eax
+	op_push(REG_EAX);
+}
Index: /trunk/abdev/BasicCompiler32/Compile_CallProc.cpp
===================================================================
--- /trunk/abdev/BasicCompiler32/Compile_CallProc.cpp	(revision 148)
+++ /trunk/abdev/BasicCompiler32/Compile_CallProc.cpp	(revision 148)
@@ -0,0 +1,414 @@
+#include "../BasicCompiler_Common/common.h"
+#include "Opcode.h"
+
+//ローカル変数アドレススケジュール
+DWORD *pLocalVarAddrSchedule;
+int LocalVarAddrScheduleNum;
+
+void Call_DebugSys_SaveContext(){
+	//call _System_GetEip
+	extern UserProc *pSub_System_GetEip;
+	op_call(pSub_System_GetEip);
+
+	//push eax
+	op_push(REG_EAX);
+
+	//push ebp
+	op_push(REG_EBP);
+
+	//call _DebugSys_SaveContext
+	extern UserProc *pSub_DebugSys_SaveContext;
+	op_call(pSub_DebugSys_SaveContext);
+}
+
+void AddLocalVarAddrSchedule(){
+	extern HANDLE hHeap;
+
+	//ローカル変数アドレススケジュールに追加する
+	pLocalVarAddrSchedule=(DWORD *)HeapReAlloc(hHeap,0,pLocalVarAddrSchedule,(LocalVarAddrScheduleNum+1)*sizeof(DWORD));
+	pLocalVarAddrSchedule[LocalVarAddrScheduleNum]=obp;
+	LocalVarAddrScheduleNum++;
+}
+
+
+bool Opcode_CallProcPtr( const char *variable, const char *lpszParms,ProcPointer *pProcPointer){
+
+	extern BOOL bDebugCompile;
+	extern BOOL bDebugSupportProc;
+	if(bDebugCompile&&bDebugSupportProc==0)
+		Call_DebugSys_SaveContext();
+
+
+	////////////////////////
+	// パラメータのセット
+	////////////////////////
+
+	//パラメータオブジェクトを生成
+	ParamImpl *pobj_parameter=0;
+	pobj_parameter=new ParamImpl(lpszParms);
+
+	// デフォルト引数を適用
+	pobj_parameter->ApplyDefaultParameters( pProcPointer->Params() );
+
+	//エラーチェック
+	if( !pobj_parameter->ErrorCheck(variable,pProcPointer->Params() ) ){
+		//パラメータにエラーがあるときは処理を終える
+		return false;
+	}
+
+	//一時オブジェクトを生成
+	pobj_parameter->NewTempParameters( variable,pProcPointer->Params() );
+
+	//レジスタ、スタックフレームにセット
+	pobj_parameter->SetParameter(variable,pProcPointer->Params() );
+
+
+
+	////////////////////////
+	// call
+	////////////////////////
+	RELATIVE_VAR RelativeVar;
+	GetVarOffsetReadOnly(variable,&RelativeVar,Type());
+	SetVarPtrToEax(&RelativeVar);
+
+	//mov eax,dword ptr[eax]
+	OpBuffer[obp++]=(char)0x8B;
+	OpBuffer[obp++]=(char)0x00;
+
+	//call eax
+	OpBuffer[obp++]=(char)0xFF;
+	OpBuffer[obp++]=(char)0xD0;
+
+
+
+	//一時オブジェクトを破棄
+	pobj_parameter->DeleteTempParameters();
+
+	//パラメータオブジェクトを破棄
+	delete pobj_parameter;
+
+	return true;
+}
+
+bool Opcode_CallProc(const char *Parameter,UserProc *pUserProc,DWORD dwFlags,const char *ObjectName,int RefType){
+	int i2;
+
+	if( pUserProc->IsMacro() ){
+		if( lstrcmpi( pUserProc->GetName().c_str(), "Print" ) == 0 ){
+			Opcode_Print(Parameter,0);
+			return true;
+		}
+		if( lstrcmpi( pUserProc->GetName().c_str(), "Input" ) == 0 ){
+			Opcode_Input(Parameter);
+			return true;
+		}
+		if( lstrcmpi( pUserProc->GetName().c_str(), "Write" ) == 0 ){
+			Opcode_Print(Parameter,1);
+			return true;
+		}
+	}
+
+	pUserProc->Using();
+
+	bool isStatic = false;
+	const CClass *pobj_c = NULL;
+	const CMethod *pMethod = NULL;
+	if( pUserProc->GetParentClassPtr() ){
+		//クラスのメンバ関数を呼び出す場合はアクセスチェックを行う
+		if(ObjectName[0] && (dwFlags&PROCFLAG_NEW)==0){
+			if(lstrcmpi(ObjectName,"Super")==0){
+				//クラスメンバ関数内から基底クラスの呼び出し
+				pobj_c=pobj_CompilingClass;
+			}
+			else{
+				//"->"によってオブジェクトを指定する通常のメンバ関数呼び出し
+				Type varType;
+				GetVarType( ObjectName, varType, false );
+				pobj_c = &varType.GetClass();
+				if( NATURAL_TYPE( varType.GetBasicType() ) != DEF_OBJECT ){
+					pobj_c=pobj_DBClass->Find(ObjectName);
+					if( pobj_c ){
+						isStatic = true;
+					}
+					else{
+						SetError(300,NULL,cp);
+					}
+				}
+			}
+		}
+		else{
+			if(dwFlags&PROCFLAG_NEW){
+				//New演算子によるコンストラクタ呼び出し
+				pobj_c=pUserProc->GetParentClassPtr();
+			}
+			else{
+				//クラスメンバ関数内から同一クラスのメンバ関数の呼び出し
+				pobj_c=pobj_CompilingClass;
+			}
+		}
+
+
+		/////////////////////////////////
+		// メソッド情報を取得
+		/////////////////////////////////
+		pMethod = NULL;
+		if( ! isStatic ) pMethod = pobj_c->GetMethods().GetMethodPtr( pUserProc );
+		if( ! pMethod ){
+			//動的メソッドが取得できなかったときは静的メソッドを当たる
+			pMethod = pobj_c->GetStaticMethods().GetMethodPtr( pUserProc );
+			if( !pMethod ){
+				SetError(300,NULL,cp);
+				return false;
+			}
+
+			//静的メンバ
+			isStatic = true;
+		}
+
+
+		//////////////////////////////
+		// アクセスエラーチェック
+		//////////////////////////////
+
+		if(ObjectName[0]){
+			//外部からの呼び出し
+			if(pobj_c==pobj_CompilingClass){
+				//同一クラスオブジェクトの場合はプライベートアクセスを容認する
+				if( pMethod->IsNoneAccess() ){
+					SetError(109,pUserProc->GetName(),cp);
+					return false;
+				}
+			}
+			else{
+				if( pMethod->IsPrivate()
+					|| pMethod->IsNoneAccess() ){
+					SetError(109,pUserProc->GetName(),cp);
+					return false;
+				}
+				if( pMethod->IsProtected() ){
+					SetError(110,pUserProc->GetName(),cp);
+					return false;
+				}
+			}
+		}
+		else{
+			//クラス内部からの呼び出し（継承によるACCESS_NONのみをエラーとする）
+			if( pMethod->IsNoneAccess() ){
+				SetError(109,pUserProc->GetName(),cp);
+				return false;
+			}
+		}
+	}
+
+
+	///////////////////////////////////////////////////////////////
+	// _System_LocalThisのダミーをセット
+	///////////////////////////////////////////////////////////////
+
+	char temporary[VN_SIZE]={0};
+	if( pUserProc->GetParentClassPtr() && isStatic == false ){
+		//_System_LocalThis（第一パラメータ）のダミーを作成
+		lstrcpy(temporary,"0,");
+	}
+
+	if(Parameter[0]=='\0'&&temporary[0])
+		temporary[lstrlen(temporary)-1]=0;
+	else lstrcat(temporary,Parameter);
+
+
+	////////////////////////
+	// パラメータをセット
+	////////////////////////
+
+	//パラメータオブジェクトを生成
+	ParamImpl *pobj_parameter=0;
+	pobj_parameter=new ParamImpl(temporary);
+
+	// デフォルト引数を適用
+	pobj_parameter->ApplyDefaultParameters( pUserProc->RealParams() );
+
+	//エラーチェック
+	if( !pobj_parameter->ErrorCheck(pUserProc->GetName(),pUserProc->RealParams(),pUserProc->GetSecondParmNum() ) ){
+		//パラメータにエラーがあるときは処理を終える
+		return false;
+	}
+
+	if(pUserProc->IsMacro()){
+		//マクロ関数の場合は、パラメータ省略を考慮する
+		pobj_parameter->MacroParameterSupport( pUserProc->RealParams() );
+	}
+
+	//一時オブジェクトを生成
+	int tempSize = pobj_parameter->NewTempParameters( pUserProc->GetName(),pUserProc->RealParams(),pUserProc->GetRealSecondParmNum() );
+
+	//レジスタ、スタックフレームにセット
+	int ParmSize = pobj_parameter->SetParameter(pUserProc->GetName(),pUserProc->RealParams(),pUserProc->GetRealSecondParmNum() );
+
+	if(pUserProc->ReturnType().IsStruct() ){
+		//////////////////////////////////////////////////////
+		// 戻り値に構造体インスタンスを持つ場合
+		// ※ByRef _System_ReturnValue パラメータをセット
+		//////////////////////////////////////////////////////
+
+		int object_size = pUserProc->ReturnType().GetClass().GetSize();
+
+		//push object_size
+		op_push_V(object_size);
+
+		//call calloc
+		extern UserProc *pSub_calloc;
+		op_call(pSub_calloc);
+
+		//push eax
+		op_push(REG_EAX);
+	}
+
+
+	if( pUserProc->GetParentClassPtr() && isStatic == false ){
+		//////////////////////////////////////////////////////
+		// メンバ関数の場合
+		// ※_System_LocalThis パラメータをセット
+		//////////////////////////////////////////////////////
+
+		if(ObjectName[0] && (dwFlags&PROCFLAG_NEW)==0){
+			if(lstrcmpi(ObjectName,"Super")==0) goto InClassMember;
+			else{
+				RELATIVE_VAR RelativeVar;
+				if( pMethod->IsConst() ){
+					//Constアクセスが可能なメソッドの場合
+					if( !GetVarOffsetReadOnly( ObjectName, &RelativeVar, Type() ) ){
+						return false;
+					}
+				}
+				else{
+					//Constアクセスが不可能なメソッドの場合
+					if( !GetVarOffsetReadWrite( ObjectName, &RelativeVar, Type() ) ){
+						return false;
+					}
+				}
+
+				SetVarPtrToEax(&RelativeVar);
+
+				// 参照を実体ポインタにする
+				op_mov_RM( sizeof(long), REG_ECX, REG_EAX, 0, MOD_BASE );
+			}
+		}
+		else{
+InClassMember:
+			if(dwFlags&PROCFLAG_NEW){
+				//New演算子によるコンストラクタ呼び出しの場合
+
+				//mov ecx,dword ptr[esp+ParmSize]
+				op_mov_RM( sizeof(long), REG_ECX, REG_ESP, ParmSize + tempSize, MOD_BASE_DISP32 );
+			}
+			else{
+				//Thisポインタをecxにコピー
+				SetThisPtrToReg(REG_ECX);
+			}
+		}
+
+		//push ecx
+		op_push(REG_ECX);
+	}
+
+	if( pUserProc->IsVirtual() ){
+		//仮想関数（オブジェクトメソッド）呼び出し
+		//pObj->func_table->func1
+		//                ->func2
+		//                ->func3
+
+		//mov edx,dword ptr[ecx]
+		OpBuffer[obp++]=(char)0x8B;
+		OpBuffer[obp++]=(char)0x11;
+
+		i2 = pobj_c->GetFuncNumInVtbl( pUserProc );
+
+		//call dword ptr[edx+func_index]
+		if(i2*PTR_SIZE<=0x7F){
+			OpBuffer[obp++]=(char)0xFF;
+			OpBuffer[obp++]=(char)0x52;
+			OpBuffer[obp++]=(char)(i2*PTR_SIZE);
+		}
+		else{
+			OpBuffer[obp++]=(char)0xFF;
+			OpBuffer[obp++]=(char)0x92;
+			*((long *)(OpBuffer+obp))=i2*PTR_SIZE;
+			obp+=sizeof(long);
+		}
+	}
+	else{
+		//通常呼び出し
+
+		//call ProcAddr
+		op_call(pUserProc);
+	}
+
+	if(pUserProc->IsCdecl()){
+		//add esp,ParmSize
+		op_add_esp(ParmSize);
+	}
+
+	//一時オブジェクトを破棄
+	pobj_parameter->DeleteTempParameters();
+
+	//パラメータオブジェクトを破棄
+	delete pobj_parameter;
+
+	return true;
+}
+
+bool Opcode_CallDllProc( const char *lpszParms, DllProc *pDllProc ){
+
+	extern BOOL bDebugCompile;
+	extern BOOL bDebugSupportProc;
+	if(bDebugCompile&&bDebugSupportProc==0&& pDllProc->IsEqualSymbol( "DebugBreak" ) ){
+		Call_DebugSys_SaveContext();
+	}
+
+
+	////////////////////////
+	// パラメータのセット
+	////////////////////////
+
+	//パラメータオブジェクトを生成
+	ParamImpl *pobj_parameter=0;
+	pobj_parameter=new ParamImpl(lpszParms);
+
+	// デフォルト引数を適用
+	pobj_parameter->ApplyDefaultParameters( pDllProc->Params() );
+
+	//エラーチェック
+	if( !pobj_parameter->ErrorCheck( pDllProc->GetName(), pDllProc->Params() ) ){
+		//パラメータにエラーがあるときは処理を終える
+		return false;
+	}
+
+	//一時オブジェクトを生成
+	pobj_parameter->NewTempParameters( pDllProc->GetName(), pDllProc->Params() );
+
+	//レジスタ、スタックフレームにセット
+	int ParmSize = pobj_parameter->SetParameter(pDllProc->GetName(), pDllProc->Params() );
+
+
+	//動的リンクされたプロシージャの呼び出し
+
+	//call dword ptr[LookupTable]
+	pDllProc->Using();
+	OpBuffer[obp++]=(char)0xFF;
+	OpBuffer[obp++]=(char)0x15;
+	pobj_ImportAddrSchedule->add(pDllProc);
+	obp+=sizeof(long);
+
+	if(pDllProc->IsCdecl()){
+		//add esp,ParmSize
+		op_add_esp(ParmSize);
+	}
+
+	//一時オブジェクトを破棄
+	pobj_parameter->DeleteTempParameters();
+
+	//パラメータオブジェクトを破棄
+	delete pobj_parameter;
+
+	return true;
+}
Index: /trunk/abdev/BasicCompiler32/Compile_Func.cpp
===================================================================
--- /trunk/abdev/BasicCompiler32/Compile_Func.cpp	(revision 148)
+++ /trunk/abdev/BasicCompiler32/Compile_Func.cpp	(revision 148)
@@ -0,0 +1,520 @@
+#include "../BasicCompiler_Common/common.h"
+#include "Opcode.h"
+
+int GetFunctionFromName(char *FuncName){
+	if(lstrcmpi(FuncName,"CUDbl")==0)		return FUNC_CUDBL;
+	if(lstrcmpi(FuncName,"Fix")==0)			return FUNC_FIX;
+	if(lstrcmpi(FuncName,"Len")==0)			return FUNC_LEN;
+	if(lstrcmpi(FuncName,"AddressOf")==0)	return FUNC_ADDRESSOF;
+	if(lstrcmpi(FuncName,"SizeOf")==0)		return FUNC_SIZEOF;
+	if(lstrcmpi(FuncName,"VarPtr")==0)		return FUNC_VARPTR;
+	if(lstrcmpi(FuncName,"ObjPtr")==0)		return FUNC_OBJPTR;
+	if(lstrcmpi(FuncName,"GetDouble")==0)	return FUNC_GETDOUBLE;
+	if(lstrcmpi(FuncName,"GetSingle")==0)	return FUNC_GETSINGLE;
+	if(lstrcmpi(FuncName,"GetQWord")==0)	return FUNC_GETQWORD;
+	if(lstrcmpi(FuncName,"GetDWord")==0)	return FUNC_GETDWORD;
+	if(lstrcmpi(FuncName,"GetWord")==0)		return FUNC_GETWORD;
+	if(lstrcmpi(FuncName,"GetByte")==0)		return FUNC_GETBYTE;
+	return 0;
+}
+
+void Opcode_Func_Fix(const char *lpszParms){
+	Type resultType;
+	if( !NumOpe( lpszParms, Type(), resultType ) ){
+		return;
+	}
+
+	if( resultType.IsDouble() ){
+		//fld qword ptr[esp]
+		op_fld_ptr_esp(DEF_DOUBLE);
+
+		//fnstcw word ptr[esp]
+		OpBuffer[obp++]=(char)0xD9;
+		OpBuffer[obp++]=(char)0x3C;
+		OpBuffer[obp++]=(char)0x24;
+
+		//mov ax,word ptr[esp]
+		OpBuffer[obp++]=(char)0x66;
+		OpBuffer[obp++]=(char)0x8B;
+		OpBuffer[obp++]=(char)0x04;
+		OpBuffer[obp++]=(char)0x24;
+
+		//or ah,0Ch
+		OpBuffer[obp++]=(char)0x80;
+		OpBuffer[obp++]=(char)0xCC;
+		OpBuffer[obp++]=(char)0x0C;
+
+		//mov word ptr[esp-2],ax
+		OpBuffer[obp++]=(char)0x66;
+		OpBuffer[obp++]=(char)0x89;
+		OpBuffer[obp++]=(char)0x44;
+		OpBuffer[obp++]=(char)0x24;
+		OpBuffer[obp++]=(char)0xFE;
+
+		//fldcw word ptr[esp-2]
+		OpBuffer[obp++]=(char)0xD9;
+		OpBuffer[obp++]=(char)0x6C;
+		OpBuffer[obp++]=(char)0x24;
+		OpBuffer[obp++]=(char)0xFE;
+
+		//fistp dword ptr[esp+4]
+		OpBuffer[obp++]=(char)0xDB;
+		OpBuffer[obp++]=(char)0x5C;
+		OpBuffer[obp++]=(char)0x24;
+		OpBuffer[obp++]=(char)0x04;
+
+		//fldcw word ptr[esp]
+		OpBuffer[obp++]=(char)0xD9;
+		OpBuffer[obp++]=(char)0x2C;
+		OpBuffer[obp++]=(char)0x24;
+
+		//add esp,4
+		op_add_esp(4);
+	}
+	else if( resultType.IsSingle() ){
+		//fld dword ptr[esp]
+		op_fld_ptr_esp(DEF_SINGLE);
+
+		//sub esp,4
+		op_sub_esp(4);
+
+		//fnstcw word ptr[esp]
+		OpBuffer[obp++]=(char)0xD9;
+		OpBuffer[obp++]=(char)0x3C;
+		OpBuffer[obp++]=(char)0x24;
+
+		//mov ax,word ptr[esp]
+		OpBuffer[obp++]=(char)0x66;
+		OpBuffer[obp++]=(char)0x8B;
+		OpBuffer[obp++]=(char)0x04;
+		OpBuffer[obp++]=(char)0x24;
+
+		//or ah,0Ch
+		OpBuffer[obp++]=(char)0x80;
+		OpBuffer[obp++]=(char)0xCC;
+		OpBuffer[obp++]=(char)0x0C;
+
+		//mov word ptr[esp-2],ax
+		OpBuffer[obp++]=(char)0x66;
+		OpBuffer[obp++]=(char)0x89;
+		OpBuffer[obp++]=(char)0x44;
+		OpBuffer[obp++]=(char)0x24;
+		OpBuffer[obp++]=(char)0xFE;
+
+		//fldcw word ptr[esp-2]
+		OpBuffer[obp++]=(char)0xD9;
+		OpBuffer[obp++]=(char)0x6C;
+		OpBuffer[obp++]=(char)0x24;
+		OpBuffer[obp++]=(char)0xFE;
+
+		//fistp dword ptr[esp+4]
+		OpBuffer[obp++]=(char)0xDB;
+		OpBuffer[obp++]=(char)0x5C;
+		OpBuffer[obp++]=(char)0x24;
+		OpBuffer[obp++]=(char)0x04;
+
+		//fldcw word ptr[esp]
+		OpBuffer[obp++]=(char)0xD9;
+		OpBuffer[obp++]=(char)0x2C;
+		OpBuffer[obp++]=(char)0x24;
+
+		//add esp,4
+		op_add_esp(4);
+	}
+	else if( resultType.Is64() ){
+		//pop eax
+		op_pop(REG_EAX);
+
+		//add esp,4
+		op_add_esp(4);
+
+		//push eax
+		op_push(REG_EAX);
+	}
+
+	//pop eax
+	op_pop(REG_EAX);
+}
+
+void Opcode_Func_CUDbl(const char *Parameter){
+	Type resultType;
+	if( !NumOpe(Parameter,Type(),resultType) ){
+		return;
+	}
+	ChangeTypeToLong(resultType.GetBasicType());
+
+	//pop eax
+	op_pop(REG_EAX);
+
+	//push 0
+	OpBuffer[obp++]=(char)0x6A;
+	OpBuffer[obp++]=(char)0x00;
+
+	//push eax
+	op_push(REG_EAX);
+
+	//fild qword ptr[esp]
+	OpBuffer[obp++]=(char)0xDF;
+	OpBuffer[obp++]=(char)0x2C;
+	OpBuffer[obp++]=(char)0x24;
+
+	//add esp,8
+	op_add_esp(8);
+}
+void Opcode_Func_Len(const char *Parameter){
+	BOOL bArrayHead;
+
+	const char *tempParm=Parameter;
+	char temporary[VN_SIZE];
+	char temp2[32];
+	Type type;
+	if( !GetVarType(Parameter,type,0) ){
+		sprintf(temporary,"_System_DummyStr2=%s",Parameter);
+		OpcodeCalc(temporary);
+
+		lstrcpy(temp2,"_System_DummyStr2");
+		tempParm=temp2;
+
+		type.SetType( DEF_OBJECT, pobj_DBClass->GetStringClassPtr() );
+	}
+
+	if( type.IsStringClass() ){
+		//Stringオブジェクトの場合
+		sprintf(temporary,"%s.Length",tempParm);
+
+		int reg=REG_RAX;
+		NumOpe(temporary,Type(),Type());
+
+		//pop eax
+		op_pop(REG_EAX);
+
+		return;
+	}
+
+	int SubScripts[MAX_ARRAYDIM];
+	RELATIVE_VAR RelativeVar;
+	if(!GetVarOffsetReadOnly(tempParm,&RelativeVar,type,SubScripts)) return;
+
+	if(type.GetBasicType()&FLAG_PTR){
+		type.SetBasicType( type.GetBasicType() & ( ~FLAG_PTR ) );
+
+		bArrayHead=1;
+	}
+	else bArrayHead=0;
+
+	int typeSize = type.GetSize();
+
+	if(bArrayHead) typeSize*=JumpSubScripts(SubScripts);
+
+	//mov eax,TypeSize
+	OpBuffer[obp++]=(char)0xB8;
+	*((long *)(OpBuffer+obp))=typeSize;
+	obp+=sizeof(long);
+}
+void Opcode_Func_AddressOf( const char *name ){
+	extern int cp;
+	UserProc *pUserProc;
+
+	extern LONG_PTR ProcPtr_BaseIndex;
+	if(ProcPtr_BaseIndex!=-1){
+		//左辺の型にのっとり、オーバーロードを解決
+
+		std::vector<UserProc *> subs;
+		GetOverloadSubHash( name, subs );
+		if( subs.size() == 0 ){
+			SetError(27,name,cp);
+			return;
+		}
+
+		//オーバーロードを解決
+		pUserProc=OverloadSolution(name,subs,Smoothie::Meta::procPointers[ProcPtr_BaseIndex]->Params(), Type() );
+
+		if(!pUserProc){
+			SetError(27,name,cp);
+			return;
+		}
+	}
+	else{
+		pUserProc=GetSubHash(name);
+		if(!pUserProc){
+			SetError(27,name,cp);
+			return;
+		}
+	}
+
+	if( pUserProc->IsVirtual() ){
+		///////////////////////////////
+		// 仮想関数の場合
+		// thisポインタをrcxにコピー
+		///////////////////////////////
+
+		const CClass *pobj_c;
+
+		char ObjectName[VN_SIZE];
+		int RefType;
+		SplitObjectName(name,ObjectName,&RefType);
+
+		if(ObjectName[0]){
+			if(lstrcmpi(ObjectName,"Super")==0) goto InClassMember;
+			else{
+				RELATIVE_VAR RelativeVar;
+				Type type;
+				if(!GetVarOffsetReadOnly(ObjectName,&RelativeVar,type)) return;
+				SetVarPtrToEax(&RelativeVar);
+
+				//mov ecx,eax
+				op_mov_RR(REG_ECX,REG_EAX);
+
+				//参照タイプが整合しているかをチェック
+				if(type.GetBasicType()!=RefType) SetError(104,ObjectName,cp);
+
+				if(type.IsObjectPtr()){
+					//mov ecx,dword ptr[ecx]
+					op_mov_RM(sizeof(long),REG_ECX,REG_ECX,0,MOD_BASE);
+				}
+			}
+		}
+		else{
+InClassMember:
+			//自身のオブジェクトのThisポインタをrcxにコピー
+			SetThisPtrToReg(REG_RCX);
+
+			pobj_c=pobj_CompilingClass;
+		}
+
+
+		//仮想関数（オブジェクトメソッド）
+		//pObj->func_table->func1
+		//                ->func2
+		//                ->func3
+
+		//mov edx,dword ptr[ecx]
+		OpBuffer[obp++]=(char)0x8B;
+		OpBuffer[obp++]=(char)0x11;
+
+		int i2 = pobj_c->GetFuncNumInVtbl( pUserProc );
+
+		//mov eax,dword ptr[edx+func_index]
+		if(i2*PTR_SIZE<=0x7F){
+			op_mov_RM(sizeof(long),REG_EAX,REG_EDX,i2*PTR_SIZE,MOD_BASE_DISP8);
+		}
+		else{
+			op_mov_RM(sizeof(long),REG_EAX,REG_EDX,i2*PTR_SIZE,MOD_BASE_DISP32);
+		}
+	}
+	else{
+		//一般の関数
+
+		//mov eax,ProcAddr
+		OpBuffer[obp++]=(char)0xB8;
+		pobj_SubAddrSchedule->add(pUserProc,0);
+		obp+=sizeof(long);
+	}
+
+	pUserProc->Using();
+}
+void Opcode_Func_SizeOf( const string &typeName ){
+	Type tempType;
+	if( !Type::StringToType( typeName, tempType ) ){
+		SetError(3,typeName,cp);
+		return;
+	}
+
+	int typeSize = ( tempType.IsObject() ) ?
+		tempType.GetClass().GetSize() : tempType.GetSize();
+
+	//mov eax,size
+	op_mov_RV( REG_EAX, typeSize );
+}
+void Opcode_Func_VarPtr( const char *Parameter, Type &resultType, bool isCallOn ){
+	if( isCallOn == false ){
+		// 戻り値の型を取得するだけ
+
+		//変数のアドレスを取得
+		if(!GetVarType( Parameter, resultType, true )) return;
+
+		resultType.PtrLevelUp();
+
+		return;
+	}
+
+	RELATIVE_VAR RelativeVar;
+
+	//変数のアドレスを取得
+	if(!GetVarOffsetReadOnly( Parameter, &RelativeVar, resultType )) return;
+
+	int beforeType = resultType.GetBasicType();
+
+	resultType.PtrLevelUp();
+
+	SetVarPtrToEax(&RelativeVar);
+
+	// TODO: 取り除く（この動きはObjPtrに託す）
+	/*
+	if( beforeType == DEF_OBJECT && lstrcmpi( Parameter, "This" ) != 0 ){
+		//参照をオブジェクトポインタに変更
+
+		//mov eax,dword ptr[eax]
+		op_mov_RM( sizeof(long), REG_EAX, REG_EAX, 0, MOD_BASE );
+
+		SetError(-120,NULL,cp);
+	}*/
+}
+void Opcode_Func_ObjPtr( const char *Parameter, Type &resultType, bool isCallOn ){
+	if( isCallOn == false ){
+		// 戻り値の型を取得するだけ
+
+		//変数のアドレスを取得
+		if(!GetVarType( Parameter, resultType, true )) return;
+
+		resultType.PtrLevelUp();
+
+		return;
+	}
+
+	RELATIVE_VAR RelativeVar;
+
+	//変数のアドレスを取得
+	if(!GetVarOffsetReadOnly( Parameter, &RelativeVar, resultType )) return;
+
+	int beforeType = resultType.GetBasicType();
+
+	resultType.PtrLevelUp();
+
+	SetVarPtrToEax(&RelativeVar);
+
+	if( lstrcmpi( Parameter, "This" )==0 ){
+		// Thisの場合は特別にオブジェクトポインタが返ってくるので、何もせずに抜ける
+	}
+	else if( beforeType == DEF_OBJECT ){
+		//参照をオブジェクトポインタに変更
+
+		//mov eax,dword ptr[eax]
+		op_mov_RM( sizeof(long), REG_EAX, REG_EAX, 0, MOD_BASE );
+	}
+	else{
+		SetError(134,NULL,cp );
+	}
+}
+void Opcode_Func_GetPtrData(const char *Parameter,const int type){
+	Type tempType;
+	if( !NumOpe(Parameter,Type(),tempType) ){
+		return;
+	}
+	if(!tempType.IsWhole()){
+		SetError(11,Parameter,cp);
+		return;
+	}
+	ChangeTypeToLong(tempType.GetBasicType());
+
+	if(type==DEF_DOUBLE){
+		//pop eax
+		op_pop(REG_EAX);
+
+		//fld qword ptr[eax]
+		OpBuffer[obp++]=(char)0xDD;
+		OpBuffer[obp++]=(char)0x00;
+	}
+	else if(type==DEF_SINGLE||type==DEF_DWORD){
+		//pop eax
+		op_pop(REG_EAX);
+
+		//mov eax,dword ptr[eax]
+		OpBuffer[obp++]=(char)0x8B;
+		OpBuffer[obp++]=(char)0x00;
+	}
+	else if(type==DEF_QWORD){
+		//pop ecx
+		op_pop(REG_ECX);
+
+		//mov eax,dword ptr[ecx]
+		op_mov_RM(sizeof(long),REG_EAX,REG_ECX,0,MOD_BASE);
+
+		//mov edx,dword ptr[ecx+sizeof(long)]
+		op_mov_RM(sizeof(long),REG_EDX,REG_ECX,sizeof(long),MOD_BASE_DISP8);
+	}
+	else if(type==DEF_WORD){
+		//pop ebx
+		op_pop(REG_EBX);
+
+		//xor eax,eax
+		OpBuffer[obp++]=(char)0x33;
+		OpBuffer[obp++]=(char)0xC0;
+
+		//mov ax,word ptr[ebx]
+		OpBuffer[obp++]=(char)0x66;
+		OpBuffer[obp++]=(char)0x8B;
+		OpBuffer[obp++]=(char)0x03;
+	}
+	else if(type==DEF_BYTE){
+		//pop ebx
+		op_pop(REG_EBX);
+
+		//xor eax,eax
+		OpBuffer[obp++]=(char)0x33;
+		OpBuffer[obp++]=(char)0xC0;
+
+		//mov al,byte ptr[ebx]
+		OpBuffer[obp++]=(char)0x8A;
+		OpBuffer[obp++]=(char)0x03;
+	}
+}
+
+bool Opcode_CallFunc( const char *Parameter, const int FuncNum, Type &resultType, bool isCallOn ){
+	switch(FuncNum){
+		case FUNC_FIX:
+			if( isCallOn ) Opcode_Func_Fix(Parameter);
+			resultType.SetBasicType( DEF_LONG );
+			break;
+		case FUNC_CUDBL:
+			if( isCallOn ) Opcode_Func_CUDbl(Parameter);
+			resultType.SetBasicType( DEF_DOUBLE );
+			break;
+		case FUNC_LEN:
+			if( isCallOn ) Opcode_Func_Len(Parameter);
+			resultType.SetBasicType( DEF_LONG );
+			break;
+		case FUNC_ADDRESSOF:
+			if( isCallOn ) Opcode_Func_AddressOf(Parameter);
+			resultType.SetBasicType( DEF_PTR_VOID );
+			break;
+		case FUNC_SIZEOF:
+			if( isCallOn ) Opcode_Func_SizeOf(Parameter);
+			resultType.SetBasicType( DEF_LONG );
+			break;
+		case FUNC_VARPTR:
+			Opcode_Func_VarPtr( Parameter, resultType, isCallOn );
+			break;
+		case FUNC_OBJPTR:
+			Opcode_Func_ObjPtr( Parameter, resultType, isCallOn );
+			break;
+
+		case FUNC_GETDOUBLE:
+			if( isCallOn ) Opcode_Func_GetPtrData(Parameter,DEF_DOUBLE);
+			resultType.SetBasicType( DEF_DOUBLE );
+			break;
+		case FUNC_GETSINGLE:
+			if( isCallOn ) Opcode_Func_GetPtrData(Parameter,DEF_SINGLE);
+			resultType.SetBasicType( DEF_SINGLE );
+			break;
+		case FUNC_GETQWORD:
+			if( isCallOn ) Opcode_Func_GetPtrData(Parameter,DEF_QWORD);
+			resultType.SetBasicType( DEF_QWORD );
+			break;
+		case FUNC_GETDWORD:
+			if( isCallOn ) Opcode_Func_GetPtrData(Parameter,DEF_DWORD);
+			resultType.SetBasicType( DEF_DWORD );
+			break;
+		case FUNC_GETWORD:
+			if( isCallOn ) Opcode_Func_GetPtrData(Parameter,DEF_WORD);
+			resultType.SetBasicType( DEF_WORD );
+			break;
+		case FUNC_GETBYTE:
+			if( isCallOn ) Opcode_Func_GetPtrData(Parameter,DEF_BYTE);
+			resultType.SetBasicType( DEF_BYTE );
+			break;
+		default:
+			return false;
+	}
+	return true;
+}
Index: /trunk/abdev/BasicCompiler32/Compile_Object.cpp
===================================================================
--- /trunk/abdev/BasicCompiler32/Compile_Object.cpp	(revision 148)
+++ /trunk/abdev/BasicCompiler32/Compile_Object.cpp	(revision 148)
@@ -0,0 +1,361 @@
+#include "../BasicCompiler_Common/common.h"
+#include "opcode.h"
+
+void _call_constructor( const CClass *pobj_c, const char *CreateParameter,int ObjectSize,BOOL bSomeObjects){
+	////////////////////////////
+	// コンストラクタの呼び出し
+	////////////////////////////
+	
+	//この関数を使用する場合は、
+	//・ebxにオブジェクトの個数
+	//・eaxに先頭ポインタ
+	//をセットしておかなければならない
+
+	int jnz_back;
+
+
+	//jnzの番地
+	jnz_back=obp;
+
+	if(bSomeObjects){
+		SetError();
+
+		//push ebx
+		op_push(REG_EBX);
+	}
+
+	// ※ここでプッシュされた値はコンストラクタのthisポインタとなる
+	//push eax
+	op_push(REG_EAX);
+
+
+
+	////////////////////////
+	// オーバーロードを解決
+	////////////////////////
+
+	std::vector<UserProc *> subs;
+	pobj_c->GetMethods().Enum( pobj_c->GetName().c_str(), subs );
+
+	UserProc *pUserProc;
+	if( subs.size() > 0 ){
+		//オーバーロードを解決
+		pUserProc=OverloadSolutionWithStrParam(pobj_c->GetName().c_str(),
+			subs,CreateParameter,"");
+
+		if(!pUserProc) return;
+	}
+
+	//コンストラクタを呼び出す
+	Opcode_CallProc(CreateParameter,
+		pUserProc,
+		PROCFLAG_NEW,"",0);
+
+	{
+		// 動的型情報をセットする
+		// obj._System_SetType( _System_TypeBase.Search( strNamespace, name ) )
+		subs.clear();
+		pobj_c->GetMethods().Enum( "_System_SetType", subs );
+		if( subs.size() == 1 ){
+			char temporary[VN_SIZE];
+			sprintf( temporary, "ActiveBasic.Core._System_TypeBase.Search(\"\",\"%s\"))", pobj_c->GetName().c_str() );
+
+			Opcode_CallProc(temporary,
+				subs[0],
+				PROCFLAG_NEW,"",0);
+		}
+		else{
+			SetError();
+		}
+	}
+
+
+
+	//pop eax
+	op_pop(REG_EAX);
+
+	if(bSomeObjects){
+		//pop ebx
+		op_pop(REG_EBX);
+
+		//add eax,TypeSize
+		OpBuffer[obp++]=(char)0x05;
+		*((long *)(OpBuffer+obp))=ObjectSize;
+		obp+=sizeof(long);
+
+		//sub ebx,1
+		OpBuffer[obp++]=(char)0x83;
+		OpBuffer[obp++]=(char)0xEB;
+		OpBuffer[obp++]=(char)0x01;
+
+		//jnz ↑
+		OpBuffer[obp++]=(char)0x0F;
+		OpBuffer[obp++]=(char)0x85;
+		*((long *)(OpBuffer+obp))=jnz_back-(obp+sizeof(long));
+		obp+=sizeof(long);
+	}
+}
+void Operator_New( const CClass &classObj, const char *objectSizeStr, const char *parameter, const Type &baseType ){
+	int typeSize = classObj.GetSize();
+
+	if(classObj.IsAbstract()){
+		//抽象クラスだったとき
+		SetError(125,classObj.GetName(),cp);
+	}
+
+	BOOL bSomeObjects=0;
+	if(objectSizeStr[0]){
+		bSomeObjects=1;
+
+		Type tempType;
+		NumOpe(objectSizeStr,Type(),tempType);
+		if( !tempType.IsWhole() ) SetError(49,NULL,cp);
+		ChangeTypeToLong(tempType.GetBasicType());
+
+		//pop eax
+		op_pop(REG_EAX);
+
+		//※添え字上限値であることを考慮
+		//add eax,1
+		OpBuffer[obp++]=(char)0x83;
+		OpBuffer[obp++]=(char)0xC0;
+		OpBuffer[obp++]=(char)0x01;
+
+		//オブジェクトの個数をebxに一時保持
+		//※ebxは関数が呼ばれても不変
+		//mov ebx,eax
+		OpBuffer[obp++]=(char)0x8B;
+		OpBuffer[obp++]=(char)0xD8;
+
+		//imul eax,size
+		OpBuffer[obp++]=(char)0x69;
+		OpBuffer[obp++]=(char)0xC0;
+		*((long *)(OpBuffer+obp))=typeSize;
+		obp+=sizeof(long);
+
+		//add eax,OBJECT_HEAD_SIZE
+		OpBuffer[obp++]=(char)0x05;
+		*((long *)(OpBuffer+obp))=OBJECT_HEAD_SIZE;
+		obp+=sizeof(long);
+
+		//push eax
+		op_push(REG_EAX);
+	}
+	else{
+		//オブジェクトの個数をebxに一時保持
+		//※ebxは関数が呼ばれても不変
+		//mov ebx,1
+		OpBuffer[obp++]=(char)0xBB;
+		*((long *)(OpBuffer+obp))=1;
+		obp+=sizeof(long);
+
+		//push size + OBJECT_HEAD_SIZE
+		OpBuffer[obp++]=(char)0x68;
+		*((long *)(OpBuffer+obp))=typeSize + OBJECT_HEAD_SIZE;
+		obp+=sizeof(long);
+	}
+
+	if( baseType.IsObject() ){
+		// オブジェクト インスタンス
+		// ※DeleteはGCで処理
+
+		//call _System_GC_malloc_ForObject
+		extern UserProc *pSub_System_GC_malloc_ForObject;
+		op_call(pSub_System_GC_malloc_ForObject);
+	}
+	else{
+		// オブジェクトポインタ
+		// ※明示的なDeleteが必要
+
+		//call _System_GC_malloc_ForObjectPtr
+		extern UserProc *pSub_System_GC_malloc_ForObjectPtr;
+		op_call(pSub_System_GC_malloc_ForObjectPtr);
+	}
+
+
+	/*
+	確保されたヒープ領域のポインタ（callocの戻り値eax）をpPtrとすると、
+	pPtr[0]=オブジェクトの個数
+	pPtr[1]=オブジェクトのサイズ
+	pPtr[2]=デストラクタの関数ポインタ
+	pPtr[3]=reserve
+	*/
+
+
+	//mov dword ptr[eax],ebx（オブジェクトの個数）
+	OpBuffer[obp++]=(char)0x89;
+	OpBuffer[obp++]=(char)0x18;
+
+	//add eax,sizeof(DWORD)
+	OpBuffer[obp++]=(char)0x05;
+	*((long *)(OpBuffer+obp))=sizeof(DWORD);
+	obp+=sizeof(long);
+
+
+	//mov ecx,TypeSize
+	OpBuffer[obp++]=(char)0xB9;
+	*((long *)(OpBuffer+obp))=typeSize;
+	obp+=sizeof(long);
+
+	//mov dword ptr[eax],ecx（オブジェクトのサイズ）
+	OpBuffer[obp++]=(char)0x89;
+	OpBuffer[obp++]=(char)0x08;
+
+	//add eax,sizeof(DWORD)
+	OpBuffer[obp++]=(char)0x05;
+	*((long *)(OpBuffer+obp))=sizeof(DWORD);
+	obp+=sizeof(long);
+
+
+	const CMethod *method = classObj.GetDestructorMethod();
+	if( method == NULL ) return;
+
+	//mov ecx,DestructorProcAddr
+	OpBuffer[obp++]=(char)0xB9;
+	pobj_SubAddrSchedule->add(method->pUserProc,0);
+	method->pUserProc->Using();
+	obp+=sizeof(long);
+
+	//mov dword ptr[eax],ecx（デストラクタの関数ポインタ）
+	OpBuffer[obp++]=(char)0x89;
+	OpBuffer[obp++]=(char)0x08;
+
+	//add eax,sizeof(DWORD)
+	OpBuffer[obp++]=(char)0x05;
+	*((long *)(OpBuffer+obp))=sizeof(DWORD);
+	obp+=sizeof(long);
+
+
+	// リザーブ領域
+	//add eax,sizeof(DWORD)
+	OpBuffer[obp++]=(char)0x05;
+	*((long *)(OpBuffer+obp))=sizeof(DWORD);
+	obp+=sizeof(long);
+
+
+	// ※ここでプッシュされた値はNew演算子の戻り値となる
+	//push eax
+	op_push(REG_EAX);
+
+
+	/////////////////////////////////////////////////////////////////////
+
+	////////////////////////////
+	// コンストラクタの呼び出し
+	////////////////////////////
+
+	_call_constructor(&classObj,parameter,typeSize,bSomeObjects);
+}
+void OpcodeDelete(const char *Parameter, bool isSweeping){
+	Type tempType;
+	if( !NumOpe(Parameter,Type(),tempType) ){
+		return;
+	}
+	if(!( tempType.IsObjectPtr() || tempType.IsVoidPtr() )) SetError(122,NULL,cp);
+
+	//pop eax
+	op_pop(REG_EAX);
+
+	//sub eax,sizeof(DWORD)*3
+	op_sub_RV8( REG_EAX, OBJECT_HEAD_SIZE );
+
+	//push eax
+	op_push(REG_EAX);
+
+
+	//mov ebx,dword ptr[eax]（オブジェクトの個数）
+	OpBuffer[obp++]=(char)0x8B;
+	OpBuffer[obp++]=(char)0x18;
+
+	//add eax,sizeof(DWORD)
+	OpBuffer[obp++]=(char)0x05;
+	*((long *)(OpBuffer+obp))=sizeof(DWORD);
+	obp+=sizeof(long);
+
+
+	//mov esi,dword ptr[eax]（オブジェクトのサイズ）
+	OpBuffer[obp++]=(char)0x8B;
+	OpBuffer[obp++]=(char)0x30;
+
+	//add eax,sizeof(DWORD)
+	OpBuffer[obp++]=(char)0x05;
+	*((long *)(OpBuffer+obp))=sizeof(DWORD);
+	obp+=sizeof(long);
+
+
+	//mov edx,dword ptr[eax]（デストラクタの関数ポインタ）
+	OpBuffer[obp++]=(char)0x8B;
+	OpBuffer[obp++]=(char)0x10;
+
+	//add eax,sizeof(DWORD)
+	OpBuffer[obp++]=(char)0x05;
+	*((long *)(OpBuffer+obp))=sizeof(DWORD);
+	obp+=sizeof(long);
+
+
+	// リザーブ領域
+	//add eax,sizeof(DWORD)
+	OpBuffer[obp++]=(char)0x05;
+	*((long *)(OpBuffer+obp))=sizeof(DWORD);
+	obp+=sizeof(long);
+
+
+	//mov ecx,eax
+	OpBuffer[obp++]=(char)0x8B;
+	OpBuffer[obp++]=(char)0xC8;
+
+
+	//jnzの番地
+	int jnz_back;
+	jnz_back=obp;
+
+	//push ecx
+	op_push(REG_ECX);
+
+	//push edx
+	op_push(REG_EDX);
+
+	//push ecx（Thisポインタ   ※隠れた第一パラメータ）
+	op_push(REG_ECX);
+
+	//call edx
+	OpBuffer[obp++]=(char)0xFF;
+	OpBuffer[obp++]=(char)0xD2;
+
+	//pop edx
+	op_pop(REG_EDX);
+
+	//pop ecx
+	op_pop(REG_ECX);
+
+	//add ecx,esi
+	OpBuffer[obp++]=(char)0x03;
+	OpBuffer[obp++]=(char)0xCE;
+
+	//sub ebx,1
+	OpBuffer[obp++]=(char)0x83;
+	OpBuffer[obp++]=(char)0xEB;
+	OpBuffer[obp++]=(char)0x01;
+
+	//jnz ↑
+	OpBuffer[obp++]=(char)0x0F;
+	OpBuffer[obp++]=(char)0x85;
+	*((long *)(OpBuffer+obp))=jnz_back-(obp+sizeof(long));
+	obp+=sizeof(long);
+
+
+	//////////////////////////////////////////
+	// オブジェクトメンバ変数用のメモリを解放
+	//////////////////////////////////////////
+
+	if( isSweeping ){
+		//call _System_GC_free_for_SweepingDelete
+		extern UserProc *pSub_System_GC_free_for_SweepingDelete;
+		op_call(pSub_System_GC_free_for_SweepingDelete);
+	}
+	else{
+		//call free
+		extern UserProc *pSub_free;
+		op_call(pSub_free);
+	}
+}
Index: /trunk/abdev/BasicCompiler32/Compile_ProcOp.cpp
===================================================================
--- /trunk/abdev/BasicCompiler32/Compile_ProcOp.cpp	(revision 148)
+++ /trunk/abdev/BasicCompiler32/Compile_ProcOp.cpp	(revision 148)
@@ -0,0 +1,882 @@
+#include "../BasicCompiler_Common/common.h"
+#include "Opcode.h"
+
+
+void SystemProc( const UserProc &userProc ){
+	if( userProc.GetName() == "_System_GetEip" ){
+		//mov eax,dword ptr[esp]
+		OpBuffer[obp++]=(char)0x8B;
+		OpBuffer[obp++]=(char)0x04;
+		OpBuffer[obp++]=(char)0x24;
+
+		//ret
+		op_ret();
+	}
+	else if( userProc.GetName() == "_System_InitDllGlobalVariables" ){
+		////////////////////////////////////////
+		// DLLのグローバル領域をコンパイル
+		////////////////////////////////////////
+
+		extern BOOL bDll;
+		if(!bDll){
+			//ret
+			op_ret();
+
+			return;
+		}
+
+		UserProc *pBackUserProc;
+		pBackUserProc = &UserProc::CompilingUserProc();
+		UserProc::CompileStartForGlobalArea();
+
+		int BackCp;
+		BackCp=cp;
+		cp=-1;
+
+		extern BOOL bDebugCompile;
+		if(bDebugCompile){
+			//デバッグ用の変数を定義
+			DebugVariable();
+		}
+
+		//GC用の変数を定義
+		InitGCVariables();
+
+		//_System_StartupProgramの呼び出し
+		extern UserProc *pSub_System_StartupProgram;
+		op_call(pSub_System_StartupProgram);
+
+		//クラスに属する静的メンバを定義
+		CMember::InitStaticMember();
+
+		GetGlobalDataForDll();
+
+		UserProc::CompileStartForUserProc( pBackUserProc );
+		cp=BackCp;
+
+		//ret
+		op_ret();
+	}
+	else if( userProc.GetName() == "_System_InitStaticLocalVariables" ){
+		//静的ローカルオブジェクトのコンストラクタ呼び出し
+
+		foreach( Variable *pVar, globalVars ){
+			if(memicmp(pVar->GetName().c_str(),"Static%",7)==0){
+				//コンストラクタ呼び出し
+				if( pVar->IsObject() ){
+
+					//エラー用
+					cp=pVar->source_code_address;
+
+					CallConstructor(
+						pVar->GetName().c_str(),
+						pVar->GetSubScriptsPtr(),
+						*pVar,
+						pVar->paramStrForConstructor.c_str());
+				}
+			}
+		}
+
+		//ret
+		op_ret();
+	}
+	else if( userProc.GetName() == "_System_Call_Destructor_of_GlobalObject" ){
+
+		UserProc *pBackUserProc;
+		pBackUserProc = &UserProc::CompilingUserProc();
+		UserProc::CompileStartForGlobalArea();
+
+		obj_LexScopes.CallDestructorsOfScopeEnd();
+
+		UserProc::CompileStartForUserProc( pBackUserProc );
+
+
+		//ret
+		op_ret();
+	}
+	else if( userProc.GetName() == "_System_GetSp" ){
+		//mov eax,esp
+		op_mov_RR(REG_EAX,REG_ESP);
+
+		//add eax,PTR_SIZE
+		op_add_RV8(REG_EAX,PTR_SIZE);
+
+		//ret
+		op_ret();
+	}
+	else if( userProc.GetName() == "_allrem" ){
+		//乗除演算用の特殊関数（64ビット整数対応）
+		BYTE Buffer_allrem[]={
+			0x53,0x57,0x33,0xFF,0x8B,0x44,0x24,0x10,0x0B,0xC0,0x7D,0x14,0x47,0x8B,0x54,0x24,0x0C,0xF7,0xD8,0xF7,0xDA,0x83,0xD8,0x00,0x89,0x44,0x24,0x10,0x89,0x54,0x24,0x0C,0x8B,0x44,0x24,0x18,0x0B,0xC0,0x7D,0x13,0x8B,0x54,0x24,0x14,0xF7,0xD8,0xF7,0xDA,0x83,0xD8,0x00,0x89,0x44,0x24,0x18,0x89,0x54,0x24,0x14,0x0B,0xC0,0x75,0x1B,0x8B,0x4C,0x24,0x14,0x8B,0x44,0x24,0x10,0x33,0xD2,0xF7,0xF1,0x8B,0x44,0x24,0x0C,0xF7,0xF1,0x8B,0xC2,0x33,0xD2,0x4F,0x79,0x4E,0xEB,0x53,0x8B,0xD8,0x8B,0x4C,0x24,0x14,0x8B,0x54,0x24,0x10,0x8B,0x44,0x24,0x0C,0xD1,0xEB,0xD1,0xD9,0xD1,0xEA,0xD1,0xD8,0x0B,0xDB,0x75,0xF4,0xF7,0xF1,0x8B,0xC8,0xF7,0x64,0x24,0x18,0x91,0xF7,0x64,0x24,0x14,0x03,0xD1,0x72,0x0E,0x3B,0x54,0x24,0x10,0x77,0x08,0x72,0x0E,0x3B,0x44,0x24,0x0C,0x76,0x08,0x2B,0x44,0x24,0x14,0x1B,0x54,0x24,0x18,0x2B,0x44,0x24,0x0C,0x1B,0x54,0x24,0x10,0x4F,0x79,0x07,0xF7,0xDA,0xF7,0xD8,0x83,0xDA,0x00,0x5F,0x5B,0xC2,0x10,0x00
+		};
+
+		memcpy(OpBuffer+obp,Buffer_allrem,178);
+		obp+=178;
+	}
+	else if( userProc.GetName() == "_aullrem" ){
+		//乗除演算用の特殊関数（64ビット整数対応）
+		BYTE Buffer_aullrem[]={
+			0x53,0x8B,0x44,0x24,0x14,0x0B,0xC0,0x75,0x18,0x8B,0x4C,0x24,0x10,0x8B,
+			0x44,0x24,0x0C,0x33,0xD2,0xF7,0xF1,0x8B,0x44,0x24,0x08,0xF7,0xF1,0x8B,
+			0xC2,0x33,0xD2,0xEB,0x50,0x8B,0xC8,0x8B,0x5C,0x24,0x10,0x8B,0x54,0x24,
+			0x0C,0x8B,0x44,0x24,0x08,0xD1,0xE9,0xD1,0xDB,0xD1,0xEA,0xD1,0xD8,0x0B,
+			0xC9,0x75,0xF4,0xF7,0xF3,0x8B,0xC8,0xF7,0x64,0x24,0x14,0x91,0xF7,0x64,
+			0x24,0x10,0x03,0xD1,0x72,0x0E,0x3B,0x54,0x24,0x0C,0x77,0x08,0x72,0x0E,
+			0x3B,0x44,0x24,0x08,0x76,0x08,0x2B,0x44,0x24,0x10,0x1B,0x54,0x24,0x14,
+			0x2B,0x44,0x24,0x08,0x1B,0x54,0x24,0x0C,0xF7,0xDA,0xF7,0xD8,0x83,0xDA,
+			0x00,0x5B,0xC2,0x10,0x00
+		};
+
+		memcpy(OpBuffer+obp,Buffer_aullrem,117);
+		obp+=117;
+	}
+	else if( userProc.GetName() == "_allmul" ){
+		//乗算用の特殊関数（64ビット整数対応）
+		BYTE Buffer_allmul[]={
+			0x8B,0x44,0x24,0x08,0x8B,0x4C,0x24,0x10,0x0B,0xC8,0x8B,0x4C,0x24,0x0C,0x75,0x09,0x8B,0x44,0x24,0x04,0xF7,0xE1,0xC2,0x10,0x00,0x53,0xF7,0xE1,0x8B,0xD8,0x8B,0x44,0x24,0x08,0xF7,0x64,0x24,0x14,0x03,0xD8,0x8B,0x44,0x24,0x08,0xF7,0xE1,0x03,0xD3,0x5B,0xC2,0x10,0x00
+		};
+
+		memcpy(OpBuffer+obp,Buffer_allmul,52);
+		obp+=52;
+	}
+	else if( userProc.GetName() == "_alldiv" ){
+		//除算用の特殊関数（64ビット整数対応）
+		BYTE Buffer_alldiv[]={
+			0x57,0x56,0x53,0x33,0xFF,0x8B,0x44,0x24,0x14,0x0B,0xC0,0x7D,0x14,0x47,0x8B,0x54,0x24,0x10,0xF7,0xD8,0xF7,0xDA,0x83,0xD8,0x00,0x89,0x44,0x24,0x14,0x89,0x54,0x24,0x10,0x8B,0x44,0x24,0x1C,0x0B,0xC0,0x7D,0x14,0x47,0x8B,0x54,0x24,0x18,0xF7,0xD8,0xF7,0xDA,0x83,0xD8,0x00,0x89,0x44,0x24,0x1C,0x89,0x54,0x24,0x18,0x0B,0xC0,0x75,0x18,0x8B,0x4C,0x24,0x18,0x8B,0x44,0x24,0x14,0x33,0xD2,0xF7,0xF1,0x8B,0xD8,0x8B,0x44,0x24,0x10,0xF7,0xF1,0x8B,0xD3,0xEB,0x41,0x8B,0xD8,0x8B,0x4C,0x24,0x18,0x8B,0x54,0x24,0x14,0x8B,0x44,0x24,0x10,0xD1,0xEB,0xD1,0xD9,0xD1,0xEA,0xD1,0xD8,0x0B,0xDB,0x75,0xF4,0xF7,0xF1,0x8B,0xF0,0xF7,0x64,0x24,0x1C,0x8B,0xC8,0x8B,0x44,0x24,0x18,0xF7,0xE6,0x03,0xD1,0x72,0x0E,0x3B,0x54,0x24,0x14,0x77,0x08,0x72,0x07,0x3B,0x44,0x24,0x10,0x76,0x01,0x4E,0x33,0xD2,0x8B,0xC6,0x4F,0x75,0x07,0xF7,0xDA,0xF7,0xD8,0x83,0xDA,0x00,0x5B,0x5E,0x5F,0xC2,0x10,0x00
+		};
+
+		memcpy(OpBuffer+obp,Buffer_alldiv,170);
+		obp+=170;
+	}
+	else if( userProc.GetName() == "_aulldiv" ){
+		//整数除算用の特殊関数（64ビット整数対応）
+		BYTE Buffer_aulldiv[]={
+			0x53,0x56,0x8B,0x44,0x24,0x18,0x0B,0xC0,0x75,0x18,0x8B,0x4C,0x24,0x14,
+			0x8B,0x44,0x24,0x10,0x33,0xD2,0xF7,0xF1,0x8B,0xD8,0x8B,0x44,0x24,0x0C,
+			0xF7,0xF1,0x8B,0xD3,0xEB,0x41,0x8B,0xC8,0x8B,0x5C,0x24,0x14,0x8B,0x54,
+			0x24,0x10,0x8B,0x44,0x24,0x0C,0xD1,0xE9,0xD1,0xDB,0xD1,0xEA,0xD1,0xD8,
+			0x0B,0xC9,0x75,0xF4,0xF7,0xF3,0x8B,0xF0,0xF7,0x64,0x24,0x18,0x8B,0xC8,
+			0x8B,0x44,0x24,0x14,0xF7,0xE6,0x03,0xD1,0x72,0x0E,0x3B,0x54,0x24,0x10,
+			0x77,0x08,0x72,0x07,0x3B,0x44,0x24,0x0C,0x76,0x01,0x4E,0x33,0xD2,0x8B,
+			0xC6,0x5E,0x5B,0xC2,0x10,0x00
+		};
+
+		memcpy(OpBuffer+obp,Buffer_aulldiv,104);
+		obp+=104;
+	}
+	else if( userProc.GetName() == "_allshl" ){
+		//符号あり左ビットシフト用の特殊関数（64ビット整数対応）
+		BYTE Buffer_allshl[]={
+			0x80,0xF9,0x40,0x73,0x15,0x80,0xF9,0x20,0x73,0x06,0x0F,0xA5,0xC2,0xD3,0xE0,0xC3,0x8B,0xD0,0x33,0xC0,0x80,0xE1,0x1F,0xD3,0xE2,0xC3,0x33,0xC0,0x33,0xD2,0xC3
+		};
+
+		memcpy(OpBuffer+obp,Buffer_allshl,31);
+		obp+=31;
+	}
+	else if( userProc.GetName() == "_allshr" ){
+		//符号あり右ビットシフト用の特殊関数（64ビット整数対応）
+		BYTE Buffer_allshr[]={
+			0x80,0xF9,0x40,0x73,0x16,0x80,0xF9,0x20,0x73,0x06,0x0F,0xAD,0xD0,0xD3,0xFA,0xC3,0x8B,0xC2,0xC1,0xFA,0x1F,0x80,0xE1,0x1F,0xD3,0xF8,0xC3,0xC1,0xFA,0x1F,0x8B,0xC2,0xC3
+		};
+
+		memcpy(OpBuffer+obp,Buffer_allshr,33);
+		obp+=33;
+	}
+	else if( userProc.GetName() == "_aullshr" ){
+		//符号なし右ビットシフト用の特殊関数（64ビット整数対応）
+		BYTE Buffer_aullshr[]={
+			0x80,0xF9,0x40,         //cmp         cl,40h
+			0x73,0x15,              //jae         RETZERO (0040d71a)
+			0x80,0xF9,0x20,         //cmp         cl,20h
+			0x73,0x06,              //jae         MORE32 (0040d710)
+			0x0F,0xAD,0xD0,         //shrd        eax,edx,cl
+			0xD3,0xEA,              //shr         edx,cl
+			0xC3,                   //ret
+			//MORE32:
+			0x8B,0xC2,              //mov         eax,edx
+			0x33,0xD2,              //xor         edx,edx
+			0x80,0xE1,0x1F,         //and         cl,1Fh
+			0xD3,0xE8,              //shr         eax,cl
+			0xC3,                   //ret
+			//RETZERO:
+			0x33,0xC0,              //xor         eax,eax
+			0x33,0xD2,              //xor         edx,edx
+			0xC3                    //ret
+		};
+
+		memcpy(OpBuffer+obp,Buffer_aullshr,31);
+		obp+=31;
+	}
+	else{
+		SetError();
+	}
+}
+void AutoGeneration(UserProc &userProc){
+	if( userProc.GetName() == "InitializeUserTypes"
+		&& userProc.HasParentClass()
+		&& userProc.GetParentClass().GetName() == "_System_TypeBase" ){
+
+			pobj_DBClass->Compile_System_InitializeUserTypes();
+	}
+	else if( userProc.GetName() == "RegisterGlobalRoots"
+		&& userProc.HasParentClass()
+		&& userProc.GetParentClass().GetName() == "_System_CGarbageCollection" ){
+
+			Compile_AddGlobalRootsForGc();
+	}
+	else{
+		SetError();
+	}
+}
+
+void _compile_proc(UserProc *pUserProc){
+	extern char *basbuf;
+	extern HANDLE hHeap;
+	extern GlobalProc **ppSubHash;
+	extern BOOL bDebugCompile;
+	int i3,i4,LocalVarSchedule,EspOffsetSchedule,BaseOffset;
+	char temporary[VN_SIZE];
+
+	if( pUserProc->IsUsing() == false || pUserProc->IsCompiled() ) return;
+
+	if( pUserProc->localVars.size() ){
+		SetError();
+		return;
+	}
+
+	pUserProc->CompleteCompile();
+
+	extern BOOL bSystemProc;
+	if(memcmp(pUserProc->GetName().c_str(),"_System_",8)==0) bSystemProc=1;
+	else bSystemProc=0;
+
+	extern BOOL bDebugSupportProc;
+	if(memcmp(pUserProc->GetName().c_str(),"_DebugSys_",10)==0){
+		if(!bDebugCompile){
+			return;
+		}
+		bDebugSupportProc=1;
+	}
+	else bDebugSupportProc=0;
+
+	pUserProc->beginOpAddress=obp;
+
+	//コンパイル中の関数が属するクラス
+	pobj_CompilingClass=pUserProc->GetParentClassPtr();
+
+	//コンパイルスタートをクラス管理クラスに追加
+	pobj_DBClass->StartCompile( pUserProc );
+
+	//コンパイル中の関数
+	UserProc::CompileStartForUserProc( pUserProc );
+
+	// コンパイル中の関数が属する名前空間
+	Smoothie::Lexical::liveingNamespaceScopes = pUserProc->GetNamespaceScopes();
+
+	// コンパイル中の関数でImportsされている名前空間
+	Smoothie::Temp::importedNamespaces = pUserProc->GetImportedNamespaces();
+
+	if(pUserProc->IsSystem()){
+		////////////////////
+		// 特殊関数
+		////////////////////
+
+		extern int AllLocalVarSize;
+		AllLocalVarSize=0;
+
+		SystemProc(*pUserProc);
+
+		pUserProc->endOpAddress=obp;
+		return;
+	}
+
+	cp=pUserProc->GetCodePos();
+	for(;;cp++){
+		if(IsCommandDelimitation(basbuf[cp])) break;
+	}
+	cp--;
+
+	//ローカル変数に関する情報
+	extern int AllLocalVarSize;
+	AllLocalVarSize=0;
+
+	//ローカル変数アドレススケジュール
+	extern DWORD *pLocalVarAddrSchedule;
+	extern int LocalVarAddrScheduleNum;
+	pLocalVarAddrSchedule=(DWORD *)HeapAlloc(hHeap,0,1);
+	LocalVarAddrScheduleNum=0;
+
+	//パラメータ用の変数データを考慮
+	for(i3=(int)pUserProc->RealParams().size()-1;i3>=0;i3--){
+		Parameter &param = *pUserProc->RealParams()[i3];
+
+		Variable *pVar = new Variable( param.GetVarName(), param, false, param.IsRef() );
+
+		if( param.IsArray() ){
+			pVar->SetArray( param.GetSubScriptsPtr() );
+		}
+
+		int varSize;
+		if( param.IsRef() == false && param.IsStruct() ){
+			//構造体のByValパラメータ
+			pVar->ThisIsParameter();
+			varSize=PTR_SIZE;
+		}
+		else{
+			if( param.IsArray() == false ){
+				varSize = pVar->GetMemorySize();
+			}
+			else{
+				varSize=PTR_SIZE;
+			}
+		}
+		AllLocalVarSize+=varSize;
+		pVar->offset=AllLocalVarSize;
+
+		//レキシカルスコープ情報
+		pVar->ScopeLevel=obj_LexScopes.GetNowLevel();
+		pVar->ScopeStartAddress=obj_LexScopes.GetStartAddress();
+		pVar->bLiving=TRUE;
+
+		pUserProc->localVars.push_back( pVar );
+	}
+
+	//Thisポインタを示すローカルオフセット値をセット
+	extern int LocalVar_ThisPtrOffset;
+	LocalVar_ThisPtrOffset=AllLocalVarSize;
+
+	BaseOffset=AllLocalVarSize;
+
+	//ret用のアドレスを考慮
+	AllLocalVarSize+=sizeof(long);
+
+
+	///////////////////////
+	// ここからコード生成
+
+	//sub esp,AllLocalVarSize（スケジュール）
+	op_sub_esp(0xFFFFFFFF);
+	LocalVarSchedule=obp-sizeof(long);
+
+	//push ebp
+	op_push(REG_EBP);
+
+	//mov ebp,esp
+	OpBuffer[obp++]=(char)0x8B;
+	OpBuffer[obp++]=(char)0xEC;
+
+	//push ebx
+	op_push(REG_EBX);
+
+	//push esi
+	OpBuffer[obp++]=(char)0x56;
+
+	//push edi
+	OpBuffer[obp++]=(char)0x57;
+
+	if( !pUserProc->ReturnType().IsNull() ){
+		//戻り値が存在するとき
+
+		const char *temp = pUserProc->GetName().c_str();
+		if( temp[0]==1&&temp[1]==ESC_OPERATOR ){
+			temp = "_System_ReturnValue";
+		}
+
+		if( pUserProc->ReturnType().IsStruct() ){
+			//戻り値用の構造体（値型）はパラメータで引き渡される
+		}
+		else{
+			if( pUserProc->ReturnType().IsObject() ){
+				sprintf(temporary,"%s=Nothing%c%c%s",temp,1,ESC_AS, pUserProc->ReturnType().ToString().c_str() );
+			}
+			else{
+				//戻り値用の変数の定義
+				sprintf(temporary,"%s%c%c%s",temp,1,ESC_AS, pUserProc->ReturnType().ToString().c_str() );
+			}
+
+			OpcodeDim(temporary,0);
+		}
+	}
+
+	//プロシージャ抜け出しスケジュール（Exit Sub/Function）
+	extern DWORD *pExitSubSchedule;
+	extern int ExitSubScheduleNum;
+	pExitSubSchedule=(DWORD *)HeapAlloc(hHeap,0,1);
+	ExitSubScheduleNum=0;
+
+	//ラベル用のメモリを確保
+	extern LABEL *pLabelNames;
+	extern int MaxLabelNum;
+	pLabelNames=(LABEL *)HeapAlloc(hHeap,0,1);
+	MaxLabelNum=0;
+
+	//Gotoラベルスケジュール
+	extern GOTOLABELSCHEDULE *pGotoLabelSchedule;
+	extern int GotoLabelScheduleNum;
+	pGotoLabelSchedule=(GOTOLABELSCHEDULE *)HeapAlloc(hHeap,0,1);
+	GotoLabelScheduleNum=0;
+
+	//With情報のメモリを確保
+	extern WITHINFO WithInfo;
+	WithInfo.ppName=(char **)HeapAlloc(hHeap,0,1);
+	WithInfo.pWithCp=(int *)HeapAlloc(hHeap,0,1);
+	WithInfo.num=0;
+
+	//重複エラー情報管理のメモリを確保
+	extern char **SynonymErrorWords;
+	extern int SynonymErrorNum;
+	SynonymErrorNum=0;
+	SynonymErrorWords=(char **)HeapAlloc(hHeap,0,1);
+
+	//Continueアドレスを初期化
+	extern DWORD dwContinueAddress;
+	dwContinueAddress=-1;
+
+	if(bDebugCompile&&bDebugSupportProc==0){
+		//push dword ptr[ebp+(AllLocalVarSize-BaseOffset)]（スケジュール）
+		OpBuffer[obp++]=(char)0xFF;
+		OpBuffer[obp++]=(char)0xB5;
+		EspOffsetSchedule=obp;
+		obp+=sizeof(long);	
+
+		//push dword ptr[ebp]（以前のebp）
+		OpBuffer[obp++]=(char)0xFF;
+		OpBuffer[obp++]=(char)0x75;
+		OpBuffer[obp++]=(char)0x00;
+
+		//call _DebugSys_StartProc
+		extern UserProc *pSub_DebugSys_StartProc;
+		op_call(pSub_DebugSys_StartProc);
+	}
+
+	if(pobj_CompilingClass){
+		if( pUserProc->GetName() == pobj_CompilingClass->GetName() ){
+			////////////////////////////////////
+			// コンストラクタをコンパイルするとき
+			////////////////////////////////////
+
+			//コンストラクタのコンパイル開始を通知
+			pobj_CompilingClass->NotifyStartConstructorCompile();
+
+			//基底クラスかどうかの識別
+			//（継承元がインターフェイスの場合も基底クラスと見なす）
+			BOOL bThisIsSuperClass;
+			if(pobj_CompilingClass->pobj_InheritsClass==0) bThisIsSuperClass=1;
+			else if( pobj_CompilingClass->pobj_InheritsClass->GetConstructorMethod() == NULL ){
+				//インターフェイスを継承したときはコンストラクタを持たない
+				bThisIsSuperClass=1;
+			}
+			else bThisIsSuperClass=0;
+
+			if(!bThisIsSuperClass){
+				/* サブクラスコンストラクタをコンパイルしているときは、
+					基底クラスのコンストラクタを呼び出す */
+
+				i3=cp+1;
+				while(IsCommandDelimitation(basbuf[i3])) i3++;
+				for(i4=0;;i3++,i4++){
+					if(!IsVariableChar(basbuf[i3])){
+						temporary[i4]=0;
+						break;
+					}
+					temporary[i4]=basbuf[i3];
+				}
+				if( pobj_CompilingClass->pobj_InheritsClass->GetName() == temporary ){
+					//基底クラスのコンストラクタを呼び出す
+					cp=i3;
+					for(i4=0;;cp++,i4++){
+						if(IsCommandDelimitation(basbuf[cp])){
+							temporary[i4]=0;
+							break;
+						}
+						temporary[i4]=basbuf[cp];
+					}
+					if(!(temporary[0]=='('&&temporary[lstrlen(temporary)-1]==')')){
+						SetError(1,NULL,cp);
+					}
+					RemoveStringPare(temporary);
+
+					Type dummyType;
+					CallProc( PROC_DEFAULT
+						, pobj_CompilingClass->pobj_InheritsClass->GetConstructorMethod()->pUserProc
+						, pobj_CompilingClass->pobj_InheritsClass->GetConstructorMethod()->pUserProc->GetName().c_str()
+						, temporary
+						, dummyType );
+				}
+				else{
+					//基底クラスのコンストラクタを暗黙的に呼び出す
+					Opcode_CallProc("",
+						pobj_CompilingClass->pobj_InheritsClass->GetConstructorMethod()->pUserProc,
+						0,
+						"",
+						0);
+				}
+			}
+
+			//仮想関数テーブルを初期化
+			if( pobj_CompilingClass->IsExistVirtualFunctions()
+				&& !pobj_CompilingClass->IsAbstract() ){
+					//関数テーブルに値をセット
+					int offset = (int)pobj_CompilingClass->GetVtblGlobalOffset();
+
+					//mov eax,offset
+					OpBuffer[obp++]=(char)0xB8;
+					*((long *)(OpBuffer+obp))=offset;
+					pobj_DataTableSchedule->add();
+					obp+=sizeof(long);
+
+					//Thisポインタをecxにコピー
+					SetThisPtrToReg(REG_ECX);
+
+					//mov dword ptr[ecx],eax
+					OpBuffer[obp++]=(char)0x89;
+					OpBuffer[obp++]=(char)0x01;
+			}
+		}
+		else if( pUserProc->IsDestructor() ){
+			//デストラクタをコンパイルしたとき
+
+			//デストラクタのコンパイル開始を通知
+			pobj_CompilingClass->NotifyStartDestructorCompile();
+		}
+	}
+
+	//////////////////////////////////////////
+	//////////////////////////////////////////
+	////// プロシージャ内をコンパイル ////////
+	if( pUserProc->IsAutoGeneration() ){
+		AutoGeneration( *pUserProc );
+	}
+	else{
+		if(pUserProc->IsMacro()){
+			CompileBuffer(ESC_ENDMACRO,0);
+		}
+		else{
+			if(pUserProc->IsSub()){
+				CompileBuffer(ESC_ENDSUB,0);
+			}
+			else if(pUserProc->IsFunction()){
+				CompileBuffer(ESC_ENDFUNCTION,0);
+			}
+		}
+	}
+	//////////////////////////////////////////
+	//////////////////////////////////////////
+
+	if( pobj_CompilingClass ){
+
+		if( pobj_CompilingClass->IsCompilingConstructor() ){
+			// コンストラクタをコンパイルしていたとき
+
+			// コンストラクタのコンパイルが完了したことを通知
+			pobj_CompilingClass->NotifyFinishConstructorCompile();
+		}
+		else if( pUserProc->IsDestructor() ){
+			////////////////////////////////////
+			//デストラクタをコンパイルしたとき
+			////////////////////////////////////
+
+			// デストラクタのコンパイルが完了したことを通知
+			pobj_CompilingClass->NotifyFinishDestructorCompile();
+
+			if(pobj_CompilingClass->pobj_InheritsClass){
+				/* サブクラスのデストラクタをコンパイルしているときは、
+					基底クラスのデストラクタを呼び出す */
+
+				const CMethod *method = pobj_CompilingClass->pobj_InheritsClass->GetDestructorMethod();
+				if( method ){
+					Opcode_CallProc("",
+						method->pUserProc,
+						0,
+						"",
+						0);
+				}
+			}
+		}
+	}
+
+	//ラベル用のメモリを解放
+	for(i3=0;i3<MaxLabelNum;i3++){
+		if(pLabelNames[i3].pName) HeapDefaultFree(pLabelNames[i3].pName);
+	}
+	HeapDefaultFree(pLabelNames);
+
+	//Goto未知ラベルスケジュールを解放
+	for(i3=0;i3<GotoLabelScheduleNum;i3++){
+		if(pGotoLabelSchedule[i3].pName){
+			SetError(6,pGotoLabelSchedule[i3].pName,pGotoLabelSchedule[i3].now_cp);
+			HeapDefaultFree(pGotoLabelSchedule[i3].pName);
+		}
+		else{
+			sprintf(temporary,"%d",pGotoLabelSchedule[i3].line);
+			SetError(6,temporary,pGotoLabelSchedule[i3].now_cp);
+		}
+	}
+	HeapDefaultFree(pGotoLabelSchedule);
+
+	//With情報のメモリを解放
+	for(i3=0;i3<WithInfo.num;i3++){
+		SetError(22,"With",WithInfo.pWithCp[i3]);
+		HeapDefaultFree(WithInfo.ppName[i3]);
+	}
+	HeapDefaultFree(WithInfo.ppName);
+	HeapDefaultFree(WithInfo.pWithCp);
+
+	//push ebp
+	AllLocalVarSize+=sizeof(long);
+
+	//ローカルオブジェクトの解放処理
+	obj_LexScopes.CallDestructorsOfScopeEnd();
+
+	//プロシージャ抜け出しスケジュール（Exit Sub/Function）
+	for(i3=0;i3<ExitSubScheduleNum;i3++){
+		*((long *)(OpBuffer+pExitSubSchedule[i3]))=obp-(pExitSubSchedule[i3]+sizeof(long));
+	}
+	HeapDefaultFree(pExitSubSchedule);
+
+	if(bDebugCompile&&bDebugSupportProc==0){
+		*((long *)(OpBuffer+EspOffsetSchedule))=AllLocalVarSize-BaseOffset-sizeof(long);
+
+		//call _DebugSys_EndProc
+		extern UserProc *pSub_DebugSys_EndProc;
+		op_call(pSub_DebugSys_EndProc);
+	}
+
+	if( !pUserProc->ReturnType().IsNull() ){
+		//戻り値をeax、edxに設定
+		RELATIVE_VAR RelativeVar;
+
+		const char *temp = pUserProc->GetName().c_str();
+		if( temp[0]==1 && temp[1]==ESC_OPERATOR ){
+			temp="_System_ReturnValue";
+		}
+		GetVarOffsetReadWrite(temp,&RelativeVar,Type());
+
+		i3=pUserProc->ReturnType().GetBasicType();
+
+		if(i3==DEF_OBJECT || i3==DEF_STRUCT){
+			SetVarPtrToEax(&RelativeVar);
+			if( i3==DEF_OBJECT ){
+				//mov eax,dword ptr[eax]
+				op_mov_RM( sizeof(long), REG_EAX, REG_EAX, 0, MOD_BASE );
+			}
+		}
+		else if(i3==DEF_DOUBLE){
+			//fld qword ptr[ebp+offset]
+			OpBuffer[obp++]=(char)0xDD;
+			OpBuffer[obp++]=(char)0x85;
+			*((long *)(OpBuffer+obp))=RelativeVar.offset;
+			AddLocalVarAddrSchedule();
+			obp+=sizeof(long);
+		}
+		else if(i3==DEF_SINGLE){
+			//fld dword ptr[ebp+offset]
+			OpBuffer[obp++]=(char)0xD9;
+			OpBuffer[obp++]=(char)0x85;
+			*((long *)(OpBuffer+obp))=RelativeVar.offset;
+			AddLocalVarAddrSchedule();
+			obp+=sizeof(long);
+		}
+		else if(i3==DEF_INT64||i3==DEF_QWORD){
+			//mov eax,dword ptr[ebp+offset]
+			OpBuffer[obp++]=(char)0x8B;
+			OpBuffer[obp++]=(char)0x85;
+			*((long *)(OpBuffer+obp))=RelativeVar.offset;
+			AddLocalVarAddrSchedule();
+			obp+=sizeof(long);
+
+			//mov edx,dword ptr[ebp+offset+sizeof(long)]
+			OpBuffer[obp++]=(char)0x8B;
+			OpBuffer[obp++]=(char)0x95;
+			*((long *)(OpBuffer+obp))=RelativeVar.offset+sizeof(long);
+			AddLocalVarAddrSchedule();
+			obp+=sizeof(long);
+		}
+		else if(i3==DEF_LONG||i3==DEF_DWORD||
+			IsPtrType(i3)){
+			//mov eax,dword ptr[ebp+offset]
+			OpBuffer[obp++]=(char)0x8B;
+			OpBuffer[obp++]=(char)0x85;
+			*((long *)(OpBuffer+obp))=RelativeVar.offset;
+			AddLocalVarAddrSchedule();
+			obp+=sizeof(long);
+		}
+		else if(i3==DEF_INTEGER||i3==DEF_WORD || (isUnicode&&i3==DEF_CHAR)){
+			//xor eax,eax（eaxを0に初期化する）
+			op_zero_reg(REG_EAX);
+
+			//mov ax,word ptr[ebp+offset]
+			OpBuffer[obp++]=(char)0x66;
+			OpBuffer[obp++]=(char)0x8B;
+			OpBuffer[obp++]=(char)0x85;
+			*((long *)(OpBuffer+obp))=RelativeVar.offset;
+			AddLocalVarAddrSchedule();
+			obp+=sizeof(long);
+		}
+		else if(i3==DEF_SBYTE||i3==DEF_BYTE||i3==DEF_BOOLEAN || (isUnicode==false&&i3==DEF_CHAR)){
+			//xor eax,eax（eaxを0に初期化する）
+			op_zero_reg(REG_EAX);
+
+			//mov al,byte ptr[ebp+offset]
+			OpBuffer[obp++]=(char)0x8A;
+			OpBuffer[obp++]=(char)0x85;
+			*((long *)(OpBuffer+obp))=RelativeVar.offset;
+			AddLocalVarAddrSchedule();
+			obp+=sizeof(long);
+		}
+	}
+
+	//ローカル変数アドレススケジュール
+	for(i3=0;i3<LocalVarAddrScheduleNum;i3++){
+		*((long *)(OpBuffer+pLocalVarAddrSchedule[i3]))+=AllLocalVarSize;
+	}
+	HeapDefaultFree(pLocalVarAddrSchedule);
+	foreach( Variable *pVar, pUserProc->localVars ){
+		//後にデバッグで利用する
+		pVar->offset = AllLocalVarSize - pVar->offset;
+	}
+
+	//push ebp、ret用のアドレスを考慮
+	AllLocalVarSize-=sizeof(long)*2;
+
+	//ローカル変数用メモリを確保するためのスケジュール（subコマンド）
+	*((long *)(OpBuffer+LocalVarSchedule))=AllLocalVarSize-BaseOffset;
+
+	//pop edi
+	OpBuffer[obp++]=(char)0x5F;
+
+	//pop esi
+	OpBuffer[obp++]=(char)0x5E;
+
+	//pop ebx
+	op_pop(REG_EBX);
+
+	if(bDebugCompile){
+		//cmp esp,ebp
+		op_cmp_RR( REG_ESP, REG_EBP );
+
+		//jz 6（次のcallとbreakpointを飛び越す）
+		OpBuffer[obp++]=(char)0x74;
+		OpBuffer[obp++]=(char)0x06;
+
+		//call _esp_error
+		extern UserProc *pSub_esp_error;
+		op_call( pSub_esp_error );
+
+		breakpoint;
+	}
+
+	//mov esp,ebp
+	OpBuffer[obp++]=(char)0x8B;
+	OpBuffer[obp++]=(char)0xE5;
+
+	//pop ebp
+	op_pop(REG_EBP);
+
+	//add esp AllLocalVarSize
+	op_add_esp(AllLocalVarSize-BaseOffset);
+
+	if( BaseOffset==0 || pUserProc->IsCdecl() ){
+		//ret
+		op_ret();
+	}
+	else{
+		//ret BaseOffset（パラメータ分のスタック領域を解放）
+		OpBuffer[obp++]=(char)0xC2;
+		*((_int16 *)(OpBuffer+obp))=(_int16)BaseOffset;
+		obp+=sizeof(_int16);
+	}
+
+
+	pUserProc->endOpAddress=obp;
+
+
+	//重複エラー情報管理のメモリを解放
+	for(i3=0;i3<SynonymErrorNum;i3++) HeapDefaultFree(SynonymErrorWords[i3]);
+	HeapDefaultFree(SynonymErrorWords);
+	SynonymErrorWords=0;
+
+
+	//ローカル変数のネーム情報は後に解放する
+}
+
+void CompileBufferInProcedure( UserProc &userProc ){
+	if( userProc.IsUsing() == false || userProc.IsCompiled() ) return;
+
+	_compile_proc( &userProc );
+/*
+	// ログを履く
+	char temporary[8192];
+	temporary[0]=0;
+	lstrcat( temporary, "------------------------------------------------------------------\n" );
+	sprintf( temporary + lstrlen(temporary), "【 %s のコード情報】\n", userProc.GetFullName().c_str() );
+	sprintf( temporary + lstrlen(temporary), "code size: %d bytes\n", userProc.GetCodeSize() );
+	lstrcat( temporary, "------------------------------------------------------------------\n" );
+	lstrcat( temporary, "\n" );
+	Smoothie::Logger::Put( temporary );*/
+}
+void CompileLocal(){
+	extern GlobalProc **ppSubHash;
+	int i2;
+
+	extern BOOL bDll;
+	if(bDll){
+		//DLLの場合はグローバル変数を初期化するための関数を一番初めにコンパイルする
+		UserProc *pUserProc=GetSubHash("_System_InitDllGlobalVariables");
+		if(pUserProc){
+			CompileBufferInProcedure( *pUserProc );
+		}
+		else SetError(300,NULL,cp);
+	}
+
+	//_System_TypeBase_InitializeUserTypesは一番最後にコンパイル
+	extern UserProc *pSubStaticMethod_System_TypeBase_InitializeUserTypes;
+	pSubStaticMethod_System_TypeBase_InitializeUserTypes->CompleteCompile();
+
+	//_System_InitStaticLocalVariablesは一番最後にコンパイル
+	//※一般関数内の静的変数オブジェクトをすべて収集しなければならない
+	extern UserProc *pSub_System_InitStaticLocalVariables;
+	pSub_System_InitStaticLocalVariables->CompleteCompile();
+
+	//_System_Call_Destructor_of_GlobalObjectは一番最後にコンパイル
+	extern UserProc *pSub_System_Call_Destructor_of_GlobalObject;
+	pSub_System_Call_Destructor_of_GlobalObject->CompleteCompile();
+
+repeat:
+	GlobalProc *pGlobalProc;
+	for(i2=0;i2<MAX_HASH;i2++){
+		pGlobalProc=ppSubHash[i2];
+		while(pGlobalProc){
+			CompileBufferInProcedure( *pGlobalProc );
+			pGlobalProc=pGlobalProc->pNextData;
+		}
+	}
+
+	if( IsNeedProcCompile() ){
+		//プロシージャコンパイルによって、プロシージャコンパイルが必要になる場合
+		goto repeat;
+	}
+
+	//_System_TypeBase_InitializeUserTypesは最後のほうでコンパイル
+	pSubStaticMethod_System_TypeBase_InitializeUserTypes->KillCompileStatus();
+	CompileBufferInProcedure( *pSubStaticMethod_System_TypeBase_InitializeUserTypes );
+
+	if( IsNeedProcCompile() ){
+		//プロシージャコンパイルによって、プロシージャコンパイルが必要になる場合
+		for(i2=0;i2<MAX_HASH;i2++){
+			pGlobalProc=ppSubHash[i2];
+			while(pGlobalProc){
+				CompileBufferInProcedure( *pGlobalProc );
+				pGlobalProc=pGlobalProc->pNextData;
+			}
+		}
+	}
+
+	//_System_InitStaticLocalVariablesは一番最後にコンパイル
+	pSub_System_InitStaticLocalVariables->KillCompileStatus();
+	CompileBufferInProcedure( *pSub_System_InitStaticLocalVariables );
+
+	//_System_Call_Destructor_of_GlobalObjectは一番最後にコンパイル
+	pSub_System_Call_Destructor_of_GlobalObject->KillCompileStatus();
+	CompileBufferInProcedure( *pSub_System_Call_Destructor_of_GlobalObject );
+}
Index: /trunk/abdev/BasicCompiler32/Compile_Set_Var.cpp
===================================================================
--- /trunk/abdev/BasicCompiler32/Compile_Set_Var.cpp	(revision 148)
+++ /trunk/abdev/BasicCompiler32/Compile_Set_Var.cpp	(revision 148)
@@ -0,0 +1,386 @@
+#include "../BasicCompiler_Common/common.h"
+#include "Opcode.h"
+
+BOOL IsUse_ecx(RELATIVE_VAR *pRelativeVar){
+	if(pRelativeVar->bOffsetOffset||pRelativeVar->dwKind==VAR_DIRECTMEM) return 1;
+	return 0;
+}
+
+void SetStructVariable( const Type &varType, const Type &calcType, BOOL bUseHeap){
+	if( calcType.IsStruct() ){
+		if( varType.GetClass().IsEquals( &calcType.GetClass() ) ){			//等しい
+
+				//双方のオブジェクト型が一致、または派生・継承関係にあるとき
+				//※コピーを行う
+
+				int object_size = varType.GetClass().GetSize();
+
+				//mov ecx,object_size
+				op_mov_RV(REG_ECX,object_size);
+
+				//pop esi
+				op_pop(REG_ESI);
+
+				//pop edi
+				op_pop(REG_EDI);
+
+				if(bUseHeap){
+					//mov eax,esi
+					op_mov_RR(REG_EAX,REG_ESI);
+				}
+
+				//rep movs byte ptr[edi],byte ptr[esi]
+				op_rep_movs(sizeof(BYTE));
+
+				if(bUseHeap){
+					//push eax
+					op_push(REG_EAX);
+
+					//call free
+					extern UserProc *pSub_free;
+					op_call(pSub_free);
+				}
+
+				return;
+		}
+	}
+
+	SetError(1,NULL,cp);
+}
+
+
+void SetRealVariable(int VarType,int CalcType,RELATIVE_VAR *pRelativeVar){
+	if( !IsRealNumberType( CalcType ) ){
+		// 実数へ変換
+		// 64bit edx:eax -> st(0)
+		// 32bit     eax -> st(0)
+
+		if( Is64Type( CalcType ) ){
+			//64ビット整数型
+
+			//push edx
+			op_push( REG_EDX );
+
+			//push eax
+			op_push( REG_EAX );
+
+			//fild qword ptr[esp]
+			op_fld_ptr_esp(DEF_INT64);
+
+			//pop
+			op_pop( REG_NON );
+
+			//pop
+			op_pop( REG_NON );
+		}
+		else{
+			//push eax
+			op_push( REG_EAX );
+
+			//fild qword ptr[esp]
+			op_fld_ptr_esp(DEF_LONG);
+
+			//pop
+			op_pop( REG_NON );
+		}
+	}
+
+	if(pRelativeVar->dwKind==VAR_GLOBAL){
+		if(pRelativeVar->bOffsetOffset){
+			//fstp ptr[ecx+offset]
+			op_fstp_base_offset(VarType,REG_ECX,(int)pRelativeVar->offset);
+			obp-=sizeof(long);
+			pobj_GlobalVarSchedule->add();
+			obp+=sizeof(long);
+		}
+		else{
+			//mov ecx,offset
+			op_mov_RV(REG_ECX,(int)pRelativeVar->offset);
+			obp-=sizeof(long);
+			pobj_GlobalVarSchedule->add();
+			obp+=sizeof(long);
+
+			//fstp ptr[ecx]
+			op_fstp_basereg(VarType,REG_ECX);
+		}
+	}
+	else if(pRelativeVar->dwKind==VAR_REFGLOBAL){
+		if(pRelativeVar->bOffsetOffset){
+			//add ecx,qword ptr[offset]
+			op_add_RM(sizeof(long),REG_ECX,REG_NON,(int)pRelativeVar->offset,MOD_DISP32);
+		}
+		else{
+			//mov ecx,qword ptr[offset]
+			op_mov_RM(sizeof(long),REG_ECX,REG_NON,(int)pRelativeVar->offset,MOD_DISP32);
+		}
+		obp-=sizeof(long);
+		pobj_GlobalVarSchedule->add();
+		obp+=sizeof(long);
+
+		goto directmem;
+	}
+	else if(pRelativeVar->dwKind==VAR_LOCAL){
+		if(pRelativeVar->bOffsetOffset){
+			//fstp ptr[ebp+ecx+offset]
+			op_fstp_base_offset_ex(VarType,REG_EBP,REG_ECX,(int)pRelativeVar->offset,USE_OFFSET);
+		}
+		else{
+			//fstp ptr[ebp+offset]
+			op_fstp_base_offset(VarType,REG_EBP,(int)pRelativeVar->offset);
+		}
+		obp-=sizeof(long);
+		AddLocalVarAddrSchedule();
+		obp+=sizeof(long);
+	}
+	else if(pRelativeVar->dwKind==VAR_REFLOCAL){
+		if(pRelativeVar->bOffsetOffset){
+			//add ecx,qword ptr[ebp+offset]
+			op_add_RM(sizeof(long),REG_ECX,REG_EBP,(int)pRelativeVar->offset,MOD_BASE_DISP32);
+		}
+		else{
+			//mov ecx,qword ptr[ebp+offset]
+			op_mov_RM(sizeof(long),REG_ECX,REG_EBP,(int)pRelativeVar->offset,MOD_BASE_DISP32);
+		}
+		obp-=sizeof(long);
+		AddLocalVarAddrSchedule();
+		obp+=sizeof(long);
+
+		goto directmem;
+	}
+	else if(pRelativeVar->dwKind==VAR_DIRECTMEM){
+directmem:
+		//fstp ptr[ecx]
+		op_fstp_basereg(VarType,REG_ECX);
+	}
+}
+
+void SetBooleanVariable(int type,RELATIVE_VAR *pRelative){
+	if(type==DEF_DOUBLE){
+		// TODO: 実装
+		SetError();
+	}
+	else if(type==DEF_SINGLE){
+		// TODO: 実装
+		SetError();
+	}
+	else if(type==DEF_INT64||type==DEF_QWORD){
+		//cmp eax,0
+		op_cmp_value(GetTypeSize(type,-1),REG_EAX,0);
+
+		//setne al
+		op_setne( REG_EAX );
+
+		//cmp edx,0
+		op_cmp_value(GetTypeSize(type,-1),REG_EDX,0);
+
+		//setne cl
+		op_setne( REG_ECX );
+
+		//or al,cl
+		op_or_RR( sizeof( _int8 ), REG_EAX, REG_ECX );
+	}
+	else{
+		if(!IsWholeNumberType(type)){
+			//不正な型の場合
+			SetError(9,NULL,cp);
+			return;
+		}
+	}
+
+	//cmp eax,0
+	op_cmp_value(GetTypeSize(type,-1),REG_EAX,0);
+
+	//setne al
+	op_setne( REG_EAX );
+
+	SetWholeVariable( sizeof(char), DEF_BYTE, pRelative );
+}
+
+void ExtendTypeTo32(int type,int reg);
+void ExtendTypeTo64(int type){
+	if(Is64Type(type)) return;
+
+	ExtendTypeTo32(type,REG_EAX);
+
+	if(IsSignedType(type)){
+		//cdq
+		op_cdq();
+	}
+	else{
+		//xor edx,edx
+		op_zero_reg(REG_EDX);
+	}
+}
+void ExtendTypeTo32(int type,int reg){
+	if(type==DEF_INTEGER || (isUnicode&&type==DEF_CHAR)){
+		//movsx reg32,reg16
+		op_movsx_R32R16(reg,reg);
+	}
+	else if(type==DEF_WORD){
+		//and reg,0000FFFFh
+		op_and_RV(reg,(int)0x0000FFFF);
+	}
+	else if(type==DEF_SBYTE || (isUnicode==false&&type==DEF_CHAR)){
+		//movsx reg32,reg8
+		op_movsx_R32R8(reg,reg);
+	}
+	else if(type==DEF_BYTE||type==DEF_BOOLEAN){
+		//and reg,000000FFh
+		op_and_RV(reg,(int)0xFF);
+	}
+}
+void ExtendTypeTo16(int type,int reg){
+	if(type==DEF_SBYTE || (isUnicode==false&&type==DEF_CHAR)){
+		//movsx reg16,reg8
+		op_movsx_R16R8(reg,reg);
+	}
+	else if(type==DEF_BYTE||type==DEF_BOOLEAN){
+		//and reg,000000FFh
+		op_and_RV(reg,(int)0xFF);
+	}
+}
+
+void SetWholeVariable(int varSize,int calcType,RELATIVE_VAR *pRelative){
+	if( IsRealNumberType( calcType ) ){
+		// 実数型から整数型へ変換する
+
+		if( varSize == sizeof(_int64) ){
+			// 64bitへ
+			// st(0) -> edx:eax
+			breakpoint;
+
+			//push
+			//push
+			op_sub_esp( PTR_SIZE * 2 );
+
+			//fistp qword ptr[esp]
+			op_fistp_ptr_esp( sizeof(_int64) );
+
+			//pop eax
+			op_pop( REG_EAX );
+
+			//pop edx
+			op_pop( REG_EDX );
+		}
+		else{
+			// 32bit
+			// st(0) -> eax
+
+			//push
+			op_push( REG_NON );
+
+			//fistp dword ptr[esp]
+			op_fistp_ptr_esp( sizeof(long) );
+
+			//pop eax
+			op_pop( REG_EAX );
+		}
+	}
+	else{
+		//その他の整数
+
+		if(varSize==sizeof(_int64)){
+			//eaxの値を64ビット（edx:eax）に拡張する
+			ExtendTypeTo64(calcType);
+		}
+		else if(varSize==sizeof(long)){
+			//レジスタの値を32ビット（eax）に拡張する
+			ExtendTypeTo32(calcType,REG_EAX);
+		}
+		else if(varSize==sizeof(short)){
+			//レジスタの値を16ビット（ax）に拡張する
+			ExtendTypeTo16(calcType,REG_EAX);
+		}
+		//8ビットは拡張なし
+	}
+
+	if(varSize==sizeof(_int64)){
+		//下位32ビット
+		SetWholeVariable(sizeof(long),DEF_LONG,pRelative);
+
+		//上位32ビット
+
+		//直接参照に切り替え
+		SetVarPtrToEax(pRelative);
+		pRelative->dwKind=VAR_DIRECTMEM;
+
+		//mov ecx,eax
+		op_mov_RR( REG_ECX, REG_EAX );
+
+		//add ecx,sizeof(long)
+		op_add_RV8( REG_ECX, sizeof(long) );
+
+		//mov eax,edx
+		op_mov_RR( REG_EAX, REG_EDX );
+
+		SetWholeVariable(sizeof(long),DEF_LONG,pRelative);
+
+		return;
+	}
+
+	if(pRelative->dwKind==VAR_GLOBAL){
+		if(pRelative->bOffsetOffset){
+			//mov ptr[ecx+offset],eax/ax/al
+			op_mov_MR(varSize,REG_EAX,REG_ECX,(int)pRelative->offset,MOD_BASE_DISP32);
+		}
+		else{
+			//mov ptr[offset],eax/ax/al
+			op_mov_MR(varSize,REG_EAX,0,(int)pRelative->offset,MOD_DISP32);
+		}
+		obp-=sizeof(long);
+		pobj_GlobalVarSchedule->add();
+		obp+=sizeof(long);
+	}
+	else if(pRelative->dwKind==VAR_REFGLOBAL){
+		// 今は使われていない
+		SetError();
+
+		if(pRelative->bOffsetOffset){
+			//add ecx,qword ptr[offset]
+			op_add_RM(varSize,REG_ECX,REG_NON,(int)pRelative->offset,MOD_DISP32);
+		}
+		else{
+			//mov ecx,qword ptr[offset]
+			op_mov_RM(varSize,REG_ECX,REG_NON,(int)pRelative->offset,MOD_DISP32);
+		}
+		obp-=sizeof(long);
+		pobj_GlobalVarSchedule->add();
+		obp+=sizeof(long);
+
+		goto directmem;
+	}
+	else if(pRelative->dwKind==VAR_LOCAL){
+		if(pRelative->bOffsetOffset){
+			//mov ptr[ebp+ecx+offset],eax/ax/al
+			op_mov_MR_ex(varSize,REG_EAX,REG_EBP,REG_ECX,(int)pRelative->offset,USE_OFFSET);
+		}
+		else{
+			//mov ptr[ebp+offset],eax/ax/al
+			op_mov_MR(varSize,REG_EAX,REG_EBP,(int)pRelative->offset,MOD_BASE_DISP32);
+		}
+		obp-=sizeof(long);
+		AddLocalVarAddrSchedule();
+		obp+=sizeof(long);
+	}
+	else if(pRelative->dwKind==VAR_REFLOCAL){
+		if(pRelative->bOffsetOffset){
+			//add ecx,ptr[ebp+offset]
+			op_add_RM(PTR_SIZE,REG_ECX,REG_EBP,(int)pRelative->offset,MOD_BASE_DISP32);
+		}
+		else{
+			//mov ecx,ptr[ebp+offset]
+			op_mov_RM(PTR_SIZE,REG_ECX,REG_EBP,(int)pRelative->offset,MOD_BASE_DISP32);
+		}
+		obp-=sizeof(long);
+		AddLocalVarAddrSchedule();
+		obp+=sizeof(long);
+
+		goto directmem;
+	}
+	else if(pRelative->dwKind==VAR_DIRECTMEM){
+directmem:
+
+		//mov ptr[ecx],eax/ax/al
+		op_mov_MR(varSize,REG_EAX,REG_ECX,0,MOD_BASE);
+	}
+}
Index: /trunk/abdev/BasicCompiler32/Compile_Statement.cpp
===================================================================
--- /trunk/abdev/BasicCompiler32/Compile_Statement.cpp	(revision 148)
+++ /trunk/abdev/BasicCompiler32/Compile_Statement.cpp	(revision 148)
@@ -0,0 +1,1475 @@
+#include "../BasicCompiler_Common/common.h"
+#include "Opcode.h"
+
+void OpcodeOthers( const char *Command ){
+	int i,i2;
+	UserProc *pUserProc;
+
+	char leftTerm[8192];
+	int lastParePos = 0;
+	for(i=0;;i++){
+		if(Command[i]=='\"'){
+			//ダブルクォートは不正なのでエラー扱い
+			leftTerm[i]=0;
+			SetError(3,leftTerm,cp);
+			return;
+		}
+
+		if(Command[i]=='('){
+			lastParePos = i;
+			i2=GetStringInPare(leftTerm+i,Command+i);
+			i+=i2-1;
+			continue;
+		}
+		if(Command[i]=='['){
+			i2=GetStringInBracket(leftTerm+i,Command+i);
+			i+=i2-1;
+			continue;
+		}
+		if(Command[i]=='\0'){
+			leftTerm[i] = 0;
+			break;
+		}
+
+		if( IsNumCalcMark( Command, i ) ){
+			leftTerm[i] = 0;
+			break;
+		}
+
+		leftTerm[i]=Command[i];
+	}
+	if(!(
+		IsVariableTopChar(leftTerm[0])||
+		leftTerm[0]=='.'||
+		(leftTerm[0]==1&&leftTerm[1]==ESC_PSMEM)
+		)){
+		SetError(1,NULL,cp);
+		return;
+	}
+
+
+	if(Command[i]=='\0' && lastParePos == 0){
+		//////////////////////////////
+		// パラメータ無しのマクロ検索
+		//////////////////////////////
+
+		pUserProc=GetSubHash(Command);
+
+		//GetSubHash内でエラー提示が行われた場合
+		if(pUserProc==(UserProc *)-1) return;
+
+		if(pUserProc==0){
+			char temporary[VN_SIZE];
+			lstrcpy(temporary,Command);
+
+			CharUpper(temporary);
+			pUserProc=GetSubHash(temporary);
+
+			//GetSubHash内でエラー提示が行われた場合
+			if(pUserProc==(UserProc *)-1) return;
+		}
+
+		if(pUserProc){
+			if( !pUserProc->IsMacro() ){
+				SetError(10,Command,cp);
+			}
+
+			Opcode_CallProc("",pUserProc,0,"",0);
+
+			return;
+		}
+	}
+	else if(IsNumCalcMark(Command,i)){
+		//代入演算
+		OpcodeCalc(Command);
+		return;
+	}
+
+
+	Type resultType;
+	bool isLiteral;
+	BOOL bUseHeap;
+	bool result = TermOpe( leftTerm, Type(), resultType, isLiteral, &bUseHeap, false, NULL, true );
+	if( result ){
+
+		/////////////////////
+		// 戻り値の処理
+		/////////////////////
+
+		if( resultType.IsReal() ){
+			//fstp st(0)
+			OpBuffer[obp++]=(char)0xDD;
+			OpBuffer[obp++]=(char)0xD8;
+		}
+		else if( resultType.IsStruct() ){
+			//mov ebx,eax
+			op_mov_RR(REG_EBX,REG_EAX);
+
+			FreeTempObject(REG_EBX,&resultType.GetClass());
+		}
+
+		//成功
+		return;
+	}
+
+	// 失敗
+	SetError(1, NULL,cp);
+}
+
+void OpcodeIf(char *Parameter){
+	int i,i2,i3,i4;
+	Type tempType;
+
+	for(i=0;;i++){
+		if(Parameter[i]=='\0'){
+			SetError(21,NULL,cp);
+			return;
+		}
+		if(Parameter[i]==1&&Parameter[i+1]==ESC_THEN){
+			Parameter[i]=0;
+			break;
+		}
+	}
+
+	if( !NumOpe(Parameter,Type(),tempType) ){
+		//NumOpe内でエラー
+		i3=-1;	//ダミー
+	}
+	else if( tempType.IsDouble() ){
+		//fld qword ptr[esp]
+		op_fld_ptr_esp(DEF_DOUBLE);
+
+		//push 0
+		op_push_V(0);
+
+		//fild dword ptr[esp]
+		op_fld_ptr_esp(DEF_LONG);
+
+		//add esp,sizeof(double)+sizeof(long)
+		op_add_esp(sizeof(double)+sizeof(long));
+
+		//fcompp
+		OpBuffer[obp++]=(char)0xDE;
+		OpBuffer[obp++]=(char)0xD9;
+
+		//fnstsw ax
+		OpBuffer[obp++]=(char)0xDF;
+		OpBuffer[obp++]=(char)0xE0;
+
+		//test ah,40
+		OpBuffer[obp++]=(char)0xF6;
+		OpBuffer[obp++]=(char)0xC4;
+		OpBuffer[obp++]=(char)0x40;
+
+		//jne (endif、または else まで)
+		OpBuffer[obp++]=(char)0x0F;
+		OpBuffer[obp++]=(char)0x85;
+		obp+=sizeof(long);
+
+		//jneの番地
+		i3=obp;
+	}
+	else if( tempType.IsSingle() ){
+		//fld dword ptr[esp]
+		op_fld_ptr_esp(DEF_SINGLE);
+
+		//push 0
+		op_push_V(0);
+
+		//fild dword ptr[esp]
+		op_fld_ptr_esp(DEF_LONG);
+
+		//add esp,sizeof(float)+sizeof(long)
+		op_add_esp(sizeof(float)+sizeof(long));
+
+		//fcompp
+		OpBuffer[obp++]=(char)0xDE;
+		OpBuffer[obp++]=(char)0xD9;
+
+		//fnstsw ax
+		OpBuffer[obp++]=(char)0xDF;
+		OpBuffer[obp++]=(char)0xE0;
+
+		//test ah,40
+		OpBuffer[obp++]=(char)0xF6;
+		OpBuffer[obp++]=(char)0xC4;
+		OpBuffer[obp++]=(char)0x40;
+
+		//jne (endif、または else まで)
+		OpBuffer[obp++]=(char)0x0F;
+		OpBuffer[obp++]=(char)0x85;
+		obp+=sizeof(long);
+
+		//jneの番地
+		i3=obp;
+	}
+	else if( tempType.Is64() ){
+		//64ビット型
+
+		//pop eax
+		op_pop(REG_EAX);
+
+		//pop ebx
+		op_pop(REG_EBX);
+
+		//cmp eax,0
+		OpBuffer[obp++]=(char)0x83;
+		OpBuffer[obp++]=(char)0xF8;
+		OpBuffer[obp++]=(char)0x00;
+
+		//jne
+		OpBuffer[obp++]=(char)0x0F;
+		OpBuffer[obp++]=(char)0x85;
+		obp+=sizeof(long);
+		i3=obp;
+
+
+		//cmp ebx,0
+		OpBuffer[obp++]=(char)0x83;
+		OpBuffer[obp++]=(char)0xFB;
+		OpBuffer[obp++]=(char)0x00;
+
+		//jne
+		OpBuffer[obp++]=(char)0x0F;
+		OpBuffer[obp++]=(char)0x85;
+		obp+=sizeof(long);
+		i4=obp;
+
+
+
+		//jmp (endif、または else までジャンプ)
+		OpBuffer[obp++]=(char)0xE9;
+		obp+=sizeof(long);
+
+		*((long *)(OpBuffer+i3-sizeof(long)))=obp-i3;
+		*((long *)(OpBuffer+i4-sizeof(long)))=obp-i4;
+
+		//jmpの番地
+		i3=obp;
+	}
+	else{
+		//32ビット型
+
+		//pop eax
+		op_pop(REG_EAX);
+
+		//cmp eax,0
+		OpBuffer[obp++]=(char)0x83;
+		OpBuffer[obp++]=(char)0xF8;
+		OpBuffer[obp++]=(char)0x00;
+
+		//je (endif、または else まで条件ジャンプ)
+		OpBuffer[obp++]=(char)0x0F;
+		OpBuffer[obp++]=(char)0x84;
+		obp+=sizeof(long);
+
+		//jeの番地
+		i3=obp;
+	}
+
+
+	/////////////////////////
+	// If内をコード化
+	/////////////////////////
+
+	//レキシカルスコープをレベルアップ
+	obj_LexScopes.Start( obp, SCOPE_TYPE_IF );
+
+	i2=CompileBuffer(ESC_ENDIF,0);
+
+	//レキシカルスコープをレベルダウン
+	obj_LexScopes.End();
+
+
+	if(i3==-1) return;
+
+	if(i2==ESC_ELSE){
+		//jmp (endifまで)
+		OpBuffer[obp++]=(char)0xE9;
+		obp+=sizeof(long);
+
+		*((long *)(OpBuffer+i3-sizeof(long)))=obp-i3;	//ifからelseへのジャンプ先のオフセット値
+
+		i3=obp;
+
+
+		/////////////////////////
+		// Else内をコード化
+		/////////////////////////
+
+		//レキシカルスコープをレベルアップ
+		obj_LexScopes.Start( obp, SCOPE_TYPE_IF );
+
+		CompileBuffer(ESC_ENDIF,0);
+
+		//レキシカルスコープをレベルダウン
+		obj_LexScopes.End();
+
+
+		*((long *)(OpBuffer+i3-sizeof(long)))=obp-i3;	//jmpジャンプ先のオフセット値
+	}
+	else{
+		*((long *)(OpBuffer+i3-sizeof(long)))=obp-i3;	//jeジャンプ先のオフセット値
+	}
+}
+
+int GetLabelAddress(char *LabelName,int LineNum){
+	extern int MaxLabelNum;
+	extern LABEL *pLabelNames;
+	int i;
+
+	if(LabelName){
+		for(i=0;i<MaxLabelNum;i++){
+			if(pLabelNames[i].pName){
+				if(lstrcmp(LabelName,pLabelNames[i].pName)==0) return pLabelNames[i].address;
+			}
+		}
+	}
+	else{
+		for(i=0;i<MaxLabelNum;i++){
+			if(pLabelNames[i].pName==0){
+				if(LineNum==pLabelNames[i].line) return pLabelNames[i].address;
+			}
+		}
+	}
+	return -1;
+}
+void OpcodeGoto(char *Parameter){
+	extern HANDLE hHeap;
+	extern GOTOLABELSCHEDULE *pGotoLabelSchedule;
+	extern int GotoLabelScheduleNum;
+	int i,LineNum;
+
+	if(Parameter[0]=='*'){
+		i=GetLabelAddress(Parameter+1,0);
+
+		//jmp ...
+		OpBuffer[obp++]=(char)0xE9;
+		if(i==-1){
+			pGotoLabelSchedule=(GOTOLABELSCHEDULE *)HeapReAlloc(hHeap,0,pGotoLabelSchedule,(GotoLabelScheduleNum+1)*sizeof(GOTOLABELSCHEDULE));
+			pGotoLabelSchedule[GotoLabelScheduleNum].pName=(char *)HeapAlloc(hHeap,0,lstrlen(Parameter+1)+1);
+			lstrcpy(pGotoLabelSchedule[GotoLabelScheduleNum].pName,Parameter+1);
+			pGotoLabelSchedule[GotoLabelScheduleNum].pos=obp;
+			pGotoLabelSchedule[GotoLabelScheduleNum].now_cp=cp;
+			GotoLabelScheduleNum++;
+		}
+		*((long *)(OpBuffer+obp))=i-(obp+sizeof(long));
+		obp+=sizeof(long);
+	}
+	else{
+		LineNum=atoi(Parameter);
+		i=GetLabelAddress(0,LineNum);
+
+		//jmp ...
+		OpBuffer[obp++]=(char)0xE9;
+		if(i==-1){
+			pGotoLabelSchedule=(GOTOLABELSCHEDULE *)HeapReAlloc(hHeap,0,pGotoLabelSchedule,(GotoLabelScheduleNum+1)*sizeof(GOTOLABELSCHEDULE));
+			pGotoLabelSchedule[GotoLabelScheduleNum].pName=0;
+			pGotoLabelSchedule[GotoLabelScheduleNum].line=LineNum;
+			pGotoLabelSchedule[GotoLabelScheduleNum].pos=obp;
+			pGotoLabelSchedule[GotoLabelScheduleNum].now_cp=cp;
+			GotoLabelScheduleNum++;
+		}
+		*((long *)(OpBuffer+obp))=i-(obp+sizeof(long));
+		obp+=sizeof(long);
+	}
+}
+void OpcodeWhile(char *Parameter){
+	extern HANDLE hHeap;
+	int i2,i3 = 0;
+
+	//Continueアドレスのバックアップとセット
+	extern DWORD dwContinueAddress;
+	DWORD dwTempContinue;
+	dwTempContinue=dwContinueAddress;
+	dwContinueAddress=obp;
+
+	if(!Parameter[0]) SetError(10,"While",cp);
+
+	int je_schedule;
+	Type tempType;
+	if( !NumOpe(Parameter,Type(),tempType) ){
+		//ダミー
+		i3=-1;
+	}
+	else if( tempType.IsDouble() ){
+		//fld qword ptr[esp]
+		op_fld_ptr_esp(DEF_DOUBLE);
+
+		//push 0
+		op_push_V(0);
+
+		//fild dword ptr[esp]
+		op_fld_ptr_esp(DEF_LONG);
+
+		//add esp,sizeof(double)+sizeof(long)
+		op_add_esp(sizeof(double)+sizeof(long));
+
+		//fcompp
+		OpBuffer[obp++]=(char)0xDE;
+		OpBuffer[obp++]=(char)0xD9;
+
+		//fnstsw ax
+		OpBuffer[obp++]=(char)0xDF;
+		OpBuffer[obp++]=(char)0xE0;
+
+		//test ah,40
+		OpBuffer[obp++]=(char)0xF6;
+		OpBuffer[obp++]=(char)0xC4;
+		OpBuffer[obp++]=(char)0x40;
+
+		//jne (Wend まで)
+		OpBuffer[obp++]=(char)0x0F;
+		OpBuffer[obp++]=(char)0x85;
+		obp+=sizeof(long);
+
+		//jeの番地
+		je_schedule=obp;
+	}
+	else if( tempType.IsSingle() ){
+		//fld dword ptr[esp]
+		op_fld_ptr_esp(DEF_SINGLE);
+
+		//push 0
+		op_push_V(0);
+
+		//fild dword ptr[esp]
+		op_fld_ptr_esp(DEF_LONG);
+
+		//add esp,sizeof(float)+sizeof(long)
+		op_add_esp(sizeof(float)+sizeof(long));
+
+		//fcompp
+		OpBuffer[obp++]=(char)0xDE;
+		OpBuffer[obp++]=(char)0xD9;
+
+		//fnstsw ax
+		OpBuffer[obp++]=(char)0xDF;
+		OpBuffer[obp++]=(char)0xE0;
+
+		//test ah,40
+		OpBuffer[obp++]=(char)0xF6;
+		OpBuffer[obp++]=(char)0xC4;
+		OpBuffer[obp++]=(char)0x40;
+
+		//jne (Wend まで)
+		OpBuffer[obp++]=(char)0x0F;
+		OpBuffer[obp++]=(char)0x85;
+		obp+=sizeof(long);
+
+		//jeの番地
+		je_schedule=obp;
+	}
+	else if( tempType.Is64() ){
+		//64ビット型
+
+		//pop eax
+		op_pop(REG_EAX);
+
+		//pop ebx
+		op_pop(REG_EBX);
+
+		//cmp eax,0
+		OpBuffer[obp++]=(char)0x83;
+		OpBuffer[obp++]=(char)0xF8;
+		OpBuffer[obp++]=(char)0x00;
+
+		//jne
+		OpBuffer[obp++]=(char)0x0F;
+		OpBuffer[obp++]=(char)0x85;
+		obp+=sizeof(long);
+		i2=obp;
+
+
+		//cmp ebx,0
+		OpBuffer[obp++]=(char)0x83;
+		OpBuffer[obp++]=(char)0xFB;
+		OpBuffer[obp++]=(char)0x00;
+
+		//jne
+		OpBuffer[obp++]=(char)0x0F;
+		OpBuffer[obp++]=(char)0x85;
+		obp+=sizeof(long);
+		i3=obp;
+
+
+		//jmp (endif、または else までジャンプ)
+		OpBuffer[obp++]=(char)0xE9;
+		obp+=sizeof(long);
+
+		*((long *)(OpBuffer+i2-sizeof(long)))=obp-i2;
+		*((long *)(OpBuffer+i3-sizeof(long)))=obp-i3;
+
+		//jmpの番地
+		je_schedule=obp;
+	}
+	else{
+		//その他整数型
+
+		//pop eax
+		op_pop(REG_EAX);
+
+		//cmp eax,0
+		OpBuffer[obp++]=(char)0x83;
+		OpBuffer[obp++]=(char)0xF8;
+		OpBuffer[obp++]=(char)0x00;
+
+		//je (Wend まで)
+		OpBuffer[obp++]=(char)0x0F;
+		OpBuffer[obp++]=(char)0x84;
+		obp+=sizeof(long);
+
+		//実行中の番地
+		je_schedule=obp;
+	}
+
+	//レキシカルスコープをレベルアップ
+	obj_LexScopes.Start( obp, SCOPE_TYPE_WHILE );
+
+	//While内をコンパイル
+	CompileBuffer(0,COM_WEND);
+
+	obj_LexScopes.CallDestructorsOfScopeEnd();
+
+	if( i3 == -1 ){
+		return;
+	}
+
+	//jmp ...
+	OpBuffer[obp++]=(char)0xE9;
+	*((long *)(OpBuffer+obp))=dwContinueAddress-(obp+sizeof(long));
+	obp+=sizeof(long);
+
+	//レキシカルスコープをレベルダウン
+	obj_LexScopes.End();
+
+	*((long *)(OpBuffer+je_schedule-sizeof(long)))=obp-je_schedule;	//jeジャンプ先のオフセット値
+
+	//Continueアドレスを復元
+	dwContinueAddress=dwTempContinue;
+}
+
+char szNextVariable[VN_SIZE];
+void OpcodeFor(char *Parameter){
+	extern HANDLE hHeap;
+	int i,i2,i3;
+	char temporary[VN_SIZE],variable[VN_SIZE],JudgeNum[VN_SIZE],StepNum[VN_SIZE];
+
+	//第１パラメータを取得
+	i=GetOneParameter(Parameter,0,temporary);
+	if(!Parameter[i]){
+		SetError(12,"For",cp);
+		goto ErrorStep;
+	}
+
+	for(i2=0;;i2++){
+		if(temporary[i2]=='='){
+			variable[i2]=0;
+
+			//カウンタ初期化
+			OpcodeCalc(temporary);
+			break;
+		}
+		if(temporary[i2]=='\0'){
+			SetError(12,"For",cp);
+			goto ErrorStep;
+		}
+		variable[i2]=temporary[i2];
+	}
+
+	//jmp ...
+	OpBuffer[obp++]=(char)0xE9;
+	i2=obp;
+	obp+=sizeof(long);
+
+	//Continueアドレスのバックアップとセット
+	extern DWORD dwContinueAddress;
+	DWORD dwTempContinue;
+	dwTempContinue=dwContinueAddress;
+	dwContinueAddress=obp;
+
+	//第２パラメータを取得（to～）
+	i=GetOneParameter(Parameter,i,JudgeNum);
+
+	//第３パラメータを取得（step～）
+	if(Parameter[i]){
+		i=GetOneParameter(Parameter,i,StepNum);
+		if(Parameter[i]) SetError(12,"For",cp);
+	}
+	else lstrcpy(StepNum,"1");
+
+	//カウンタを増加させる
+	sprintf(temporary,"%s=(%s)+(%s)",variable,variable,StepNum);
+	OpcodeCalc(temporary);
+
+	*((long *)(OpBuffer+i2))=obp-(i2+sizeof(long));
+
+	//増加か減少かを区別する
+	sprintf(temporary,"(%s)>=0",StepNum);
+	NumOpe(temporary,Type(),Type());
+
+	//pop eax
+	op_pop(REG_EAX);
+
+	//cmp eax,0
+	OpBuffer[obp++]=(char)0x83;
+	OpBuffer[obp++]=(char)0xF8;
+	OpBuffer[obp++]=(char)0x00;
+
+	//je [カウンタ減少の場合の判定]
+	OpBuffer[obp++]=(char)0x0F;
+	OpBuffer[obp++]=(char)0x84;
+	i2=obp;
+	obp+=sizeof(long);
+
+	//判定（カウンタ増加の場合）
+	sprintf(temporary,"%s<=(%s)",variable,JudgeNum);
+	NumOpe(temporary,Type(),Type());
+
+	//pop eax
+	op_pop(REG_EAX);
+
+	//jmp [カウンタ減少の場合の判定を飛び越す]
+	OpBuffer[obp++]=(char)0xE9;
+	i3=obp;
+	obp+=sizeof(long);
+
+	*((long *)(OpBuffer+i2))=obp-(i2+sizeof(long)); //jeジャンプ先のオフセット値
+
+	//判定（カウンタ減少の場合）
+	sprintf(temporary,"%s>=(%s)",variable,JudgeNum);
+	NumOpe(temporary,Type(),Type());
+
+	//pop eax
+	op_pop(REG_EAX);
+
+	*((long *)(OpBuffer+i3))=obp-(i3+sizeof(long)); //jmpジャンプ先のオフセット値
+
+	//cmp eax,0
+	OpBuffer[obp++]=(char)0x83;
+	OpBuffer[obp++]=(char)0xF8;
+	OpBuffer[obp++]=(char)0x00;
+
+ErrorStep:
+
+	//je ...
+	OpBuffer[obp++]=(char)0x0F;
+	OpBuffer[obp++]=(char)0x84;
+	int je_schedule=obp;
+	obp+=sizeof(long);
+
+	//レキシカルスコープをレベルアップ
+	obj_LexScopes.Start( obp, SCOPE_TYPE_FOR );
+
+	//For内をコンパイル
+	CompileBuffer(0,COM_NEXT);
+
+	obj_LexScopes.CallDestructorsOfScopeEnd();
+
+	if(szNextVariable[0]){
+		if(lstrcmp(szNextVariable,variable)!=0){
+			SetError(55,szNextVariable,cp);
+		}
+	}
+
+	//jmp ...
+	OpBuffer[obp++]=(char)0xE9;
+	*((long *)(OpBuffer+obp))=dwContinueAddress-(obp+sizeof(long));
+	obp+=sizeof(long);
+
+	//レキシカルスコープをレベルダウン
+	obj_LexScopes.End();
+
+	*((long *)(OpBuffer+je_schedule))=obp-(je_schedule+sizeof(long)); //jeジャンプ先のオフセット値
+
+	//Continueアドレスを復元
+	dwContinueAddress=dwTempContinue;
+}
+
+void OpcodeDo(char *Parameter){
+	extern HANDLE hHeap;
+	int i,i2,i3,i4;
+
+	if(Parameter[0]) SetError(10,"Do",cp);
+
+	//Continueアドレスのバックアップとセット
+	extern DWORD dwContinueAddress;
+	DWORD dwTempContinue;
+	dwTempContinue=dwContinueAddress;
+	dwContinueAddress=obp;
+
+	//レキシカルスコープをレベルアップ
+	obj_LexScopes.Start( obp, SCOPE_TYPE_DO );
+
+	//Do内をコンパイル
+	CompileBuffer(0,COM_LOOP);
+
+	obj_LexScopes.CallDestructorsOfScopeEnd();
+
+	extern char *basbuf;
+	char temporary[VN_SIZE];
+	for(i=cp-1;;i--){
+		if(IsCommandDelimitation(basbuf[i])){
+			i+=3;
+			if(!(basbuf[i]=='0'||basbuf[i]=='1')){
+				//無条件ループ
+				break;
+			}
+			i3=i;
+
+			for(i+=2,i2=0;;i++,i2++){
+				if(IsCommandDelimitation(basbuf[i])){
+					temporary[i2]=0;
+					break;
+				}
+				temporary[i2]=basbuf[i];
+			}
+
+			Type tempType;
+			NumOpe(temporary,Type(),tempType);
+
+			if( tempType.IsDouble() ){
+				//fld qword ptr[esp]
+				op_fld_ptr_esp(DEF_DOUBLE);
+
+				//push 0
+				op_push_V(0);
+
+				//fild dword ptr[esp]
+				op_fld_ptr_esp(DEF_LONG);
+
+				//add esp,sizeof(double)+sizeof(long)
+				op_add_esp(sizeof(double)+sizeof(long));
+
+				//fcompp
+				OpBuffer[obp++]=(char)0xDE;
+				OpBuffer[obp++]=(char)0xD9;
+
+				//fnstsw ax
+				OpBuffer[obp++]=(char)0xDF;
+				OpBuffer[obp++]=(char)0xE0;
+
+				//test ah,40
+				OpBuffer[obp++]=(char)0xF6;
+				OpBuffer[obp++]=(char)0xC4;
+				OpBuffer[obp++]=(char)0x40;
+
+				if(basbuf[i3]=='0'){
+					//While
+
+					//jne 5（ループ終了）
+					OpBuffer[obp++]=(char)0x75;
+					OpBuffer[obp++]=(char)0x05;
+				}
+				else if(basbuf[i3]=='1'){
+					//Until
+
+					//je 5（ループ終了）
+					OpBuffer[obp++]=(char)0x74;
+					OpBuffer[obp++]=(char)0x05;
+				}
+			}
+			else if( tempType.IsSingle() ){
+				//fld dword ptr[esp]
+				op_fld_ptr_esp(DEF_SINGLE);
+
+				//push 0
+				op_push_V(0);
+
+				//fild dword ptr[esp]
+				op_fld_ptr_esp(DEF_LONG);
+
+				//add esp,sizeof(float)+sizeof(long)
+				op_add_esp(sizeof(float)+sizeof(long));
+
+				//fcompp
+				OpBuffer[obp++]=(char)0xDE;
+				OpBuffer[obp++]=(char)0xD9;
+
+				//fnstsw ax
+				OpBuffer[obp++]=(char)0xDF;
+				OpBuffer[obp++]=(char)0xE0;
+
+				//test ah,40
+				OpBuffer[obp++]=(char)0xF6;
+				OpBuffer[obp++]=(char)0xC4;
+				OpBuffer[obp++]=(char)0x40;
+
+				if(basbuf[i3]=='0'){
+					//While
+
+					//jne 5（ループ終了）
+					OpBuffer[obp++]=(char)0x75;
+					OpBuffer[obp++]=(char)0x05;
+				}
+				else if(basbuf[i3]=='1'){
+					//Until
+
+					//je 5（ループ終了）
+					OpBuffer[obp++]=(char)0x74;
+					OpBuffer[obp++]=(char)0x05;
+				}
+			}
+			else if( tempType.Is64() ){
+				//64ビット型
+
+				//pop eax
+				op_pop(REG_EAX);
+
+				//pop ebx
+				op_pop(REG_EBX);
+
+				//cmp eax,0
+				OpBuffer[obp++]=(char)0x83;
+				OpBuffer[obp++]=(char)0xF8;
+				OpBuffer[obp++]=(char)0x00;
+
+				//jne
+				OpBuffer[obp++]=(char)0x0F;
+				OpBuffer[obp++]=(char)0x85;
+				obp+=sizeof(long);
+				i2=obp;
+
+
+				//cmp ebx,0
+				OpBuffer[obp++]=(char)0x83;
+				OpBuffer[obp++]=(char)0xFB;
+				OpBuffer[obp++]=(char)0x00;
+
+				//jne
+				OpBuffer[obp++]=(char)0x0F;
+				OpBuffer[obp++]=(char)0x85;
+				obp+=sizeof(long);
+				i4=obp;
+
+
+				if(basbuf[i3]=='0'){
+					//While
+
+					//jmp 5（ループ終了）
+					OpBuffer[obp++]=(char)0xEB;
+					OpBuffer[obp++]=(char)0x05;
+
+					*((long *)(OpBuffer+i2-sizeof(long)))=obp-i2;
+					*((long *)(OpBuffer+i4-sizeof(long)))=obp-i4;
+				}
+				else if(basbuf[i3]=='1'){
+					//Until
+
+					//jmp 2（ループを続ける）
+					OpBuffer[obp++]=(char)0xEB;
+					OpBuffer[obp++]=(char)0x02;
+
+					*((long *)(OpBuffer+i2-sizeof(long)))=obp-i2;
+					*((long *)(OpBuffer+i4-sizeof(long)))=obp-i4;
+
+					//jmp 5（ループ終了）
+					OpBuffer[obp++]=(char)0xEB;
+					OpBuffer[obp++]=(char)0x05;
+				}
+			}
+			else{
+				//pop eax
+				op_pop(REG_EAX);
+
+				//cmp eax,0
+				OpBuffer[obp++]=(char)0x83;
+				OpBuffer[obp++]=(char)0xF8;
+				OpBuffer[obp++]=(char)0x00;
+
+				if(basbuf[i3]=='0'){
+					//While
+
+					//je 5（ループ終了）
+					OpBuffer[obp++]=(char)0x74;
+					OpBuffer[obp++]=(char)0x05;
+				}
+				else if(basbuf[i3]=='1'){
+					//Until
+
+					//jne 5（ループ終了）
+					OpBuffer[obp++]=(char)0x75;
+					OpBuffer[obp++]=(char)0x05;
+				}
+			}
+			break;
+		}
+	}
+
+	//jmp ...
+	OpBuffer[obp++]=(char)0xE9;
+	*((long *)(OpBuffer+obp))=dwContinueAddress-(obp+sizeof(long));
+	obp+=sizeof(long);
+
+	//jmp ...
+	OpBuffer[obp++]=(char)0xE9;
+	int je_schedule=obp;
+	obp+=sizeof(long);
+
+	//レキシカルスコープをレベルダウン
+	obj_LexScopes.End();
+
+	*((long *)(OpBuffer+je_schedule))=obp-(je_schedule+sizeof(long)); //jmpジャンプ先のオフセット値
+
+
+	//Continueアドレスを復元
+	dwContinueAddress=dwTempContinue;
+}
+void OpcodeContinue(void){
+	extern DWORD dwContinueAddress;
+
+	if(dwContinueAddress==-1){
+		SetError(12,"Continue",cp);
+		return;
+	}
+
+	//jmp ...(Continue addr)
+	OpBuffer[obp++]=(char)0xE9;
+
+	*((long *)(OpBuffer+obp))=dwContinueAddress-(obp+sizeof(long));
+	obp+=sizeof(long);
+}
+
+void OpcodeExitSub(void){
+	extern DWORD *pExitSubSchedule;
+	extern int ExitSubScheduleNum;
+	extern HANDLE hHeap;
+
+	if( UserProc::IsGlobalAreaCompiling() ){
+		SetError(12,"Exit Sub/Function",cp);
+		return;
+	}
+
+	//未解放のローカルオブジェクトのデストラクタを呼び出す
+	obj_LexScopes.CallDestructorsOfReturn();
+
+	//jmp ...(End Sub/Function)
+	OpBuffer[obp++]=(char)0xE9;
+
+	pExitSubSchedule=(DWORD *)HeapReAlloc(hHeap,0,pExitSubSchedule,(ExitSubScheduleNum+1)*sizeof(DWORD));
+	pExitSubSchedule[ExitSubScheduleNum]=obp;
+	ExitSubScheduleNum++;
+
+	obp+=sizeof(long);
+}
+
+void AddCaseSchedule(void){
+	extern DWORD *pCaseSchedule;
+	extern int CaseScheduleNum;
+	extern HANDLE hHeap;
+
+	pCaseSchedule=(DWORD *)HeapReAlloc(hHeap,0,pCaseSchedule,(CaseScheduleNum+1)*sizeof(DWORD));
+	pCaseSchedule[CaseScheduleNum]=obp;
+	CaseScheduleNum++;
+}
+
+int CaseTypeSize;
+void OpcodeSelect(const char *lpszParms){
+	extern DWORD *pCaseSchedule;
+	extern int CaseScheduleNum;
+	extern int NowCaseSchedule;
+	extern int CaseTypeSize;
+	extern HANDLE hHeap;
+	extern char *basbuf;
+	int i,i2,i3,sw,NowCaseCp;
+	char temporary[VN_SIZE];
+
+	DWORD *temp_pCaseSchedule;
+	int temp_CaseScheduleNum;
+	int temp_NowCaseSchedule;
+	int temp_CaseTypeSize;
+
+	temp_pCaseSchedule=pCaseSchedule;
+	temp_CaseScheduleNum=CaseScheduleNum;
+	temp_NowCaseSchedule=NowCaseSchedule;
+	temp_CaseTypeSize=CaseTypeSize;
+	pCaseSchedule=(DWORD *)HeapAlloc(hHeap,0,1);
+	CaseScheduleNum=0;
+	NowCaseSchedule=0;
+
+	Type type1;
+	if( !NumOpe(lpszParms,Type(), type1 ) ){
+		return;
+	}
+
+	CaseTypeSize = type1.GetSize();
+	if( CaseTypeSize < sizeof(long) ){
+		CaseTypeSize=sizeof(long);
+	}
+
+	for(i=cp,sw=0;;i++){
+		if(basbuf[i]=='\0'){
+			HeapDefaultFree(pCaseSchedule);
+			pCaseSchedule=temp_pCaseSchedule;
+			CaseScheduleNum=temp_CaseScheduleNum;
+			NowCaseSchedule=temp_NowCaseSchedule;
+			CaseTypeSize=temp_CaseTypeSize;
+			SetError(22,"Select",cp);
+			return;
+		}
+		if(basbuf[i]==1&&basbuf[i+1]==ESC_SELECTCASE){
+			for(i2=0;;i++){
+				if(basbuf[i]==1&&basbuf[i+1]==ESC_SELECTCASE) i2++;
+				if(basbuf[i]==1&&basbuf[i+1]==ESC_ENDSELECT){
+					i2--;
+					if(i2==0) break;
+				}
+			}
+			continue;
+		}
+		if(basbuf[i]==1&&basbuf[i+1]==ESC_ENDSELECT){
+			if(sw==0){
+				//add esp,CaseTypeSize
+				op_add_esp(CaseTypeSize);
+			}
+			break;
+		}
+		if(basbuf[i]==1&&basbuf[i+1]==ESC_CASE){
+			NowCaseCp=i;
+
+			i++;
+			while(1){
+				for(i++,i2=0;;i++,i2++){
+					if(basbuf[i]=='\"'){
+						i3=GetStringInQuotation(temporary+i2,basbuf+i);
+						i+=i3-1;
+						i2+=i3-1;
+						continue;
+					}
+					if(basbuf[i]=='('){
+						i3=GetStringInPare(temporary+i2,basbuf+i);
+						i+=i3-1;
+						i2+=i3-1;
+						continue;
+					}
+					if(basbuf[i]=='['){
+						i3=GetStringInBracket(temporary+i2,basbuf+i);
+						i+=i3-1;
+						i2+=i3-1;
+						continue;
+					}
+
+					if(IsCommandDelimitation(basbuf[i])){
+						temporary[i2]=0;
+						break;
+					}
+					if(basbuf[i]==','){
+						temporary[i2]=0;
+						break;
+					}
+
+					temporary[i2]=basbuf[i];
+				}
+
+				//エラー用
+				i2=cp;
+				cp=NowCaseCp;
+
+				Type type2;
+				if( !NumOpe(temporary,type1,type2) ){
+					return;
+				}
+
+				cp=i2;
+
+				if(type1.IsObject()){
+					std::vector<UserProc *> subs;
+					type1.GetClass().GetMethods().Enum( CALC_EQUAL, subs );
+					if( subs.size() == 0 ){
+						return;
+					}
+
+					Parameters params;
+					params.push_back( new Parameter( "", Type( type2 ) ) );
+
+					//オーバーロードを解決
+					UserProc *pUserProc;
+					pUserProc=OverloadSolution("==",subs, params, NULL);
+
+					delete params[0];
+
+					if(!pUserProc){
+						//エラー
+						return;
+					}
+
+
+					//pop edx
+					op_pop(REG_EDX);
+
+					//mov ecx,dword ptr[esp]
+					op_mov_RM(sizeof(long),REG_ECX,REG_ESP,0,MOD_BASE);
+
+					//push edx
+					op_push(REG_EDX);
+
+					//push ecx
+					op_push(REG_ECX);
+
+					//call operator_proc	※ ==演算子
+					op_call(pUserProc);
+
+					//test eax,eax
+					op_test(REG_EAX,REG_EAX);
+
+					//jne ...
+					OpBuffer[obp++]=(char)0x0F;
+					OpBuffer[obp++]=(char)0x85;
+					AddCaseSchedule();
+					obp+=sizeof(long);
+				}
+				else if(type1.IsDouble()){
+					ChangeTypeToDouble(type2.GetBasicType());
+
+					//fld qword ptr[esp]
+					op_fld_ptr_esp(DEF_DOUBLE);
+
+					//add esp,CaseTypeSize
+					op_add_esp(CaseTypeSize);
+
+					//fld qword ptr[esp]
+					op_fld_ptr_esp(DEF_DOUBLE);
+
+					//fcompp
+					OpBuffer[obp++]=(char)0xDE;
+					OpBuffer[obp++]=(char)0xD9;
+
+					//fnstsw ax
+					OpBuffer[obp++]=(char)0xDF;
+					OpBuffer[obp++]=(char)0xE0;
+
+					//test ah,40
+					OpBuffer[obp++]=(char)0xF6;
+					OpBuffer[obp++]=(char)0xC4;
+					OpBuffer[obp++]=(char)0x40;
+
+					//jne ...
+					OpBuffer[obp++]=(char)0x0F;
+					OpBuffer[obp++]=(char)0x85;
+					AddCaseSchedule();
+					obp+=sizeof(long);
+				}
+				else if(type1.IsSingle()){
+					ChangeTypeToSingle(type2.GetBasicType());
+
+					//fld dword ptr[esp]
+					op_fld_ptr_esp(DEF_SINGLE);
+
+					//add esp,CaseTypeSize
+					op_add_esp(CaseTypeSize);
+
+					//fld dword ptr[esp]
+					op_fld_ptr_esp(DEF_SINGLE);
+
+					//fcompp
+					OpBuffer[obp++]=(char)0xDE;
+					OpBuffer[obp++]=(char)0xD9;
+
+					//fnstsw ax
+					OpBuffer[obp++]=(char)0xDF;
+					OpBuffer[obp++]=(char)0xE0;
+
+					//test ah,40
+					OpBuffer[obp++]=(char)0xF6;
+					OpBuffer[obp++]=(char)0xC4;
+					OpBuffer[obp++]=(char)0x40;
+
+					//jne ...
+					OpBuffer[obp++]=(char)0x0F;
+					OpBuffer[obp++]=(char)0x85;
+					AddCaseSchedule();
+					obp+=sizeof(long);
+				}
+				else{
+					//その他整数型
+
+					//pop ebx
+					op_pop(REG_EBX);
+
+					//mov eax,dword ptr[esp]
+					OpBuffer[obp++]=(char)0x8B;
+					OpBuffer[obp++]=(char)0x04;
+					OpBuffer[obp++]=(char)0x24;
+
+					//cmp eax,ebx
+					OpBuffer[obp++]=(char)0x3B;
+					OpBuffer[obp++]=(char)0xC3;
+
+					//je ...
+					OpBuffer[obp++]=(char)0x0F;
+					OpBuffer[obp++]=(char)0x84;
+					AddCaseSchedule();
+					obp+=sizeof(long);
+				}
+
+				if(basbuf[i]!=',') break;
+			}
+		}
+		if(basbuf[i]==1&&basbuf[i+1]==ESC_CASEELSE){
+			sw=1;
+
+			//jmp ...
+			OpBuffer[obp++]=(char)0xE9;
+			AddCaseSchedule();
+			obp+=sizeof(long);
+		}
+	}
+
+	//レキシカルスコープをレベルアップ
+	obj_LexScopes.Start( obp, SCOPE_TYPE_SELECT );
+
+	//Select Case内をコンパイル
+	CompileBuffer(ESC_ENDSELECT,0);
+
+	//jmp EndSelect
+	OpBuffer[obp++]=(char)0xE9;
+	AddCaseSchedule();
+	obp+=sizeof(long);
+
+	//最終スケジュール
+	for(i=NowCaseSchedule;i<CaseScheduleNum;i++){
+		*(long *)(OpBuffer+pCaseSchedule[i])=obp-(pCaseSchedule[i]+sizeof(long));
+	}
+	HeapDefaultFree(pCaseSchedule);
+
+	//レキシカルスコープをレベルダウン
+	obj_LexScopes.End();
+
+	pCaseSchedule=temp_pCaseSchedule;
+	CaseScheduleNum=temp_CaseScheduleNum;
+	NowCaseSchedule=temp_NowCaseSchedule;
+	CaseTypeSize=temp_CaseTypeSize;
+}
+void OpcodeCase(char *Parameter){
+	extern DWORD *pCaseSchedule;
+	extern int NowCaseSchedule;
+	extern int CaseTypeSize;
+	int i;
+
+	if(!pCaseSchedule){
+		SetError(30,"Case",cp);
+		return;
+	}
+
+	//jmp EndSelect
+	OpBuffer[obp++]=(char)0xE9;
+	AddCaseSchedule();
+	obp+=sizeof(long);
+
+	i=0;
+	while(1){
+		//Caseスケジュール
+		*(long *)(OpBuffer+pCaseSchedule[NowCaseSchedule])=obp-(pCaseSchedule[NowCaseSchedule]+sizeof(long));
+		NowCaseSchedule++;
+
+		i=JumpOneParameter(Parameter,i);
+		if(Parameter[i]=='\0') break;
+	}
+
+	//add esp,CaseTypeSize
+	op_add_esp(CaseTypeSize);
+}
+
+void OpcodeGosub(char *Parameter){
+	extern HANDLE hHeap;
+	extern GOTOLABELSCHEDULE *pGotoLabelSchedule;
+	extern int GotoLabelScheduleNum;
+	int i,LineNum;
+
+	if(Parameter[0]=='*'){
+		i=GetLabelAddress(Parameter+1,0);
+
+		//call ...
+		OpBuffer[obp++]=(char)0xE8;
+		if(i==-1){
+			pGotoLabelSchedule=(GOTOLABELSCHEDULE *)HeapReAlloc(hHeap,0,pGotoLabelSchedule,(GotoLabelScheduleNum+1)*sizeof(GOTOLABELSCHEDULE));
+			pGotoLabelSchedule[GotoLabelScheduleNum].pName=(char *)HeapAlloc(hHeap,0,lstrlen(Parameter+1)+1);
+			lstrcpy(pGotoLabelSchedule[GotoLabelScheduleNum].pName,Parameter+1);
+			pGotoLabelSchedule[GotoLabelScheduleNum].pos=obp;
+			pGotoLabelSchedule[GotoLabelScheduleNum].now_cp=cp;
+			GotoLabelScheduleNum++;
+		}
+		*((long *)(OpBuffer+obp))=i-(obp+sizeof(long));
+		obp+=sizeof(long);
+	}
+	else{
+		LineNum=atoi(Parameter);
+		i=GetLabelAddress(0,LineNum);
+
+		//call ...
+		OpBuffer[obp++]=(char)0xE8;
+		if(i==-1){
+			pGotoLabelSchedule=(GOTOLABELSCHEDULE *)HeapReAlloc(hHeap,0,pGotoLabelSchedule,(GotoLabelScheduleNum+1)*sizeof(GOTOLABELSCHEDULE));
+			pGotoLabelSchedule[GotoLabelScheduleNum].pName=0;
+			pGotoLabelSchedule[GotoLabelScheduleNum].line=LineNum;
+			pGotoLabelSchedule[GotoLabelScheduleNum].pos=obp;
+			pGotoLabelSchedule[GotoLabelScheduleNum].now_cp=cp;
+			GotoLabelScheduleNum++;
+		}
+		*((long *)(OpBuffer+obp))=i-(obp+sizeof(long));
+		obp+=sizeof(long);
+	}
+}
+void OpcodeReturn(char *Parameter){
+	if( UserProc::IsGlobalAreaCompiling() ){
+		//Gosub～Returnとして扱う
+
+		//ret
+		op_ret();
+	}
+	else{
+		//戻り値をセット
+		if(Parameter[0]){
+			UserProc &proc = UserProc::CompilingUserProc();
+
+			const char *temp = "_System_ReturnValue";
+			if(proc.GetName()[0]==1&&proc.GetName()[1]==ESC_OPERATOR)
+			{
+			}
+			else{
+				temp=proc.GetName().c_str();
+			}
+
+			char temporary[VN_SIZE];
+			sprintf(temporary,"%s=%s",temp,Parameter);
+			OpcodeCalc(temporary);
+		}
+
+		//プロシージャを抜け出す（C言語のreturnと同様の処理を行う）
+		OpcodeExitSub();
+	}
+}
+
+
+////////////
+// ポインタ
+
+void OpcodeSetPtrData(char *Parameter,int type){
+	int i;
+	char temporary[VN_SIZE];
+
+	if(Parameter[0]=='('){
+		i=JumpStringInPare(Parameter,1);
+		if(Parameter[i+1]=='\0'){
+			for(i=0;;i++){
+				Parameter[i]=Parameter[i+1];
+				if(Parameter[i]=='\0') break;
+			}
+			Parameter[i-1]=0;
+		}
+	}
+
+	//第１パラメータを取得
+	i=GetOneParameter(Parameter,0,temporary);
+	if(!Parameter[i]){
+		SetError(1,NULL,cp);
+		return;
+	}
+
+	Type resultType;
+	if( !NumOpe(temporary,Type(),resultType) ){
+		return;
+	}
+	if(!resultType.IsWhole()){
+		SetError(11,Parameter,cp);
+		return;
+	}
+
+	ChangeTypeToLong( resultType.GetBasicType() );
+
+	//第２パラメータを取得
+	i=GetOneParameter(Parameter,i,temporary);
+	if(Parameter[i]){
+		SetError(1,NULL,cp);
+		return;
+	}
+
+	if( !NumOpe(temporary,Type(),resultType) ){
+		return;
+	}
+
+	if(type==DEF_DOUBLE){
+		ChangeTypeToDouble_ToFpuReg( resultType.GetBasicType() );
+
+		//pop eax
+		op_pop(REG_EAX);
+
+		//fstp qword ptr[eax]
+		OpBuffer[obp++]=(char)0xDD;
+		OpBuffer[obp++]=(char)0x18;
+	}
+	else if(type==DEF_SINGLE){
+		ChangeTypeToSingle( resultType.GetBasicType() );
+
+		//pop ebx
+		op_pop(REG_EBX);
+
+		//pop eax
+		op_pop(REG_EAX);
+
+		//mov dword ptr[eax],ebx
+		OpBuffer[obp++]=(char)0x89;
+		OpBuffer[obp++]=(char)0x18;
+	}
+	else if(type==DEF_QWORD){
+		ChangeTypeToInt64( resultType.GetBasicType() );
+
+		//pop ecx
+		op_pop(REG_ECX);
+
+		//pop ebx
+		op_pop(REG_EBX);
+
+		//pop eax
+		op_pop(REG_EAX);
+
+		//mov dword ptr[eax],ecx
+		OpBuffer[obp++]=(char)0x89;
+		OpBuffer[obp++]=(char)0x08;
+
+		//mov dword ptr[eax+sizeof(long)],ebx
+		OpBuffer[obp++]=(char)0x89;
+		OpBuffer[obp++]=(char)0x58;
+		OpBuffer[obp++]=(char)0x04;
+	}
+	else if(type==DEF_DWORD){
+		ChangeTypeToLong( resultType.GetBasicType() );
+
+		//pop ebx
+		op_pop(REG_EBX);
+
+		//pop eax
+		op_pop(REG_EAX);
+
+		//mov dword ptr[eax],ebx
+		OpBuffer[obp++]=(char)0x89;
+		OpBuffer[obp++]=(char)0x18;
+	}
+	else if(type==DEF_WORD){
+		ChangeTypeToLong( resultType.GetBasicType() );
+
+		//pop ebx
+		op_pop(REG_EBX);
+
+		//pop eax
+		op_pop(REG_EAX);
+
+		//mov word ptr[eax],bx
+		OpBuffer[obp++]=(char)0x66;
+		OpBuffer[obp++]=(char)0x89;
+		OpBuffer[obp++]=(char)0x18;
+	}
+	else if(type==DEF_BYTE){
+		ChangeTypeToLong( resultType.GetBasicType() );
+
+		//pop ebx
+		op_pop(REG_EBX);
+
+		//pop eax
+		op_pop(REG_EAX);
+
+		//mov byte ptr[eax],bl
+		OpBuffer[obp++]=(char)0x88;
+		OpBuffer[obp++]=(char)0x18;
+	}
+}
Index: /trunk/abdev/BasicCompiler32/Compile_Var.cpp
===================================================================
--- /trunk/abdev/BasicCompiler32/Compile_Var.cpp	(revision 148)
+++ /trunk/abdev/BasicCompiler32/Compile_Var.cpp	(revision 148)
@@ -0,0 +1,1368 @@
+#include "../BasicCompiler_Common/common.h"
+#include "Opcode.h"
+
+//変数
+Variables globalVars;
+int AllGlobalVarSize;
+int AllInitGlobalVarSize;
+
+int AllLocalVarSize;
+
+
+void SetRelativeOffset( Type &resultType, RELATIVE_VAR *pRelativeVar,const char *lpPtrOffset){
+	PushLongVariable(pRelativeVar);
+
+	Type type;
+	NumOpe( lpPtrOffset, Type(), type );
+	ChangeTypeToLong( type.GetBasicType() );
+
+	//pop ebx
+	op_pop(REG_EBX);
+
+	if( resultType.PtrLevel() ){
+		resultType.PtrLevelDown();
+
+		int typeSize = resultType.GetSize();
+		if(typeSize>=2){
+			//imul ebx,i2
+			op_imul_RV( REG_EBX, typeSize );
+		}
+	}
+	else{
+		//エラー
+		SetError(1,NULL,cp);
+		return;
+	}
+
+	//pop ecx
+	op_pop(REG_ECX);
+
+	//add ecx,ebx
+	OpBuffer[obp++]=(char)0x03;
+	OpBuffer[obp++]=(char)0xCB;
+}
+void SetRelativeOffset( RELATIVE_VAR &relativeVar ){
+	if(relativeVar.dwKind==VAR_DIRECTMEM){
+		//mov ecx,dword ptr[ecx]
+		op_mov_RM( sizeof(long), REG_ECX, REG_ECX, 0, MOD_BASE );
+	}
+	else{
+		//直接参照に切り替え
+		SetVarPtrToEax(&relativeVar);
+		relativeVar.dwKind=VAR_DIRECTMEM;
+
+		//mov ecx,dword ptr[eax]
+		op_mov_RM( sizeof(long), REG_ECX, REG_EAX, 0, MOD_BASE );
+	}
+}
+bool GetArrayOffset(const int *SubScripts,char *array, const Type &type){
+	extern HANDLE hHeap;
+	int i,i2,i3,i4;
+	char temporary[VN_SIZE],*pParm[MAX_PARMS];
+
+	for(i=0,i2=0,i3=0;;i++,i2++){
+		if(array[i]=='('){
+			i4=GetStringInPare(temporary+i2,array+i);
+			i+=i4-1;
+			i2+=i4-1;
+			continue;
+		}
+		if(array[i]=='['){
+			i4=GetStringInBracket(temporary+i2,array+i);
+			i+=i4-1;
+			i2+=i4-1;
+			continue;
+		}
+		if(array[i]==','||array[i]=='\0'){
+			if(SubScripts[i3]==-1){
+				for(i3--;i3>=0;i3--) HeapDefaultFree(pParm[i3]);
+				return 0;
+			}
+
+			temporary[i2]=0;
+
+			pParm[i3]=(char *)HeapAlloc(hHeap,0,lstrlen(temporary)+1);
+			lstrcpy(pParm[i3],temporary);
+
+			i3++;
+
+			if(array[i]=='\0'){
+				if(SubScripts[i3]!=-1){
+					for(i3--;i3>=0;i3--) HeapDefaultFree(pParm[i3]);
+					return 0;
+				}
+				break;
+			}
+
+			i2=-1;
+			continue;
+		}
+		temporary[i2]=array[i];
+	}
+
+	//push ecx
+	op_push(REG_ECX);
+
+	//push 0
+	op_push_V(0);
+
+	for(i=i3-1;i>=0;i--){
+		Type tempType;
+		BOOL bUseHeap;
+		NumOpe( pParm[i], Type( DEF_LONG ), tempType, &bUseHeap );
+		if( tempType.IsObject() ){
+			//キャスト演算子のオーバーロードに対応する
+			CallCastOperatorProc(
+				tempType,
+				bUseHeap, Type(DEF_LONG) );
+			tempType.SetBasicType( DEF_LONG );
+		}
+		ChangeTypeToLong( tempType.GetBasicType() );
+
+		//pop eax
+		op_pop(REG_EAX);
+
+		for(i2=i+1,i4=1;i2<i3;i2++) i4*=SubScripts[i2]+1;
+
+		//imul eax,i4
+		OpBuffer[obp++]=(char)0x69;
+		OpBuffer[obp++]=(char)0xC0;
+		*((long *)(OpBuffer+obp))=i4;
+		obp+=sizeof(long);
+
+		//add dword ptr[esp],eax
+		OpBuffer[obp++]=(char)0x01;
+		OpBuffer[obp++]=(char)0x04;
+		OpBuffer[obp++]=(char)0x24;
+
+		HeapDefaultFree(pParm[i]);
+	}
+
+	//pop eax
+	op_pop(REG_EAX);
+
+	//imul eax,TypeSize
+	OpBuffer[obp++]=(char)0x69;
+	OpBuffer[obp++]=(char)0xC0;
+	*((long *)(OpBuffer+obp)) = type.GetSize();
+	obp+=sizeof(long);
+
+	//pop ecx
+	op_pop(REG_ECX);
+
+	//add ecx,eax
+	OpBuffer[obp++]=(char)0x03;
+	OpBuffer[obp++]=(char)0xC8;
+
+	return 1;
+}
+bool _member_offset(bool isErrorEnabled, bool isWriteAccess, const CClass &objClass, const char *member, RELATIVE_VAR *pRelativeVar, Type &resultType, BOOL bPrivateAccess){
+
+	//////////////////////////////////////
+	// クラス、配列の構成要素を解析する
+	//////////////////////////////////////
+
+	char VarName[VN_SIZE];		//変数名
+	char array[VN_SIZE];		//第1次配列
+	char lpPtrOffset[VN_SIZE];	//第2次配列
+	char NestMember[VN_SIZE];	//入れ子メンバ
+	CClass::RefType refType;
+	lstrcpy(VarName,member);
+	if(!GetVarFormatString(VarName,array,lpPtrOffset,NestMember,refType)) return false;
+
+
+	////////////////////////////
+	// メンバオフセットを取得
+	////////////////////////////
+
+	int memberIndex;
+	int offset = objClass.GetMemberOffset( VarName, &memberIndex );
+	if(memberIndex==objClass.GetDynamicMembers().size()){
+		if(isErrorEnabled) SetError(103,VarName,cp);
+		return false;
+	}
+
+	CMember *pMember=objClass.GetDynamicMembers()[memberIndex];
+
+
+	//アクセシビリティをチェック
+	if(&objClass==pobj_CompilingClass){
+		//同一クラスオブジェクトの場合はプライベートアクセスを容認する
+		if(pMember->IsNoneAccess()){
+			if(isErrorEnabled) SetError(107,VarName,cp);
+			return false;
+		}
+	}
+	else{
+		if((bPrivateAccess==0&&pMember->IsPrivate())||
+			pMember->IsNoneAccess()){
+			if(isErrorEnabled) SetError(107,VarName,cp);
+			return false;
+		}
+		else if(bPrivateAccess==0&&pMember->IsProtected()){
+			if(isErrorEnabled) SetError(108,VarName,cp);
+			return false;
+		}
+	}
+
+	//Const定義の場合は書き込みアクセスを制限する
+	//※コンストラクタをコンパイル中の場合は例外的に許可する
+	if( pMember->IsConst() &&		//定数メンバである
+		isWriteAccess &&							//書き込みアクセスを要求されている
+		objClass.IsCompilingConstructor() == false	//コンストラクタ コンパイル中を除く
+		){
+			//Const定義の変数に書き込みアクセスをしようとした場合
+			SetError(61,VarName,cp);
+	}
+
+	resultType = pMember->GetType();
+
+	//ポインタ変数の場合
+	if( resultType.IsPointer() ){
+		if(pMember->SubScripts[0]==-1){
+			lstrcpy(lpPtrOffset,array);
+			array[0]=0;
+		}
+	}
+	else{
+		if(lpPtrOffset[0]){
+			if(isErrorEnabled) SetError(16,member,cp);
+			return false;
+		}
+	}
+
+	if(offset){
+		//add ecx,offset
+		OpBuffer[obp++]=(char)0x81;
+		OpBuffer[obp++]=(char)0xC1;
+		*((long *)(OpBuffer+obp))=offset;
+		obp+=sizeof(long);
+	}
+
+	if(array[0]){
+		//配列オフセット
+		if(!GetArrayOffset(pMember->SubScripts,array,pMember->GetType())){
+			if(isErrorEnabled) SetError(14,member,cp);
+		}
+	}
+	else if(pMember->SubScripts[0]!=-1){
+		resultType.SetBasicType( resultType.GetBasicType() | FLAG_PTR );
+	}
+
+	if(NestMember[0]){
+		//入れ子構造の場合
+
+		if( resultType.IsObject() || resultType.IsStruct() ){
+			if( refType != CClass::Dot ){
+				if(isErrorEnabled) SetError(104,member,cp);
+				return false;
+			}
+
+			if( resultType.IsObject() ){
+				// 参照内容へのポインタを抽出
+				SetRelativeOffset( *pRelativeVar );
+			}
+		}
+		else if( resultType.IsObjectPtr() || resultType.IsStructPtr() ){
+			//構造体ポインタ型メンバ変数
+
+			if(lpPtrOffset[0]){
+				//pObj[n].member
+				if( ( resultType.IsObjectPtr() || resultType.IsStructPtr() )
+					&& refType != CClass::Dot ){
+						if(isErrorEnabled) SetError(104,member,cp);
+						return false;
+				}
+
+				//直接参照に切り替え
+				SetRelativeOffset(resultType,pRelativeVar,lpPtrOffset);
+				pRelativeVar->dwKind=VAR_DIRECTMEM;
+
+				lpPtrOffset[0]=0;
+			}
+			else{
+				//pObj->member
+				if( ( resultType.IsObjectPtr() || resultType.IsStructPtr() )
+					&& refType != CClass::Pointer ){
+						if(isErrorEnabled) SetError(104,member,cp);
+						return false;
+				}
+
+				SetRelativeOffset( *pRelativeVar );
+			}
+		}
+		else if( resultType.GetBasicType() == MAKE_PTR_TYPE(DEF_OBJECT,2)
+			|| resultType.GetBasicType() == MAKE_PTR_TYPE(DEF_STRUCT,2)){
+			//構造体ポインタのポインタ型メンバ変数
+
+			if(lpPtrOffset[0]){
+				//ppObj[n]->member
+				if( refType != CClass::Pointer ){
+					if(isErrorEnabled) SetError(104,member,cp);
+					return false;
+				}
+
+				//直接参照に切り替え
+				SetRelativeOffset(resultType,pRelativeVar,lpPtrOffset);
+				pRelativeVar->dwKind=VAR_DIRECTMEM;
+
+				lpPtrOffset[0]=0;
+
+				//mov ecx,dword ptr[ecx]
+				OpBuffer[obp++]=(char)0x8B;
+				OpBuffer[obp++]=(char)0x09;
+			}
+			else{
+				if(isErrorEnabled) SetError(104,member,cp);
+				return false;
+			}
+		}
+
+		if(!_member_offset(
+			isErrorEnabled,
+			isWriteAccess,
+			pMember->GetType().GetClass(),
+			NestMember,
+			pRelativeVar,
+			resultType,
+			0)) return false;
+	}
+
+	if(lpPtrOffset[0]){
+		SetRelativeOffset(resultType,pRelativeVar,lpPtrOffset);
+		pRelativeVar->dwKind=VAR_DIRECTMEM;
+	}
+
+	return true;
+}
+
+int LocalVar_ThisPtrOffset;
+void SetThisPtrToReg(int reg){
+	//自身のオブジェクトのThisポインタをregにコピー
+
+	RELATIVE_VAR RelativeVar;
+	RelativeVar.dwKind=VAR_LOCAL;
+	RelativeVar.bOffsetOffset=0;
+	RelativeVar.offset=-LocalVar_ThisPtrOffset;
+
+	SetReg_WholeVariable(DEF_PTR_VOID,&RelativeVar,reg);
+}
+
+bool GetVarOffset(bool isErrorEnabled,bool isWriteAccess,const char *NameBuffer,RELATIVE_VAR *pRelativeVar,Type &resultType,int *pss){
+	char variable[VN_SIZE];
+
+	if(NameBuffer[0]=='.'){
+		GetWithName(variable);
+		lstrcat(variable,NameBuffer);
+	}
+	else lstrcpy(variable,NameBuffer);
+
+	// 名前空間を分離
+	char namespaceStr[VN_SIZE]="", simpleName[VN_SIZE];
+	Smoothie::Meta::namespaceScopesCollection.SplitNamespace( variable, namespaceStr, simpleName );
+
+	// 先頭オブジェクトまたはクラス名と入れ子メンバに分割
+	CClass::RefType refType;
+	char member[VN_SIZE],array[VN_SIZE],lpPtrOffset[VN_SIZE];
+	GetVarFormatString(simpleName,array,lpPtrOffset,member,refType);
+
+	// 名前空間を分離していた場合は結合
+	char VarName[VN_SIZE];
+	if( namespaceStr[0] ){
+		sprintf( VarName, "%s.%s", namespaceStr, simpleName );
+	}
+	else{
+		lstrcpy( VarName, simpleName );
+	}
+
+	const int *pSubScripts;
+	bool bConst = false;
+
+
+	if( UserProc::IsLocalAreaCompiling() ){
+		//////////////////
+		// ローカル変数
+		//////////////////
+
+		const Variable *pVar = UserProc::CompilingUserProc().localVars.BackSearch( Symbol( VarName ) );
+		if( pVar ){
+			//ポインタ変数の場合
+			if( pVar->IsPointer() ){
+				if( !pVar->IsArray() ){
+					lstrcpy(lpPtrOffset,array);
+					array[0]=0;
+				}
+			}
+			else{
+				if(lpPtrOffset[0]){
+					SetError(16,variable,cp);
+					pRelativeVar->dwKind=NON_VAR;
+					return false;
+				}
+			}
+
+			pRelativeVar->offset=-pVar->offset;
+			pRelativeVar->bOffsetOffset=0;
+			if( pVar->IsRef() ){
+				// 参照型
+				pRelativeVar->dwKind = VAR_REFLOCAL;
+			}
+			else pRelativeVar->dwKind=VAR_LOCAL;
+			resultType = *pVar;
+			pSubScripts=pVar->GetSubScriptsPtr();
+			bConst = pVar->IsConst();
+
+			goto ok;
+		}
+	}
+
+	if(pobj_CompilingClass){
+		//////////////////////
+		// クラスメンバの参照
+		//////////////////////
+
+		if(lstrcmpi(variable,"This")==0){
+			//Thisオブジェクト
+
+			//Thisポインタをecxにコピー
+			SetThisPtrToReg(REG_ECX);
+
+			pRelativeVar->dwKind=VAR_DIRECTMEM;
+
+			resultType.SetType( DEF_OBJECT, pobj_CompilingClass );
+			return true;
+		}
+
+		if(memicmp(variable,"This.",5)==0){
+			//Thisオブジェクトのメンバを参照するとき
+			SlideString(variable+5,-5);
+			lstrcpy(VarName,variable);
+		}
+		else{
+			//クラス内メンバを参照するとき（通常）
+
+			bool isFound = false;
+			BOOST_FOREACH( CMember *pMember, pobj_CompilingClass->GetDynamicMembers() ){
+				if( pMember->GetName() == VarName ){
+					isFound = true;
+					break;
+				}
+			}
+			if( !isFound ) goto NonClassMember;
+		}
+
+		//Const修飾子のメソッド内でメンバ書き込みアクセスが発生したとき
+		//（コンストラクタ、デストラクタ内を除く）
+		const CMethod *pMethod = pobj_DBClass->GetNowCompilingMethodInfo();
+		if( isWriteAccess &&
+			pMethod->IsConst() &&
+			pobj_CompilingClass->IsCompilingConstructor() == false &&
+			pobj_CompilingClass->IsCompilingDestructor() == false
+			){
+				SetError(131, NULL, cp );
+		}
+
+		/////////////////////////////
+		// thisポインタをecxにセット
+
+		//Thisポインタをecxにコピー
+		SetThisPtrToReg(REG_ECX);
+
+		pRelativeVar->dwKind=VAR_DIRECTMEM;
+		if(!_member_offset(
+			isErrorEnabled,
+			isWriteAccess,
+			*pobj_CompilingClass,
+			variable,
+			pRelativeVar,
+			resultType,1)) return false;
+		return true;
+	}
+
+NonClassMember:
+
+	{
+		const Variable *pVar;
+
+		//////////////////////////
+		// 静的ローカル変数
+		// ※"Static.Object.Method.Variable"
+		//////////////////////////
+
+		char temporary[VN_SIZE];
+		if( UserProc::IsLocalAreaCompiling() ){
+			GetNowStaticVarFullName(VarName,temporary);
+
+			pVar = globalVars.Find( Symbol( temporary ) );
+			if( pVar ){
+				goto GlobalOk;
+			}
+		}
+
+
+		//////////////////////////
+		// クラスの静的メンバ
+		//////////////////////////
+
+		if(member[0]){
+			lstrcpy(temporary,member);
+
+			// TODO: 名前空間を考慮したコードになっていない
+
+			char tempMember[VN_SIZE];
+			char tempArray[VN_SIZE];
+			{
+				CClass::RefType refType;
+				GetVarFormatString(temporary,tempArray,lpPtrOffset,tempMember, refType );
+			}
+
+			int typeDefIndex = Smoothie::Meta::typeDefs.GetIndex( VarName );
+			if( typeDefIndex != -1 ){
+				// TypeDef後の型名だったとき
+				lstrcpy( VarName, Smoothie::Meta::typeDefs[typeDefIndex].GetBaseName().c_str() );
+			}
+
+			char temp2[VN_SIZE];
+			sprintf(temp2,"%s.%s",VarName,temporary);
+			pVar = globalVars.Find( Symbol( temp2 ) );
+			if( pVar ){
+				lstrcpy(member,tempMember);
+				lstrcpy(array,tempArray);
+				goto GlobalOk;
+			}
+		}
+
+		if(pobj_CompilingClass){
+			//自身のクラスから静的メンバを参照する場合
+			char temp2[VN_SIZE];
+			sprintf(temp2,"%s.%s",pobj_CompilingClass->GetName().c_str(),VarName);
+			pVar = globalVars.Find( Symbol( temp2 ) );
+			if( pVar ){
+				goto GlobalOk;
+			}
+		}
+
+		/////////////////////
+		// グローバル変数
+		/////////////////////
+
+		pVar = globalVars.BackSearch( Symbol( VarName ) );
+		if( pVar ){
+			goto GlobalOk;
+		}
+
+		if(isErrorEnabled) SetError(3,variable,cp);
+		pRelativeVar->dwKind=NON_VAR;
+		return false;
+
+
+
+GlobalOk:
+		//ポインタ変数の場合
+		if( pVar->IsPointer() ){
+			if( !pVar->IsArray() ){
+				lstrcpy(lpPtrOffset,array);
+				array[0]=0;
+			}
+		}
+		else{
+			if(lpPtrOffset[0]){
+				SetError(16,variable,cp);
+				pRelativeVar->dwKind=NON_VAR;
+				return false;
+			}
+		}
+
+		pRelativeVar->offset=pVar->offset;
+		pRelativeVar->bOffsetOffset=0;
+		if( pVar->IsRef() ){
+			// 参照型
+			pRelativeVar->dwKind = VAR_REFGLOBAL;
+		}
+		else pRelativeVar->dwKind=VAR_GLOBAL;
+		resultType = *pVar;
+		pSubScripts=pVar->GetSubScriptsPtr();
+		bConst = pVar->IsConst();
+	}
+
+
+
+ok:
+
+	if( bConst && isWriteAccess ){
+		//Const定義の変数に書き込みアクセスをしようとした場合
+		if( resultType.IsObject() ){
+			//オブジェクト定数
+			SetError(130, VarName, cp );
+		}
+		else{
+			//一般のConst変数
+			SetError(61,VarName,cp);
+		}
+	}
+
+	if(array[0]==0&&pSubScripts[0]!=-1){
+		//配列の先頭ポインタを示す場合
+		resultType.SetBasicType( resultType.GetBasicType() | FLAG_PTR );
+		if(pss) memcpy(pss,pSubScripts,MAX_ARRAYDIM);
+		return true;
+	}
+
+	if(array[0]||member[0]){
+		//xor ecx,ecx（ecxを0に初期化する）
+		//※ecxは変数ベースアドレスからの相対オフセットを示す
+		op_zero_reg(REG_ECX);
+
+		pRelativeVar->bOffsetOffset=1;
+	}
+	if(array[0]){
+		if(!GetArrayOffset(pSubScripts,array,resultType)){
+			SetError(14,variable,cp);
+			pRelativeVar->dwKind=NON_VAR;
+			return false;
+		}
+	}
+	if(member[0]){
+		if( resultType.IsObject() || resultType.IsStruct() ){
+			//実態オブジェクトのメンバを参照（obj.member）
+			if( refType != CClass::Dot ){
+				SetError(104,VarName,cp);
+				pRelativeVar->dwKind=NON_VAR;
+				return false;
+			}
+
+			if( resultType.IsObject() ){
+				// 参照内容へのポインタを抽出
+				SetRelativeOffset( *pRelativeVar );
+			}
+		}
+		else if( resultType.IsObjectPtr() || resultType.IsStructPtr() ){
+			//ポインタオブジェクトが示すメンバを参照
+			if(lpPtrOffset[0]){
+				//pObj[n].member
+				if( refType != CClass::Dot ){
+					SetError(104,VarName,cp);
+					pRelativeVar->dwKind=NON_VAR;
+					return false;
+				}
+				SetRelativeOffset(resultType,pRelativeVar,lpPtrOffset);
+				pRelativeVar->dwKind=VAR_DIRECTMEM;
+			}
+			else{
+				//pObj->member
+				if( refType != CClass::Pointer ){
+					SetError(104,VarName,cp);
+					pRelativeVar->dwKind=NON_VAR;
+					return false;
+				}
+
+				SetVarPtrToEax(pRelativeVar);
+				pRelativeVar->dwKind=VAR_DIRECTMEM;
+
+				//mov ecx,dword ptr[eax]
+				OpBuffer[obp++]=(char)0x8B;
+				OpBuffer[obp++]=(char)0x08;
+			}
+		}
+		else if( resultType.GetBasicType()==MAKE_PTR_TYPE(DEF_OBJECT,2) || resultType.GetBasicType()==MAKE_PTR_TYPE(DEF_STRUCT,2)){
+			//ポインタオブジェクトが示すメンバを参照
+			if(lpPtrOffset[0]){
+				//ppObj[n]->member
+				if( refType != CClass::Pointer ){
+					SetError(104,VarName,cp);
+					pRelativeVar->dwKind=NON_VAR;
+					return false;
+				}
+
+				SetRelativeOffset(resultType,pRelativeVar,lpPtrOffset);
+				pRelativeVar->dwKind=VAR_DIRECTMEM;
+
+
+				SetVarPtrToEax(pRelativeVar);
+
+				//mov ecx,dword ptr[eax]
+				OpBuffer[obp++]=(char)0x8B;
+				OpBuffer[obp++]=(char)0x08;
+			}
+			else{
+				SetError(104,VarName,cp);
+				pRelativeVar->dwKind=NON_VAR;
+				return false;
+			}
+		}
+		else{
+			SetError(102,VarName,cp);
+			pRelativeVar->dwKind=NON_VAR;
+			return false;
+		}
+
+		if(!_member_offset(
+			isErrorEnabled,
+			isWriteAccess,
+			resultType.GetClass(),
+			member,pRelativeVar,resultType,0)) return false;
+
+		return true;
+	}
+
+	if(lpPtrOffset[0]){
+		SetRelativeOffset(resultType,pRelativeVar,lpPtrOffset);
+		pRelativeVar->dwKind=VAR_DIRECTMEM;
+	}
+
+	return true;
+}
+
+bool SetInitGlobalData(int offset,const Type &type,const int *SubScripts,const char *lpszInitBuf){
+	extern BYTE *initGlobalBuf;
+	int i2,i3;
+	char temporary[VN_SIZE];
+	char InitBuf[VN_SIZE];
+	lstrcpy( InitBuf, lpszInitBuf );
+
+	if(InitBuf[0]=='['){
+		SlideString(InitBuf+1,-1);
+		InitBuf[lstrlen(InitBuf)-1]=0;
+
+		int typeSize = type.GetSize();
+
+		if(SubScripts[0]!=-1){
+			typeSize*=JumpSubScripts(SubScripts+1);
+			int i=0;
+			i2=0;
+			while(1){
+				if(SubScripts[0]<i2){
+					SetError(41,0,cp);
+					return 0;
+				}
+				i=GetOneParameter(InitBuf,i,temporary);
+				if(!SetInitGlobalData(
+					offset+i2*typeSize,
+					type,
+					SubScripts+1,
+					temporary)) return false;
+				i2++;
+				if(InitBuf[i]=='\0') break;
+			}
+			return true;
+		}
+
+		if(type.IsStruct()){
+			const CClass &objClass = type.GetClass();
+
+			int i = 0;
+			BOOST_FOREACH( CMember *pMember, objClass.GetDynamicMembers() ){
+				if(InitBuf[i]=='\0'){
+					SetError(41,0,cp);
+					return false;
+				}
+
+				i=GetOneParameter(InitBuf,i,temporary);
+
+				i3=objClass.GetMemberOffset( pMember->GetName().c_str(), NULL );
+
+				if(!SetInitGlobalData(offset+i3,
+					pMember->GetType(),
+					pMember->SubScripts,
+					temporary)) return false;
+			}
+			return true;
+		}
+
+		SetError(41,0,cp);
+		return false;
+	}
+
+
+	///////////////////////////////////////
+	// 単発式（[]で囲まれていない）
+	///////////////////////////////////////
+
+	if( type.IsObject() || type.IsStruct() ){
+		//オブジェクトまたは構造体の場合はありえない
+		SetError(300,NULL,cp);
+		return false;
+	}
+
+	if(SubScripts[0]!=-1){
+		SetError(41,0,cp);
+		return false;
+	}
+
+	double dbl;
+	_int64 i64data;
+	Type calcType;
+
+	if( !StaticCalculation(false, InitBuf,type.GetBasicType(),&i64data,calcType) ){
+		//動的データだった場合
+		return false;
+	}
+	if( calcType.IsReal() ){
+		memcpy(&dbl,&i64data,sizeof(double));
+		i64data=(_int64)dbl;
+	}
+	else dbl=(double)i64data;
+
+	//型チェック
+	CheckDifferentType(
+		type,
+		calcType,
+		0,0);
+
+	if( type.IsDouble() ){
+		*(double *)(initGlobalBuf+offset)=(double)dbl;
+	}
+	else if( type.IsSingle() ){
+		*(float *)(initGlobalBuf+offset)=(float)dbl;
+	}
+	else if( type.Is64() ){
+		*(_int64 *)(initGlobalBuf+offset)=i64data;
+	}
+	else if( type.IsLong() || type.IsDWord() || type.IsPointer() ){
+		if(type.GetBasicType()==typeOfPtrChar){
+			//文字列定数のとき
+
+			char *temp;
+			temp=(char *)i64data;
+			i2=dataTable.AddString(temp,lstrlen(temp));
+			HeapDefaultFree(temp);
+
+			//mov eax,DataPos
+			OpBuffer[obp++]=(char)0xB8;
+			*((long *)(OpBuffer+obp))=(long)i2;
+			pobj_DataTableSchedule->add();
+			obp+=sizeof(long);
+
+			//mov dword ptr[offset],eax
+			OpBuffer[obp++]=(char)0xA3;
+			*((long *)(OpBuffer+obp))=offset;
+			pobj_GlobalVarSchedule->add();
+			obp+=sizeof(long);
+		}
+		else{
+			*(DWORD *)(initGlobalBuf+offset)=(DWORD)i64data;
+		}
+	}
+	else if( type.IsWord() || type.IsInteger() ){
+		*(WORD *)(initGlobalBuf+offset)=(WORD)i64data;
+	}
+	else if( type.IsSByte() || type.IsByte() || type.IsBoolean() ){
+		*(BYTE *)(initGlobalBuf+offset)=(BYTE)i64data;
+	}
+
+	return true;
+}
+bool InitLocalVar(int offset,const Type &type,const int *SubScripts,const char *lpszInitBuf){
+	int i,i2,i3;
+	char temporary[VN_SIZE];
+	char InitBuf[VN_SIZE];
+	lstrcpy( InitBuf, lpszInitBuf );
+
+	if(InitBuf[0]=='['){
+		SlideString(InitBuf+1,-1);
+		InitBuf[lstrlen(InitBuf)-1]=0;
+
+		int typeSize = type.GetSize();
+
+		if(SubScripts[0]!=-1){
+			typeSize*=JumpSubScripts(SubScripts+1);
+			i=0;
+			i2=0;
+			while(1){
+				if(SubScripts[0]<i2){
+					SetError(41,0,cp);
+					return false;
+				}
+				i=GetOneParameter(InitBuf,i,temporary);
+				if(!InitLocalVar(
+					offset+i2*typeSize,
+					type,
+					SubScripts+1,
+					temporary)) return false;
+				i2++;
+				if(InitBuf[i]=='\0') break;
+			}
+			return true;
+		}
+
+		if(type.IsStruct()){
+			const CClass &objClass = type.GetClass();
+
+			int i = 0;
+			BOOST_FOREACH( CMember *pMember, objClass.GetDynamicMembers() ){
+				if(InitBuf[i]=='\0'){
+					SetError(41,0,cp);
+					return false;
+				}
+
+				i=GetOneParameter(InitBuf,i,temporary);
+
+				i3=objClass.GetMemberOffset( pMember->GetName().c_str(), NULL );
+
+				if(!InitLocalVar(offset+i3,
+					pMember->GetType(),
+					pMember->SubScripts,
+					temporary)) return false;
+
+				if(InitBuf[i]=='\0') break;
+			}
+			return true;
+		}
+
+		SetError(41,0,cp);
+		return false;
+	}
+
+
+	///////////////////////////////////////
+	// 単発式（[]で囲まれていない）
+	///////////////////////////////////////
+
+	if(SubScripts[0]!=-1){
+		SetError(41,0,cp);
+		return false;
+	}
+
+	double dbl;
+	_int64 i64data;
+	Type calcType;
+
+	if( !StaticCalculation(false, InitBuf,type.GetBasicType(),&i64data,calcType) ){
+		//動的データだった場合
+		return false;
+	}
+	if( calcType.IsReal() ){
+		memcpy(&dbl,&i64data,sizeof(double));
+		i64data=(_int64)dbl;
+	}
+	else dbl=(double)i64data;
+
+	//型チェック
+	CheckDifferentType(
+		type,
+		calcType,
+		0,0);
+
+	if( type.IsDouble() ){
+		//mov eax,HILONG(dbl)
+		OpBuffer[obp++]=(char)0xB8;
+		*((long *)(OpBuffer+obp))=(long)*(long *)(((char *)(&dbl))+4);
+		obp+=sizeof(long);
+
+		//mov dword ptr[ebp+offset+sizeof(long)],eax
+		OpBuffer[obp++]=(char)0x89;
+		OpBuffer[obp++]=(char)0x85;
+		*((long *)(OpBuffer+obp))=offset+sizeof(long);
+		AddLocalVarAddrSchedule();
+		obp+=sizeof(long);
+
+		//mov eax,LOLONG(dbl)
+		OpBuffer[obp++]=(char)0xB8;
+		*((long *)(OpBuffer+obp))=*(long *)(&dbl);
+		obp+=sizeof(long);
+
+		//mov dword ptr[ebp+offset],eax
+		OpBuffer[obp++]=(char)0x89;
+		OpBuffer[obp++]=(char)0x85;
+		*((long *)(OpBuffer+obp))=offset;
+		AddLocalVarAddrSchedule();
+		obp+=sizeof(long);
+	}
+	else if( type.IsSingle() ){
+		float flt;
+		flt=(float)dbl;
+		//mov eax,InitValue
+		OpBuffer[obp++]=(char)0xB8;
+		*((long *)(OpBuffer+obp))=*(long *)&flt;
+		obp+=sizeof(long);
+
+		//mov dword ptr[ebp+offset],eax
+		OpBuffer[obp++]=(char)0x89;
+		OpBuffer[obp++]=(char)0x85;
+		*((long *)(OpBuffer+obp))=offset;
+		AddLocalVarAddrSchedule();
+		obp+=sizeof(long);
+	}
+	else if( type.Is64() ){
+		//mov eax,HILONG(i64data)
+		OpBuffer[obp++]=(char)0xB8;
+		*((long *)(OpBuffer+obp))=(long)*(long *)(((char *)(&i64data))+4);
+		obp+=sizeof(long);
+
+		//mov dword ptr[ebp+offset+sizeof(long)],eax
+		OpBuffer[obp++]=(char)0x89;
+		OpBuffer[obp++]=(char)0x85;
+		*((long *)(OpBuffer+obp))=offset+sizeof(long);
+		AddLocalVarAddrSchedule();
+		obp+=sizeof(long);
+
+		//mov eax,LOLONG(i64data)
+		OpBuffer[obp++]=(char)0xB8;
+		*((long *)(OpBuffer+obp))=*(long *)(&i64data);
+		obp+=sizeof(long);
+
+		//mov dword ptr[ebp+offset],eax
+		OpBuffer[obp++]=(char)0x89;
+		OpBuffer[obp++]=(char)0x85;
+		*((long *)(OpBuffer+obp))=offset;
+		AddLocalVarAddrSchedule();
+		obp+=sizeof(long);
+	}
+	else if( type.IsDWord() || type.IsLong() || type.IsPointer() ){
+		if(type.GetBasicType()==typeOfPtrChar){
+			//文字列定数のとき
+
+			char *temp;
+			temp=(char *)i64data;
+			i2=dataTable.AddString(temp,lstrlen(temp));
+			HeapDefaultFree(temp);
+
+			//mov eax,DataPos
+			OpBuffer[obp++]=(char)0xB8;
+			*((long *)(OpBuffer+obp))=(long)i2;
+			pobj_DataTableSchedule->add();
+			obp+=sizeof(long);
+		}
+		else{
+			//mov eax,InitValue
+			OpBuffer[obp++]=(char)0xB8;
+			*((long *)(OpBuffer+obp))=(long)i64data;
+			obp+=sizeof(long);
+		}
+
+		//mov dword ptr[ebp+offset],eax
+		OpBuffer[obp++]=(char)0x89;
+		OpBuffer[obp++]=(char)0x85;
+		*((long *)(OpBuffer+obp))=offset;
+		AddLocalVarAddrSchedule();
+		obp+=sizeof(long);
+	}
+	else if( type.IsWord() || type.IsInteger() ){
+		//mov ax,InitValue
+		OpBuffer[obp++]=(char)0x66;
+		OpBuffer[obp++]=(char)0xB8;
+		*((WORD *)(OpBuffer+obp))=(WORD)i64data;
+		obp+=sizeof(WORD);
+
+		//mov word ptr[ebp+offset],ax
+		OpBuffer[obp++]=(char)0x66;
+		OpBuffer[obp++]=(char)0x89;
+		OpBuffer[obp++]=(char)0x85;
+		*((long *)(OpBuffer+obp))=offset;
+		AddLocalVarAddrSchedule();
+		obp+=sizeof(long);
+	}
+	else if( type.IsSByte() || type.IsByte() || type.IsBoolean() ){
+		//mov byte ptr[ebp+offset],InitValue
+		OpBuffer[obp++]=(char)0xC6;
+		OpBuffer[obp++]=(char)0x85;
+		*((long *)(OpBuffer+obp))=offset;
+		AddLocalVarAddrSchedule();
+		obp+=sizeof(long);
+		*((BYTE *)(OpBuffer+obp))=(BYTE)i64data;
+		obp+=sizeof(BYTE);
+	}
+
+	return true;
+}
+
+void dim( char *VarName,int *SubScripts,Type &type,const char *InitBuf,const char *ConstractParameter,DWORD dwFlags){
+	if( UserProc::IsGlobalAreaCompiling() ){
+		/////////////////////////
+		// グローバル変数
+		/////////////////////////
+
+		AddGlobalVariable(VarName,SubScripts,type,InitBuf,ConstractParameter,dwFlags);
+	}
+	else{
+		/////////////////
+		// ローカル変数
+		/////////////////
+
+		if( UserProc::CompilingUserProc().localVars.DuplicateCheck( Symbol( VarName ) ) ){
+			//２重定義のエラー
+			SetError(15,VarName,cp);
+			return;
+		}
+
+		bool isConst = ( dwFlags & DIMFLAG_CONST ) ? true:false;
+
+		Variable *pVar = new Variable( VarName, type, isConst );
+
+		if( SubScripts[0] != -1 ){
+			//配列あり
+			pVar->SetArray( SubScripts );
+		}
+
+		//コンストラクタ用パラメータ
+		pVar->paramStrForConstructor = ConstractParameter;
+
+		//レキシカルスコープ
+		pVar->ScopeLevel=obj_LexScopes.GetNowLevel();
+		pVar->ScopeStartAddress=obj_LexScopes.GetStartAddress();
+		pVar->bLiving=TRUE;
+
+		//エラー用
+		pVar->source_code_address=cp;
+
+		// 変数を追加
+		UserProc::CompilingUserProc().localVars.push_back( pVar );
+
+		//アラインメントを考慮
+		if( pVar->IsStruct() ){
+			int alignment = pVar->GetClass().iAlign;
+
+			if( alignment ){
+				if( AllLocalVarSize % alignment ){
+					AllLocalVarSize += alignment - (AllLocalVarSize % alignment);
+				}
+			}
+
+			if( alignment == PTR_SIZE*2 ){
+				// ポインタに要するサイズよりも一回り大きなアラインメントが指定されているとき
+				// （例:CONTEXT構造体など）
+				// 呼び出し側のオフセットズレを考慮する
+
+				if( 0 == ( UserProc::CompilingUserProc().RealParams().GetMemorySize() + PTR_SIZE/*ret分*/ ) % alignment ){
+					AllLocalVarSize += PTR_SIZE;
+				}
+			}
+		}
+
+		AllLocalVarSize += pVar->GetMemorySize();
+		pVar->offset = AllLocalVarSize;
+
+		//レキシカルスコープ
+		pVar->ScopeLevel=obj_LexScopes.GetNowLevel();
+		pVar->ScopeStartAddress=obj_LexScopes.GetStartAddress();
+		pVar->bLiving=TRUE;
+
+		if(InitBuf[0]){
+			//初期代入時のみ、書き込みアクセスを許可する
+			if( isConst ){
+				pVar->ConstOff();
+			}
+
+			int result = 0;
+			if( !pVar->IsObject() ){
+				result = InitLocalVar(-pVar->offset,
+					*pVar,
+					pVar->GetSubScriptsPtr(),
+					InitBuf);
+			}
+
+			if(!result){
+				//動的な式だった場合は代入演算を行う
+				char temporary[8192];
+				sprintf(temporary,"%s=%s",VarName,InitBuf);
+				OpcodeCalc(temporary);
+			}
+
+			if( isConst ){
+				pVar->ConstOn();
+			}
+		}
+		else{
+			//push 0
+			op_push_V(0);
+
+			//push VarSize
+			op_push_V( pVar->GetMemorySize() );
+
+			//mov eax,ebp
+			OpBuffer[obp++]=(char)0x8B;
+			OpBuffer[obp++]=(char)0xC5;
+
+			//add eax,offset
+			OpBuffer[obp++]=(char)0x05;
+			*((long *)(OpBuffer+obp))=-pVar->offset;
+			AddLocalVarAddrSchedule();
+			obp+=sizeof(long);
+
+			//push eax
+			op_push(REG_EAX);
+
+			//call FillMemory
+			OpBuffer[obp++]=(char)0xFF;
+			OpBuffer[obp++]=(char)0x15;
+			DllProc *pDllProc = GetDeclareHash("FillMemory");
+			pDllProc->Using();
+			pobj_ImportAddrSchedule->add(pDllProc);
+			obp+=sizeof(long);
+		}
+	}
+
+	//New呼び出し
+	if( type.IsObject() &&(dwFlags&DIMFLAG_NONCALL_CONSTRACTOR)==0&&InitBuf[0]=='\0'){
+		char objectSize[255];
+		if( SubScripts[0] == -1 ){
+			objectSize[0] = 0;
+		}
+		else{
+			if( SubScripts[1] != -1 ){
+				SetError(300,NULL,cp);
+			}
+			sprintf( objectSize, "%d", SubScripts[0] );
+		}
+		Operator_New( type.GetClass(), objectSize, ConstractParameter, type );
+
+		//pop eax
+		op_pop( REG_EAX );
+
+		RELATIVE_VAR RelativeVar;
+		GetVarOffset( true, false, VarName, &RelativeVar, Type() );
+		if( RelativeVar.dwKind == VAR_DIRECTMEM ){
+			SetError();
+		}
+		SetVariableFromEax( DEF_OBJECT, DEF_OBJECT, &RelativeVar );
+	}
+}
+
+void SetVarPtrToEax(RELATIVE_VAR *pRelativeVar){
+	if(pRelativeVar->dwKind==VAR_GLOBAL){
+		if(pRelativeVar->bOffsetOffset){
+			//lea eax,dword ptr[ecx+offset]
+			OpBuffer[obp++]=(char)0x8D;
+			OpBuffer[obp++]=(char)0x81;
+			*((long *)(OpBuffer+obp))=pRelativeVar->offset;
+			pobj_GlobalVarSchedule->add();
+			obp+=sizeof(long);
+		}
+		else{
+			//mov eax,offset
+			OpBuffer[obp++]=(char)0xB8;
+			*((long *)(OpBuffer+obp))=pRelativeVar->offset;
+			pobj_GlobalVarSchedule->add();
+			obp+=sizeof(long);
+		}
+	}
+	else if(pRelativeVar->dwKind==VAR_REFGLOBAL){
+		if(pRelativeVar->bOffsetOffset){
+			//mov eax,ecx
+			OpBuffer[obp++]=(char)0x8B;
+			OpBuffer[obp++]=(char)0xC1;
+
+			//add eax,dword ptr[offset]
+			op_add_RM( sizeof(long), REG_EAX, REG_NON, (int)pRelativeVar->offset, MOD_DISP32 );
+		}
+		else{
+			//mov eax,dword ptr[offset]
+			op_mov_RM( sizeof(long), REG_EAX, REG_NON, (int)pRelativeVar->offset, MOD_DISP32 );
+		}
+		obp-=sizeof(long);
+		pobj_GlobalVarSchedule->add();
+		obp+=sizeof(long);
+	}
+	else if(pRelativeVar->dwKind==VAR_LOCAL){
+		if(pRelativeVar->bOffsetOffset){
+			//add ecx,offset
+			OpBuffer[obp++]=(char)0x81;
+			OpBuffer[obp++]=(char)0xC1;
+			*((long *)(OpBuffer+obp))=pRelativeVar->offset;
+			AddLocalVarAddrSchedule();
+			obp+=sizeof(long);
+
+			//lea eax,dword ptr[ebp+ecx]
+			OpBuffer[obp++]=(char)0x8D;
+			OpBuffer[obp++]=(char)0x44;
+			OpBuffer[obp++]=(char)0x0D;
+			OpBuffer[obp++]=(char)0x00;
+		}
+		else{
+			//lea eax,dword ptr[ebp+offset]
+			OpBuffer[obp++]=(char)0x8D;
+			OpBuffer[obp++]=(char)0x85;
+			*((long *)(OpBuffer+obp))=pRelativeVar->offset;
+			AddLocalVarAddrSchedule();
+			obp+=sizeof(long);
+		}
+	}
+	else if(pRelativeVar->dwKind==VAR_REFLOCAL){
+		if(pRelativeVar->bOffsetOffset){
+			//mov eax,ecx
+			OpBuffer[obp++]=(char)0x8B;
+			OpBuffer[obp++]=(char)0xC1;
+
+			//add eax,dword ptr[ebp+offset]
+			OpBuffer[obp++]=(char)0x03;
+			OpBuffer[obp++]=(char)0x85;
+			*((long *)(OpBuffer+obp))=pRelativeVar->offset;
+			AddLocalVarAddrSchedule();
+			obp+=sizeof(long);
+		}
+		else{
+			//mov eax,dword ptr[ebp+offset]
+			OpBuffer[obp++]=(char)0x8B;
+			OpBuffer[obp++]=(char)0x85;
+			*((long *)(OpBuffer+obp))=pRelativeVar->offset;
+			AddLocalVarAddrSchedule();
+			obp+=sizeof(long);
+		}
+	}
+	else if(pRelativeVar->dwKind==VAR_DIRECTMEM){
+		//mov eax,ecx
+		OpBuffer[obp++]=(char)0x8B;
+		OpBuffer[obp++]=(char)0xC1;
+	}
+}
+void SetVarPtrToReg(int reg,RELATIVE_VAR *pRelativeVar){
+	if( reg != REG_EAX ){
+		SetError();
+		//TODO: 未完成
+	}
+	SetVarPtrToEax( pRelativeVar );
+}
+
+bool Compile_AddGlobalRootsForGc(){
+	UserProc *pUserProc_AddGlobalRootPtr = GetClassMethod( "_System_CGarbageCollection", "AddGlobalRootPtr" );
+	if( !pUserProc_AddGlobalRootPtr ){
+		SetError(3, "_System_CGarbageCollection.AddGlobalRootPtr", -1 );
+		return false;
+	}
+
+	BOOST_FOREACH( const Variable *pVar, globalVars ){
+		if( pVar->IsObject() || pVar->IsPointer() || pVar->IsStruct() ){
+			// オブジェクトまたはポインタだったとき
+			// ※構造体も含む（暫定対応）
+
+			// 変数領域に要するLONG_PTR単位の個数を引き渡す
+			op_push_V( pVar->GetMemorySize()/PTR_SIZE );
+
+
+			/////////////////////////////
+			// ルートポインタを引き渡す
+
+			//mov eax,offset
+			op_mov_RV(REG_EAX,(int)pVar->offset);
+			obp-=sizeof(long);
+			pobj_GlobalVarSchedule->add();
+			obp+=sizeof(long);
+
+			//push eax
+			op_push( REG_EAX );
+
+			//
+			/////////////////////////////
+
+
+			/////////////////////////////
+			// Thisポインタを引き渡す
+
+			SetThisPtrToReg(REG_EAX);
+
+			//push eax
+			op_push( REG_EAX );
+
+			//
+			/////////////////////////////
+
+
+			// call AddGlobalRootPtr
+			op_call( pUserProc_AddGlobalRootPtr );
+
+			ReallocNativeCodeBuffer();
+		}
+	}
+
+	return true;
+}
Index: /trunk/abdev/BasicCompiler32/FunctionValue.h
===================================================================
--- /trunk/abdev/BasicCompiler32/FunctionValue.h	(revision 148)
+++ /trunk/abdev/BasicCompiler32/FunctionValue.h	(revision 148)
@@ -0,0 +1,24 @@
+/* 関数定数 */
+
+//データ型変換
+#define FUNC_CUDBL	0x0210
+#define FUNC_FIX	0x0211
+
+//文字列
+#define FUNC_LEN	0x031D
+
+//メモリ操作
+#define FUNC_VARPTR		0x0591
+#define FUNC_OBJPTR		0x0592
+
+//その他
+#define FUNC_ADDRESSOF	0x0619
+#define FUNC_SIZEOF		0x0620
+
+//ポインタ
+#define FUNC_GETDOUBLE	0x0630
+#define FUNC_GETSINGLE	0x0631
+#define FUNC_GETQWORD	0x0632
+#define FUNC_GETDWORD	0x0633
+#define FUNC_GETWORD	0x0634
+#define FUNC_GETBYTE	0x0635
Index: /trunk/abdev/BasicCompiler32/LoopCheck.cpp
===================================================================
--- /trunk/abdev/BasicCompiler32/LoopCheck.cpp	(revision 148)
+++ /trunk/abdev/BasicCompiler32/LoopCheck.cpp	(revision 148)
@@ -0,0 +1,5 @@
+/////////////////////////////////////////////////////
+// 循環参照をチェックするためのクラスモジュール
+/////////////////////////////////////////////////////
+
+
Index: /trunk/abdev/BasicCompiler32/MakePeHdr.cpp
===================================================================
--- /trunk/abdev/BasicCompiler32/MakePeHdr.cpp	(revision 148)
+++ /trunk/abdev/BasicCompiler32/MakePeHdr.cpp	(revision 148)
@@ -0,0 +1,1715 @@
+#include "../BasicCompiler_Common/common.h"
+#include "Opcode.h"
+
+extern int GlobalOpBufferSize;
+
+
+////////////////////////////
+// 特殊関数の構造体ポインタ
+////////////////////////////
+
+// グローバル関数、静的メソッド
+UserProc
+	*pSub_System_StartupProgram,
+	*pSub_DebugSys_StartProc,
+	*pSub_DebugSys_EndProc,
+	*pSub_DebugSys_SaveContext,
+	*pSub_System_GetEip,
+	*pSub_System_InitDllGlobalVariables,
+	*pSub_System_InitStaticLocalVariables,
+	*pSub_System_Call_Destructor_of_GlobalObject,
+	*pSub_System_End,
+	*pSub_System_GetSp,
+	*pSub_pow,
+	*pSub_calloc,
+	*pSub_realloc,
+	*pSub_free,
+	*pSub_System_GC_malloc_ForObject,
+	*pSub_System_GC_malloc_ForObjectPtr,
+	*pSub_System_GC_free_for_SweepingDelete,
+	*pSubStaticMethod_System_TypeBase_InitializeUserTypes,
+
+	*pSub_allrem,
+	*pSub_aullrem,
+	*pSub_allmul,
+	*pSub_alldiv,
+	*pSub_aulldiv,
+	*pSub_allshl,
+	*pSub_allshr,
+	*pSub_aullshr,
+	
+	*pSub_esp_error;
+
+// 動的メソッド
+UserProc
+	*pUserProc_System_CGarbageCollection_RegisterGlobalRoots;
+
+
+//////////////////////////////
+// 各セクションの位置とサイズ
+int FileSize_CodeSection,
+	FileSize_ExportSection,
+	FileSize_ImportSection,
+	FileSize_DataSection,
+	FileSize_RWSection,
+	FileSize_RSrcSection,
+	FileSize_RelocSection,
+	FileSize_DebugSection;
+int FilePos_CodeSection,
+	FilePos_ExportSection,
+	FilePos_ImportSection,
+	FilePos_DataSection,
+	FilePos_RWSection,
+	FilePos_RSrcSection,
+	FilePos_RelocSection,
+	FilePos_DebugSection;
+int MemSize_CodeSection,
+	MemSize_ExportSection,
+	MemSize_ImportSection,
+	MemSize_DataSection,
+	MemSize_RWSection,
+	MemSize_RSrcSection,
+	MemSize_RelocSection,
+	MemSize_DebugSection;
+int MemPos_CodeSection,
+	MemPos_ExportSection,
+	MemPos_ImportSection,
+	MemPos_DataSection,
+	MemPos_RWSection,
+	MemPos_RSrcSection,
+	MemPos_RelocSection,
+	MemPos_DebugSection;
+int bUse_CodeSection,
+	bUse_ExportSection,
+	bUse_ImportSection,
+	bUse_DataSection,
+	bUse_RWSection,
+	bUse_RSrcSection,
+	bUse_RelocSection,
+	bUse_DebugSection;
+
+
+void DebugVariable(void){
+	char temporary[255];
+	sprintf(temporary,"_DebugSys_dwThreadID[255]%c%cDWord",1,ESC_AS);
+	OpcodeDim(temporary,DIMFLAG_INITDEBUGVAR);
+	sprintf(temporary,"_DebugSys_ProcNum[255]%c%cDWord",1,ESC_AS);
+	OpcodeDim(temporary,DIMFLAG_INITDEBUGVAR);
+	sprintf(temporary,"_DebugSys_lplpObp[255]%c%c*ULONG_PTR",1,ESC_AS);
+	OpcodeDim(temporary,DIMFLAG_INITDEBUGVAR);
+	sprintf(temporary,"_DebugSys_lplpSpBase[255]%c%c*ULONG_PTR",1,ESC_AS);
+	OpcodeDim(temporary,DIMFLAG_INITDEBUGVAR);
+}
+
+void Compile(void){
+	extern HWND hMainDlg;
+	extern HWND hOwnerEditor;
+	extern HANDLE hHeap;
+	extern BOOL bDebugCompile;
+	extern BOOL bDll;
+	extern DWORD ImageBase;
+	extern int obp_AllocSize;
+	extern char *basbuf;
+	extern char OutputFileName[MAX_PATH];
+
+	int i,i2,i3,i4,i5;
+	char temporary[MAX_PATH],*temp2;
+	HANDLE hFile;
+
+
+	//コードセクションのメモリ上の位置
+	MemPos_CodeSection=		0x1000;
+
+	//データセクションのメモリ上の位置（仮定）
+	MemPos_DataSection=		0x10000000;
+
+
+	//エクスポート セクションを利用するかどうか
+	if(bDll) bUse_ExportSection=1;
+	else bUse_ExportSection=0;
+
+
+	//////////////////
+	// データテーブル
+	dataTable.Init();
+	if(bDebugCompile){
+		dataTable.Add( (long)0x00000002 );
+	}
+
+
+	//////////////////////
+	// コード生成前の準備
+	//////////////////////
+
+	//重複エラー情報管理のメモリを確保（グローバル領域コンパイル用）
+	extern char **SynonymErrorWords;
+	extern int SynonymErrorNum;
+	SynonymErrorNum=0;
+	SynonymErrorWords=(char **)HeapAlloc(hHeap,0,1);
+
+	//列挙体に関する情報の初期化
+	CEnumParent::InitEnum();
+
+	//列挙体からクラスコードを生成
+	char *temp;
+	temp=CEnumParent::GenerateCodes();
+	AddSourceCode(temp);
+	HeapDefaultFree(temp);
+
+	//関数ポインタ情報を初期化
+	Smoothie::Meta::procPointers.clear();
+
+	// 名前空間情報を取得
+	NamespaceScopesCollection::CollectNamespaces(
+		Smoothie::Lexical::source.GetBuffer(),
+		Smoothie::Meta::namespaceScopesCollection
+	);
+
+	//クラス名を取得（詳細情報はGetAllClassInfoで取得）
+	//   GetSubInfo関数の中で参照されるオブジェクト名を事前に取得する。
+	//     ※オブジェクトの内容までは取得しない
+	pobj_DBClass=new CDBClass();
+	pobj_DBClass->InitNames();
+
+	//TypeDef情報を初期化
+	Smoothie::Meta::typeDefs.Init();
+
+	//定数情報を取得
+	GetConstInfo();
+
+	//サブルーチン（ユーザー定義、DLL関数）の識別子、アドレスを取得
+	pobj_CompilingClass=0;
+	GetSubInfo();
+
+	//クラス情報を取得（※注 - GetSubInfoの後に呼び出す）
+	pobj_DBClass->GetAllClassInfo();
+
+	//コードと行番号の関係
+	extern LINEINFO *pLineInfo;
+	extern int MaxLineInfoNum;
+	pLineInfo=(LINEINFO *)HeapAlloc(hHeap,0,1);
+	MaxLineInfoNum=0;
+
+
+	///////////////////////////
+	// 最低限必要な関数を取得
+	///////////////////////////
+	cp=-1;
+
+	if(pSub_System_StartupProgram=GetSubHash("_System_StartupProgram",1))
+		pSub_System_StartupProgram->Using();
+
+	if(pSub_DebugSys_StartProc=GetSubHash("_DebugSys_StartProc",1))
+		pSub_DebugSys_StartProc->Using();
+
+	if(pSub_DebugSys_EndProc=GetSubHash("_DebugSys_EndProc",1))
+		pSub_DebugSys_EndProc->Using();
+
+	if(pSub_DebugSys_SaveContext=GetSubHash("_DebugSys_SaveContext",1))
+		pSub_DebugSys_SaveContext->Using();
+
+	if(pSub_System_GetEip=GetSubHash("_System_GetEip",1)){
+		pSub_System_GetEip->Using();
+		pSub_System_GetEip->ThisIsSystemProc();
+	}
+
+	if(pSub_System_InitDllGlobalVariables=GetSubHash("_System_InitDllGlobalVariables",1)){
+		pSub_System_InitDllGlobalVariables->Using();
+		pSub_System_InitDllGlobalVariables->ThisIsSystemProc();
+	}
+
+	if(pSub_System_InitStaticLocalVariables=GetSubHash("_System_InitStaticLocalVariables",1)){
+		pSub_System_InitStaticLocalVariables->Using();
+		pSub_System_InitStaticLocalVariables->ThisIsSystemProc();
+	}
+
+	if(pSub_System_Call_Destructor_of_GlobalObject=GetSubHash("_System_Call_Destructor_of_GlobalObject",1)){
+		pSub_System_Call_Destructor_of_GlobalObject->Using();
+		pSub_System_Call_Destructor_of_GlobalObject->ThisIsSystemProc();
+	}
+
+	if(pSub_System_End=GetSubHash("_System_End",1)){
+		pSub_System_End->Using();
+	}
+
+	if(pSub_System_GetSp=GetSubHash("_System_GetSp",1)){
+		pSub_System_GetSp->Using();
+		pSub_System_GetSp->ThisIsSystemProc();
+	}
+
+	if(pSub_pow=GetSubHash("pow",1))
+		pSub_pow->Using();
+
+	if(pSub_calloc=GetSubHash("calloc",1))
+		pSub_calloc->Using();
+
+	if(pSub_realloc=GetSubHash("realloc",1))
+		pSub_realloc->Using();
+
+	if(pSub_free=GetSubHash("free",1))
+		pSub_free->Using();
+
+	if( pSub_System_GC_malloc_ForObject = GetSubHash( "_System_GC_malloc_ForObject",1 ) )
+		pSub_System_GC_malloc_ForObject->Using();
+
+	if( pSub_System_GC_malloc_ForObjectPtr = GetSubHash( "_System_GC_malloc_ForObjectPtr",1 ) )
+		pSub_System_GC_malloc_ForObjectPtr->Using();
+
+	if( pSub_System_GC_free_for_SweepingDelete = GetSubHash( "_System_GC_free_for_SweepingDelete",1 ) )
+		pSub_System_GC_free_for_SweepingDelete->Using();
+
+	if( pSubStaticMethod_System_TypeBase_InitializeUserTypes = GetSubHash( "ActiveBasic.Core._System_TypeBase.InitializeUserTypes",1 ) ){
+		pSubStaticMethod_System_TypeBase_InitializeUserTypes->Using();
+		pSubStaticMethod_System_TypeBase_InitializeUserTypes->ThisIsAutoGenerationProc();
+	}
+
+	if( pUserProc_System_CGarbageCollection_RegisterGlobalRoots = GetClassMethod( "_System_CGarbageCollection", "RegisterGlobalRoots" ) ){
+		pUserProc_System_CGarbageCollection_RegisterGlobalRoots->Using();
+		pUserProc_System_CGarbageCollection_RegisterGlobalRoots->ThisIsAutoGenerationProc();
+	}
+
+	pSub_allrem=GetSubHash("_allrem");
+	pSub_allrem->Using();
+	pSub_allrem->ThisIsSystemProc();
+
+	pSub_aullrem=GetSubHash("_aullrem");
+	pSub_aullrem->Using();
+	pSub_aullrem->ThisIsSystemProc();
+
+	pSub_allmul=GetSubHash("_allmul");
+	pSub_allmul->Using();
+	pSub_allmul->ThisIsSystemProc();
+
+	pSub_alldiv=GetSubHash("_alldiv");
+	pSub_alldiv->Using();
+	pSub_alldiv->ThisIsSystemProc();
+
+	pSub_aulldiv=GetSubHash("_aulldiv");
+	pSub_aulldiv->Using();
+	pSub_aulldiv->ThisIsSystemProc();
+
+	pSub_allshl=GetSubHash("_allshl");
+	pSub_allshl->Using();
+	pSub_allshl->ThisIsSystemProc();
+
+	pSub_allshr=GetSubHash("_allshr");
+	pSub_allshr->Using();
+	pSub_allshr->ThisIsSystemProc();
+
+	pSub_aullshr=GetSubHash("_aullshr");
+	pSub_aullshr->Using();
+	pSub_aullshr->ThisIsSystemProc();
+
+	pSub_esp_error=GetSubHash("_esp_error");
+	pSub_esp_error->Using();
+
+
+
+
+	//データテーブルスケジュール
+	pobj_DataTableSchedule=new CSchedule();
+	pobj_DataTableSchedule->SetFlag(SCHEDULE_FLAG_RELOC);
+
+	//インポートテーブルスケジュール
+	pobj_ImportAddrSchedule=new CImportAddrSchedule();
+	pobj_ImportAddrSchedule->SetFlag(SCHEDULE_FLAG_RELOC);
+
+	//プロシージャポインタスケジュール
+	pobj_SubAddrSchedule=new CSubAddrSchedule();
+
+	//グローバル変数アドレススケジュール
+	pobj_GlobalVarSchedule=new CSchedule();
+	pobj_GlobalVarSchedule->SetFlag(SCHEDULE_FLAG_RELOC);
+
+	//グローバル変数の初期バッファ
+	extern BYTE *initGlobalBuf;
+	initGlobalBuf=(BYTE *)HeapAlloc(hHeap,HEAP_ZERO_MEMORY,1);
+
+	//リロケーション情報
+	pobj_Reloc=new CReloc();
+
+	obp_AllocSize=8192*2;
+	OpBuffer=(char *)HeapAlloc(hHeap,0,obp_AllocSize);
+	obp=0;
+
+	//レキシカルスコープ情報を初期化
+	obj_LexScopes.Init(obp);
+
+
+	/////////////////////////////////////////////////////////////////
+	// デバッグコンパイル用のログを生成する
+	/////////////////////////////////////////////////////////////////
+#ifdef _DEBUG
+	{
+		ofstream ofs( ( (string)BasicSystemDir + "middle_code.txt" ).c_str() );
+		ofs << basbuf << endl;
+		ofs.close();
+	}
+#endif
+
+
+	//////////////////////
+	// グローバル実行領域
+	//////////////////////
+
+	cp=-1;
+	UserProc::CompileStartForGlobalArea();
+
+	if(!bDll){
+		// 名前空間が初期化されているかをチェック
+		if( Smoothie::Lexical::liveingNamespaceScopes.size() ){
+			SetError();
+		}
+
+		//ラベル用のメモリを確保
+		extern LABEL *pLabelNames;
+		extern int MaxLabelNum;
+		pLabelNames=(LABEL *)HeapAlloc(hHeap,0,1);
+		MaxLabelNum=0;
+
+		//Gotoラベルスケジュール
+		extern GOTOLABELSCHEDULE *pGotoLabelSchedule;
+		extern int GotoLabelScheduleNum;
+		pGotoLabelSchedule=(GOTOLABELSCHEDULE *)HeapAlloc(hHeap,0,1);
+		GotoLabelScheduleNum=0;
+
+		//With情報のメモリを確保
+		extern WITHINFO WithInfo;
+		WithInfo.ppName=(char **)HeapAlloc(hHeap,0,1);
+		WithInfo.pWithCp=(int *)HeapAlloc(hHeap,0,1);
+		WithInfo.num=0;
+
+		//Continueアドレスを初期化
+		extern DWORD dwContinueAddress;
+		dwContinueAddress=-1;
+
+
+		//未完成
+		//OpBuffer[obp++]=(char)0xCC;
+
+		//push ebp
+		op_push(REG_EBP);
+
+		if(bDebugCompile){
+			//デバッグ用の変数を定義
+			DebugVariable();
+		}
+
+		//GC用の変数を定義
+		InitGCVariables();
+
+		//_System_StartupProgramの呼び出し
+		op_call(pSub_System_StartupProgram);
+
+		//クラスに属する静的メンバを定義
+		CMember::InitStaticMember();
+
+		//グローバル実行領域をコンパイル開始
+		CompileBuffer(0,0);
+
+		//ラベル用のメモリを解放
+		for(i=0;i<MaxLabelNum;i++){
+			if(pLabelNames[i].pName) HeapDefaultFree(pLabelNames[i].pName);
+		}
+		HeapDefaultFree(pLabelNames);
+
+		//Goto未知ラベルスケジュールを解放
+		for(i=0;i<GotoLabelScheduleNum;i++){
+			if(pGotoLabelSchedule[i].pName){
+				SetError(6,pGotoLabelSchedule[i].pName,pGotoLabelSchedule[i].now_cp);
+				HeapDefaultFree(pGotoLabelSchedule[i].pName);
+			}
+			else{
+				sprintf(temporary,"%d",pGotoLabelSchedule[i].line);
+				SetError(6,temporary,pGotoLabelSchedule[i].now_cp);
+			}
+		}
+		HeapDefaultFree(pGotoLabelSchedule);
+
+
+		///////////////////////////////////////
+		// グローバル文字列変数の解放処理
+		///////////////////////////////////////
+
+		//call _System_End
+		extern UserProc *pSub_System_End;
+		op_call(pSub_System_End);
+
+
+		//xor eax,eax（eaxを0に初期化する）
+		op_zero_reg(REG_EAX);
+
+		//pop ebp
+		op_pop(REG_EBP);
+
+		//ret
+		op_ret();
+
+		//グローバル実行領域のコードサイズ
+		GlobalOpBufferSize=obp;
+
+		//With情報のメモリを解放
+		for(i=0;i<WithInfo.num;i++){
+			SetError(22,"With",WithInfo.pWithCp[i]);
+			HeapDefaultFree(WithInfo.ppName[i]);
+		}
+		HeapDefaultFree(WithInfo.ppName);
+		HeapDefaultFree(WithInfo.pWithCp);
+
+		// 名前空間が正しく閉じられているかをチェック
+		if( Smoothie::Lexical::liveingNamespaceScopes.size() ){
+			SetError(63,NULL,-1);
+		}
+
+	}
+	else{
+		////////////////
+		// DLLの場合
+		////////////////
+
+	}
+
+	//重複エラー情報管理のメモリを解放（グローバル領域用）
+	for(i=0;i<SynonymErrorNum;i++) HeapDefaultFree(SynonymErrorWords[i]);
+	HeapDefaultFree(SynonymErrorWords);
+	SynonymErrorWords=0;
+
+
+	StepCompileProgress();
+
+
+	/////////////////////
+	// ローカル実行領域
+	/////////////////////
+
+	//プロシージャをコンパイル開始
+	cp=0;
+	CompileLocal();
+
+	// 終了
+	///////////////////////
+
+	StepCompileProgress();
+
+
+
+	////////////////////////////////
+	// ここで一旦ログを取る
+	////////////////////////////////
+	Diagnose();
+
+
+
+	////////////////////////////////
+	// 使用するDLL関数のチェック
+	////////////////////////////////
+	for(i=0;i<MAX_HASH;i++){
+		extern DllProc **ppDeclareHash;
+		const DllProc *pDllProc = ppDeclareHash[i];
+		while(pDllProc){
+			if( !pDllProc->IsUsing() ){
+				pDllProc=pDllProc->pNextData;
+				continue;
+			}
+
+			//エラーチェック
+			HINSTANCE hLib;
+			hLib=LoadLibrary( pDllProc->GetDllFileName().c_str() );
+			if(!hLib){
+				extern char OutputFileName[MAX_PATH];
+				char temp2[MAX_PATH],temp3[MAX_PATH];
+				_splitpath(OutputFileName,temp2,temp3,NULL,NULL);
+				lstrcat(temp2,temp3);
+				lstrcpy(temp3,pDllProc->GetDllFileName().c_str());
+				GetFullPath(temp3,temp2);
+				hLib=LoadLibrary(temp3);
+
+				if(!hLib){
+					SetError(-106,pDllProc->GetDllFileName().c_str(),pDllProc->GetCodePos());
+				}
+			}
+
+			if(hLib){
+				if(!GetProcAddress(hLib,pDllProc->GetAlias().c_str())){
+					FreeLibrary(hLib);
+					SetError(-107,pDllProc->GetAlias(),pDllProc->GetCodePos());
+				}
+				FreeLibrary(hLib);
+			}
+
+			pDllProc=pDllProc->pNextData;
+		}
+	}
+
+
+
+	/////////////////////////////
+	// リソースデータを読み込む
+	/////////////////////////////
+	extern char ResourceFileName[MAX_PATH];
+	GetResourceData(ResourceFileName);
+
+
+	//////////////////////////////
+	// エクスポート情報（DLLのみ）
+	//////////////////////////////
+	IMAGE_EXPORT_DIRECTORY ImageExportDirectory;
+	DWORD *lpdwExportAddressTable;
+	DWORD *lpdwExportNamePointerTable;
+	WORD *lpwExportOrdinalTable;
+	char lpExportNames[8192];
+	int ExportNamesLength;
+	int ExportNum;
+	int DllMain_EntryPoint;
+
+	DllMain_EntryPoint=-1;
+	ExportNum=0;
+	ExportNamesLength=0;
+	lpdwExportAddressTable=(DWORD *)HeapAlloc(hHeap,0,1);
+	lpdwExportNamePointerTable=(DWORD *)HeapAlloc(hHeap,0,1);
+	lpwExportOrdinalTable=(WORD *)HeapAlloc(hHeap,0,1);
+
+	if(bUse_ExportSection){
+		_splitpath(OutputFileName,NULL,NULL,lpExportNames,temporary);
+		lstrcat(lpExportNames,temporary);
+		ExportNamesLength=lstrlen(lpExportNames)+1;
+
+		extern GlobalProc **ppSubHash;
+		GlobalProc *pUserProc,*psi2;
+		while(1){
+			//辞書順にサーチ
+			temporary[0]=0;
+			for(i=0,psi2=0;i<MAX_HASH;i++){
+				pUserProc=ppSubHash[i];
+				while(pUserProc){
+					if(pUserProc->IsExport()){
+						if(temporary[0]=='\0'){
+							lstrcpy(temporary,pUserProc->GetName().c_str());
+							psi2=pUserProc;
+						}
+						else{
+							i3=lstrlen(temporary);
+							i4=(int)pUserProc->GetName().size();
+							if(i3<i4) i3=i4;
+							if(memcmp(temporary,pUserProc->GetName().c_str(),i3)>0){
+								lstrcpy(temporary,pUserProc->GetName().c_str());
+								psi2=pUserProc;
+							}
+						}
+					}
+					pUserProc=pUserProc->pNextData;
+				}
+			}
+			if(psi2==0) break;
+			pUserProc=psi2;
+
+			pUserProc->ExportOff();
+
+			if( pUserProc->GetName() == "DllMain" ){
+				DllMain_EntryPoint=pUserProc->beginOpAddress;
+			}
+
+			lpdwExportAddressTable=(DWORD *)HeapReAlloc(hHeap,0,lpdwExportAddressTable,(ExportNum+1)*sizeof(DWORD));
+			lpdwExportAddressTable[ExportNum]=pUserProc->beginOpAddress;
+
+			lpdwExportNamePointerTable=(DWORD *)HeapReAlloc(hHeap,0,lpdwExportNamePointerTable,(ExportNum+1)*sizeof(DWORD));
+			lpdwExportNamePointerTable[ExportNum]=ExportNamesLength;
+
+			lpwExportOrdinalTable=(WORD *)HeapReAlloc(hHeap,0,lpwExportOrdinalTable,(ExportNum+1)*sizeof(WORD));
+			lpwExportOrdinalTable[ExportNum]=ExportNum;
+
+			lstrcpy(lpExportNames+ExportNamesLength,pUserProc->GetName().c_str());
+			ExportNamesLength+=lstrlen(lpExportNames+ExportNamesLength)+1;
+
+			ExportNum++;
+		}
+		for(i=0;i<ExportNum;i++){
+			lpdwExportNamePointerTable[i]+=
+				sizeof(IMAGE_EXPORT_DIRECTORY)+	//エクスポートディレクトリテーブルを飛び越す
+				ExportNum*sizeof(DWORD)+		//エクスポート アドレス テーブルを飛び越す
+				ExportNum*sizeof(DWORD)+		//エクスポート名ポインタ テーブルを飛び越す
+				ExportNum*sizeof(WORD);			//エクスポート序数テーブルを飛び越す
+		}
+
+		ImageExportDirectory.Characteristics=0;
+		ImageExportDirectory.TimeDateStamp=(DWORD)time(NULL);
+		ImageExportDirectory.MajorVersion=0;
+		ImageExportDirectory.MinorVersion=0;
+		ImageExportDirectory.Name=sizeof(IMAGE_EXPORT_DIRECTORY)+
+			ExportNum*sizeof(DWORD)+	//エクスポート アドレス テーブルを飛び越す
+			ExportNum*sizeof(DWORD)+	//エクスポート名ポインタ テーブルを飛び越す
+			ExportNum*sizeof(WORD);		//エクスポート序数テーブルを飛び越す
+		ImageExportDirectory.Base=1;
+		ImageExportDirectory.NumberOfFunctions=ExportNum;
+		ImageExportDirectory.NumberOfNames=ExportNum;
+		ImageExportDirectory.AddressOfFunctions=sizeof(IMAGE_EXPORT_DIRECTORY);
+		ImageExportDirectory.AddressOfNames=ImageExportDirectory.AddressOfFunctions+ExportNum*sizeof(DWORD);
+		ImageExportDirectory.AddressOfNameOrdinals=ImageExportDirectory.AddressOfNames+ExportNum*sizeof(DWORD);
+	}
+
+
+	/////////////////////
+	//インポートDLL情報
+	/////////////////////
+	extern DllProc **ppDeclareHash;
+	char **ppDllNames;
+	int ImportDllNum;
+
+	/*
+	IMAGE_IMPORT_DESCRIPTOR1[size=0x14]	インポートヘッダ
+	IMAGE_IMPORT_DESCRIPTOR2[size=0x14]
+	IMAGE_IMPORT_DESCRIPTOR3[size=0x14]
+	...
+	Dll名1[size=0x10]
+	Dll名2[size=0x10]
+	Dll名3[size=0x10]
+	...
+	ルックアップ テーブル（ヒントを示すRVA）
+	ヒントテーブル
+	インポート アドレス テーブル（ルックアップと同じ内容だが、プログラム実行時に実行アドレスに書き換えられる）
+	*/
+
+	ppDllNames=(char **)HeapAlloc(hHeap,0,1);
+
+	ImportDllNum=0;
+	for(i=0;i<MAX_HASH;i++){
+		const DllProc *pDllProc=ppDeclareHash[i];
+		while(pDllProc){
+			if( !pDllProc->IsUsing() ){
+				pDllProc=pDllProc->pNextData;
+				continue;
+			}
+
+			if( pDllProc->GetDllFileName().size() > 16 ){
+				SetError(7,NULL,cp);
+				break;
+			}
+			for(i2=0;i2<ImportDllNum;i2++){
+				if( pDllProc->GetDllFileName() == ppDllNames[i2] ){
+					break;
+				}
+			}
+			if(i2==ImportDllNum){
+				ppDllNames=(char **)HeapReAlloc(hHeap,0,ppDllNames,(ImportDllNum+1)*sizeof(char **));
+				ppDllNames[ImportDllNum]=(char *)HeapAlloc(hHeap,HEAP_ZERO_MEMORY,16);
+				lstrcpy(ppDllNames[ImportDllNum],pDllProc->GetDllFileName().c_str());
+				ImportDllNum++;
+			}
+
+			pDllProc=pDllProc->pNextData;
+		}
+	}
+
+	//インポート テーブル、及びルックアップ テーブル サイズの計算
+	IMAGE_IMPORT_DESCRIPTOR *pImportTable;
+	int LookupSize;
+	LookupSize=0;
+	pImportTable=(IMAGE_IMPORT_DESCRIPTOR *)HeapAlloc(hHeap,0,(ImportDllNum+1)*sizeof(IMAGE_IMPORT_DESCRIPTOR));
+	i3=(ImportDllNum+1)*sizeof(IMAGE_IMPORT_DESCRIPTOR);
+	for(i=0;i<ImportDllNum;i++){
+		//インポート テーブル（IMAGE_IMPORT_DESCRIPTOR）
+		pImportTable[i].OriginalFirstThunk=i3+(ImportDllNum*0x10)+LookupSize;
+		pImportTable[i].TimeDateStamp=0;
+		pImportTable[i].ForwarderChain=0;
+		pImportTable[i].Name=i3+i*0x10;
+		for(i2=0;i2<MAX_HASH;i2++){
+			const DllProc *pDllProc=ppDeclareHash[i2];
+			while(pDllProc){
+				if( !pDllProc->IsUsing() ){
+					pDllProc=pDllProc->pNextData;
+					continue;
+				}
+
+				if( pDllProc->GetDllFileName() == ppDllNames[i] ){
+					//ルックアップデータのサイズを追加
+					LookupSize+=sizeof(DWORD);
+				}
+
+				pDllProc=pDllProc->pNextData;
+			}
+		}
+		LookupSize+=sizeof(DWORD);	//NULL用
+	}
+	memset(&pImportTable[i],0,sizeof(IMAGE_IMPORT_DESCRIPTOR));
+
+	//ルックアップ テーブル、ヒント テーブル
+	DWORD *pLookupTable;
+	pLookupTable=(DWORD *)HeapAlloc(hHeap,0,LookupSize*sizeof(DWORD)+1);
+	char *pHintTable;
+	int HintSize,HintAllocSize;
+	HintSize=0;
+	HintAllocSize=128*2;
+	pHintTable=(char *)HeapAlloc(hHeap,0,HintAllocSize);
+	i3+=ImportDllNum*0x10;
+	for(i=0,i5=0;i<ImportDllNum;i++){
+		for(i2=0;i2<MAX_HASH;i2++){
+			DllProc *pDllProc=ppDeclareHash[i2];
+			while(pDllProc){
+				if( !pDllProc->IsUsing() ){
+					pDllProc=pDllProc->pNextData;
+					continue;
+				}
+
+				if( pDllProc->GetDllFileName() == ppDllNames[i] ){
+					//ルックアップの位置をセット（後にインポート アドレス テーブルにセットしなおされる）
+					pDllProc->SetLookupAddress( i3+(i5*sizeof(DWORD)) );
+
+					//ルックアップ テーブル
+					pLookupTable[i5++]=i3+LookupSize+HintSize;
+
+					//ヒント テーブル
+					pHintTable[HintSize++]=0;
+					pHintTable[HintSize++]=0;
+					lstrcpy(pHintTable+HintSize,pDllProc->GetAlias().c_str());
+					i4=(int)pDllProc->GetAlias().size();
+					HintSize+=i4+1;
+					if(i4%2==0) pHintTable[HintSize++]=0;
+
+					if(HintAllocSize<HintSize+128){
+						HintAllocSize+=128;
+						pHintTable=(char *)HeapReAlloc(hHeap,0,pHintTable,HintAllocSize);
+					}
+				}
+
+				pDllProc=pDllProc->pNextData;
+			}
+		}
+		pLookupTable[i5++]=0;
+	}
+
+
+	if(bDll){
+		//DLLの場合はリロケーション情報を仮生成
+		//※正式な生成は各セクションのメモリ上のサイズが決定してから再度行う。
+		pobj_Reloc->ResetRelocBuffer();
+	}
+
+
+
+	//グローバル変数情報を扱う構造体も初期バッファの有無による配置を行う
+	//（デバッグ情報で利用される）
+	extern int AllInitGlobalVarSize;
+	foreach( Variable *pVar, globalVars ){
+		if(pVar->offset&0x80000000){
+			pVar->offset=(pVar->offset&0x7FFFFFFF)+AllInitGlobalVarSize;
+		}
+	}
+
+
+
+	////////////////////////////////////
+	// デバッグセクションを生成
+	////////////////////////////////////
+
+	//機械語コードとBasicコードの関係を整理
+	extern LINEINFO *pLineInfo;
+	extern int MaxLineInfoNum;
+	int MinObp,MaxObp;
+	LINEINFO *pTempLineInfo;
+	pTempLineInfo=(LINEINFO *)HeapAlloc(hHeap,0,MaxLineInfoNum*sizeof(LINEINFO));
+	i2=0;
+	MaxObp=0;
+	while(1){
+		for(i3=0,MinObp=0x0FFFFFFF;i3<MaxLineInfoNum;i3++){
+			if(pLineInfo[i3].TopObp<MinObp&&MaxObp<pLineInfo[i3].TopObp){
+				MinObp=pLineInfo[i3].TopObp;
+				i4=i3;
+			}
+		}
+		if(MinObp==0x0FFFFFFF) break;
+		pTempLineInfo[i2]=pLineInfo[i4];
+		MaxObp=pTempLineInfo[i2].TopObp;
+		i2++;
+	}
+	HeapDefaultFree(pLineInfo);
+	pLineInfo=(LINEINFO *)HeapAlloc(hHeap,0,i2*sizeof(LINEINFO));
+	memcpy(pLineInfo,pTempLineInfo,i2*sizeof(LINEINFO));
+	MaxLineInfoNum=i2;
+	HeapDefaultFree(pTempLineInfo);
+
+	//デバッグセクションを生成
+	CDebugSection *pobj_DebugSection;
+	pobj_DebugSection=new CDebugSection();
+	extern BOOL bDebugCompile;
+	extern BOOL bError;
+	if(bDebugCompile&&bError==0){
+		pobj_DebugSection->make();
+	}
+
+
+
+	/////////////////////////////////////
+	// 各セクションの位置とサイズを計算
+	/////////////////////////////////////
+
+	//コードセッションのファイル上のサイズ
+	if(obp%FILE_ALIGNMENT) FileSize_CodeSection=obp+(FILE_ALIGNMENT-obp%FILE_ALIGNMENT);
+	else FileSize_CodeSection=obp;
+	if(FileSize_CodeSection) bUse_CodeSection=1;
+	else bUse_CodeSection=0;
+
+	//エクスポートセクションのファイル上のサイズ
+	i=	sizeof(IMAGE_EXPORT_DIRECTORY)+	//エクスポートディレクトリテーブルを飛び越す
+		ExportNum*sizeof(DWORD)+		//エクスポート アドレス テーブルを飛び越す
+		ExportNum*sizeof(DWORD)+		//エクスポート名ポインタ テーブルを飛び越す
+		ExportNum*sizeof(WORD)+			//エクスポート序数テーブルを飛び越す
+		ExportNamesLength;				//シンボル名バッファ
+	if(bUse_ExportSection){
+		if(i%FILE_ALIGNMENT) FileSize_ExportSection=i+(FILE_ALIGNMENT-i%FILE_ALIGNMENT);
+		else FileSize_ExportSection=i;
+	}
+	else FileSize_ExportSection=0;
+
+	//インポートセクションのファイル上のサイズ
+	i=(ImportDllNum+1)*sizeof(IMAGE_IMPORT_DESCRIPTOR)+
+		16*ImportDllNum+	//DLL名
+		LookupSize+			//ルックアップテーブル
+		HintSize+			//ヒント名（関数名）テーブル
+		LookupSize;			//インポート アドレス テーブル
+	if(i%FILE_ALIGNMENT) FileSize_ImportSection=i+(FILE_ALIGNMENT-i%FILE_ALIGNMENT);
+	else FileSize_ImportSection=i;
+	bUse_ImportSection=1;	//インポートセクションは必ず存在する
+
+	//データセクションのファイル上のサイズ
+	if(dataTable.GetSize()%FILE_ALIGNMENT) FileSize_DataSection=dataTable.GetSize()+(FILE_ALIGNMENT-dataTable.GetSize()%FILE_ALIGNMENT);
+	else FileSize_DataSection=dataTable.GetSize();
+	if(FileSize_DataSection) bUse_DataSection=1;
+	else bUse_DataSection=0;
+
+	//リライタブルセクションのファイル上のサイズ（グローバル変数の初期情報のみを格納）
+	if(AllInitGlobalVarSize%FILE_ALIGNMENT) FileSize_RWSection=AllInitGlobalVarSize+(FILE_ALIGNMENT-AllInitGlobalVarSize%FILE_ALIGNMENT);
+	else{
+		if(AllInitGlobalVarSize) FileSize_RWSection=AllInitGlobalVarSize;
+		else FileSize_RWSection=FILE_ALIGNMENT;
+	}
+	bUse_RWSection=1;
+
+	//リソースセクションのファイル上のサイズ
+	char *RSrcSectionBuffer;
+	int RSrcSectionSize;
+	RSrcSectionBuffer=GetRSrcSectionBuffer(&RSrcSectionSize);
+	if(RSrcSectionSize%FILE_ALIGNMENT) FileSize_RSrcSection=RSrcSectionSize+(FILE_ALIGNMENT-RSrcSectionSize%FILE_ALIGNMENT);
+	else FileSize_RSrcSection=RSrcSectionSize;
+	if(FileSize_RSrcSection) bUse_RSrcSection=1;
+	else bUse_RSrcSection=0;
+
+	//リロケーションセクションのファイル上のサイズ
+	if(pobj_Reloc->length%FILE_ALIGNMENT) FileSize_RelocSection=pobj_Reloc->length+(FILE_ALIGNMENT-pobj_Reloc->length%FILE_ALIGNMENT);
+	else FileSize_RelocSection=pobj_Reloc->length;
+	if(FileSize_RelocSection) bUse_RelocSection=1;
+	else bUse_RelocSection=0;
+
+	//デバッグセクションのファイル上のサイズ
+	if(pobj_DebugSection->length%FILE_ALIGNMENT) FileSize_DebugSection=pobj_DebugSection->length+(FILE_ALIGNMENT-pobj_DebugSection->length%FILE_ALIGNMENT);
+	else FileSize_DebugSection=pobj_DebugSection->length;
+	if(FileSize_DebugSection) bUse_DebugSection=1;
+	else bUse_DebugSection=0;
+
+
+	//各セッションのファイル上の位置
+	FilePos_CodeSection=	EXE_HEADER_SIZE;
+	FilePos_ExportSection=	FilePos_CodeSection+
+							FileSize_CodeSection;
+	FilePos_ImportSection=	FilePos_ExportSection+
+							FileSize_ExportSection;
+	FilePos_DataSection=	FilePos_ImportSection+
+							FileSize_ImportSection;
+	FilePos_RWSection=		FilePos_DataSection+
+							FileSize_DataSection;
+	FilePos_RSrcSection=	FilePos_RWSection+
+							FileSize_RWSection;
+	FilePos_RelocSection=	FilePos_RSrcSection+
+							FileSize_RSrcSection;
+	FilePos_DebugSection=	FilePos_RelocSection+
+							FileSize_RelocSection;
+
+
+	//コードセッションのメモリ上のサイズ
+	if(FileSize_CodeSection%MEM_ALIGNMENT) MemSize_CodeSection=FileSize_CodeSection+(MEM_ALIGNMENT-FileSize_CodeSection%MEM_ALIGNMENT);
+	else MemSize_CodeSection=FileSize_CodeSection;
+
+	//エクスポートセクションのメモリ上のサイズ
+	if(FileSize_ExportSection%MEM_ALIGNMENT) MemSize_ExportSection=FileSize_ExportSection+(MEM_ALIGNMENT-FileSize_ExportSection%MEM_ALIGNMENT);
+	else MemSize_ExportSection=FileSize_ExportSection;
+
+	//インポートセクションのメモリ上のサイズ
+	if(FileSize_ImportSection%MEM_ALIGNMENT) MemSize_ImportSection=FileSize_ImportSection+(MEM_ALIGNMENT-FileSize_ImportSection%MEM_ALIGNMENT);
+	else MemSize_ImportSection=FileSize_ImportSection;
+
+	//データセクションのメモリ上のサイズ
+	if(FileSize_DataSection%MEM_ALIGNMENT) MemSize_DataSection=FileSize_DataSection+(MEM_ALIGNMENT-FileSize_DataSection%MEM_ALIGNMENT);
+	else MemSize_DataSection=FileSize_DataSection;
+
+	//リライタブルセクションのメモリ上のサイズ
+	extern int AllGlobalVarSize;
+	i=AllInitGlobalVarSize+AllGlobalVarSize;
+	if(i%MEM_ALIGNMENT) MemSize_RWSection=i+(MEM_ALIGNMENT-i%MEM_ALIGNMENT);
+	else MemSize_RWSection=i;
+
+	//リソースセクションのメモリ上のサイズ
+	if(FileSize_RSrcSection%MEM_ALIGNMENT) MemSize_RSrcSection=FileSize_RSrcSection+(MEM_ALIGNMENT-FileSize_RSrcSection%MEM_ALIGNMENT);
+	else MemSize_RSrcSection=FileSize_RSrcSection;
+
+	//リロケーションセクションのメモリ上のサイズ
+	if(FileSize_RelocSection%MEM_ALIGNMENT) MemSize_RelocSection=FileSize_RelocSection+(MEM_ALIGNMENT-FileSize_RelocSection%MEM_ALIGNMENT);
+	else MemSize_RelocSection=FileSize_RelocSection;
+
+	//デバッグセクションのメモリ上のサイズ
+	if(FileSize_DebugSection%MEM_ALIGNMENT) MemSize_DebugSection=FileSize_DebugSection+(MEM_ALIGNMENT-FileSize_DebugSection%MEM_ALIGNMENT);
+	else MemSize_DebugSection=FileSize_DebugSection;
+
+
+	//各セッションのメモリ上の位置
+	if(bUse_ExportSection)	MemPos_ExportSection=	0x1000+
+													MemSize_CodeSection;
+	else					MemPos_ExportSection=0;
+	if(bUse_ImportSection)	MemPos_ImportSection=	0x1000+
+													MemSize_CodeSection+
+													MemSize_ExportSection;
+	else					MemPos_ImportSection=0;
+	if(bUse_DataSection)	MemPos_DataSection=		0x1000+
+													MemSize_CodeSection+
+													MemSize_ExportSection+
+													MemSize_ImportSection;
+	else					MemPos_DataSection=0;
+	if(bUse_RWSection)		MemPos_RWSection=		0x1000+
+													MemSize_CodeSection+
+													MemSize_ExportSection+
+													MemSize_ImportSection+
+													MemSize_DataSection;
+	else					MemPos_RWSection=0;
+	if(bUse_RSrcSection)	MemPos_RSrcSection=		0x1000+
+													MemSize_CodeSection+
+													MemSize_ExportSection+
+													MemSize_ImportSection+
+													MemSize_DataSection+
+													MemSize_RWSection;
+	else					MemPos_RSrcSection=0;
+	if(bUse_RelocSection)	MemPos_RelocSection=	0x1000+
+													MemSize_CodeSection+
+													MemSize_ExportSection+
+													MemSize_ImportSection+
+													MemSize_DataSection+
+													MemSize_RWSection+
+													MemSize_RSrcSection;
+	else					MemPos_RelocSection=0;
+	if(bUse_DebugSection)	MemPos_DebugSection=	0x1000+
+													MemSize_CodeSection+
+													MemSize_ExportSection+
+													MemSize_ImportSection+
+													MemSize_DataSection+
+													MemSize_RWSection+
+													MemSize_RSrcSection+
+													MemSize_RelocSection;
+	else					MemPos_DebugSection=0;
+
+
+
+	/////////////////////////////
+	// GC用の変数スケジュール
+	/////////////////////////////
+	PerformedGcVarSchedule();
+
+
+
+	////////////////////////////
+	// エクスポート情報の再配置
+	////////////////////////////
+	if(bUse_ExportSection){
+		for(i=0;i<ExportNum;i++){
+			lpdwExportAddressTable[i]+=MemPos_CodeSection;
+			lpdwExportNamePointerTable[i]+=MemPos_ExportSection;
+		}
+
+		ImageExportDirectory.Name+=						MemPos_ExportSection;
+		ImageExportDirectory.AddressOfFunctions+=		MemPos_ExportSection;
+		ImageExportDirectory.AddressOfNames+=			MemPos_ExportSection;
+		ImageExportDirectory.AddressOfNameOrdinals+=	MemPos_ExportSection;
+	}
+
+
+	////////////////////////////
+	// インポート情報の再配置
+	////////////////////////////
+	for(i=0,i5=0;i<ImportDllNum;i++){
+		//インポート テーブル（IMAGE_IMPORT_DESCRIPTOR）
+		pImportTable[i].OriginalFirstThunk+=MemPos_ImportSection;
+		pImportTable[i].Name+=MemPos_ImportSection;
+
+		//インポート アドレス テーブル（ルックアップとヒントを飛び越す）
+		pImportTable[i].FirstThunk=pImportTable[i].OriginalFirstThunk+
+			LookupSize+			//ルックアップテーブル
+			HintSize;			//ヒント名（関数名）テーブル
+
+		for(i2=0;i2<MAX_HASH;i2++){
+			const DllProc *pDllProc=ppDeclareHash[i2];
+			while(pDllProc){
+				if( !pDllProc->IsUsing() ){
+					pDllProc=pDllProc->pNextData;
+					continue;
+				}
+
+				if( pDllProc->GetDllFileName() == ppDllNames[i] ){
+					//ルックアップ テーブル
+					pLookupTable[i5++]+=MemPos_ImportSection;
+				}
+
+				pDllProc=pDllProc->pNextData;
+			}
+		}
+		i5++;
+	}
+
+
+	////////////////////////////////////////
+	//仮想関数データテーブルスケジュール
+	pobj_DBClass->ActionVtblSchedule(ImageBase,MemPos_CodeSection);
+
+
+	//////////////////////////////
+	// データテーブルスケジュール
+	for(i=0;i<pobj_DataTableSchedule->num;i++){
+		*((long *)(OpBuffer+pobj_DataTableSchedule->pObpValues[i]))+=ImageBase+MemPos_DataSection;
+	}
+	delete pobj_DataTableSchedule;
+
+
+	//////////////////////////////////
+	// インポートテーブルスケジュール（インポート アドレス テーブルを指し示させる）
+	for(i=0;i<pobj_ImportAddrSchedule->num;i++){
+		const DllProc *pDllProc=pobj_ImportAddrSchedule->ppdi[i];
+		*((long *)(OpBuffer+pobj_ImportAddrSchedule->pObpValues[i]))=
+			ImageBase+
+			MemPos_ImportSection+
+			LookupSize+			//ルックアップテーブル
+			HintSize+			//ヒント名（関数名）テーブル
+			pDllProc->GetLookupAddress();
+	}
+	delete pobj_ImportAddrSchedule;
+
+
+	////////////////////////////////////
+	// プロシージャポインタスケジュール
+	for(i=0;i<pobj_SubAddrSchedule->num;i++){
+		if(pobj_SubAddrSchedule->ppsi[i]->beginOpAddress==0
+			&&pobj_SubAddrSchedule->ppsi[i]->endOpAddress==0){
+			SetError(300,NULL,-1);
+		}
+
+		if(pobj_SubAddrSchedule->pbCall[i]){
+			*((long *)(OpBuffer+pobj_SubAddrSchedule->pObpValues[i]))=
+				pobj_SubAddrSchedule->ppsi[i]->beginOpAddress-(pobj_SubAddrSchedule->pObpValues[i]+sizeof(long));
+		}
+		else{
+			*((long *)(OpBuffer+pobj_SubAddrSchedule->pObpValues[i]))=
+				pobj_SubAddrSchedule->ppsi[i]->beginOpAddress+ImageBase+MemPos_CodeSection;
+		}
+	}
+	delete pobj_SubAddrSchedule;
+
+
+	if(bDll){
+		//DLLの場合はリロケーション情報を生成
+		pobj_Reloc->ResetRelocBuffer();
+	}
+
+
+
+	//////////////////////////////////////
+	// グローバル変数アドレススケジュール
+	//////////////////////////////////////
+
+	/*
+	GlobalArea1 - 初期バッファあり
+	GlobalArea2 - 初期バッファなし
+	*/
+	for(i=0;i<pobj_GlobalVarSchedule->num;i++){
+		if(*((long *)(OpBuffer+pobj_GlobalVarSchedule->pObpValues[i])) & 0x80000000){
+			//初期バッファなし
+			*((long *)(OpBuffer+pobj_GlobalVarSchedule->pObpValues[i]))=
+				AllInitGlobalVarSize+
+				(*((long *)(OpBuffer+pobj_GlobalVarSchedule->pObpValues[i])) & 0x7FFFFFFF)+
+				ImageBase+MemPos_RWSection;
+		}
+		else{
+			//初期バッファあり
+			*((long *)(OpBuffer+pobj_GlobalVarSchedule->pObpValues[i]))+=
+				ImageBase+MemPos_RWSection;
+		}
+	}
+	delete pobj_GlobalVarSchedule;
+
+
+
+	////////////////////////////////
+	// リソースアドレススケジュール
+	extern DWORD *lpdwRSrcAddrSchedule;
+	extern int RSrcAddrScheduleNum;
+	for(i=0;i<RSrcAddrScheduleNum;i++){
+		*(DWORD *)(RSrcSectionBuffer+lpdwRSrcAddrSchedule[i])+=MemPos_RSrcSection;
+	}
+	HeapDefaultFree(lpdwRSrcAddrSchedule);
+
+
+	//Dosスタブ
+	char *DosStubBuffer;
+	int DosStubSize;
+	extern char BasicSystemDir[MAX_PATH];
+	sprintf(temporary,"%sSubOperation\\dosstub.pgm",BasicSystemDir);
+	hFile=CreateFile(temporary,GENERIC_READ,0,NULL,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,NULL);
+	if(hFile==INVALID_HANDLE_VALUE){
+		MessageBox(hOwnerEditor,"dosstub.pgmの読み込みに失敗","error",MB_OK);
+		goto EndWriteOpcode;
+	}
+	DosStubSize=GetFileSize(hFile,NULL);
+	DosStubBuffer=(char *)HeapAlloc(hHeap,0,DosStubSize);
+	ReadFile(hFile,DosStubBuffer,DosStubSize,(DWORD *)&i2,NULL);
+	CloseHandle(hFile);
+
+
+	extern BOOL bError;
+	if(bError) goto EndWriteOpcode;
+
+
+	////////////////////////////
+	// EXEファイルのヘッダ情報
+	////////////////////////////
+
+	IMAGE_DOS_HEADER ImageDosHeader;
+	ImageDosHeader.e_magic=	0x5A4D;
+	ImageDosHeader.e_cblp=	0x0090;
+	ImageDosHeader.e_cp=	0x0003;
+	ImageDosHeader.e_crlc=	0;
+	ImageDosHeader.e_cparhdr=4;
+	ImageDosHeader.e_minalloc=0x0000;
+	ImageDosHeader.e_maxalloc=0xFFFF;
+	ImageDosHeader.e_ss=	0x0000;
+	ImageDosHeader.e_sp=	0x00B8;
+	ImageDosHeader.e_csum=	0x0000;
+	ImageDosHeader.e_ip=	0x0000;
+	ImageDosHeader.e_cs=	0x0000;
+	ImageDosHeader.e_lfarlc=0x0040;
+	ImageDosHeader.e_ovno=	0x0000;
+	ImageDosHeader.e_res[0]=0;
+	ImageDosHeader.e_res[1]=0;
+	ImageDosHeader.e_res[2]=0;
+	ImageDosHeader.e_res[3]=0;
+	ImageDosHeader.e_oemid=	0x0000;
+	ImageDosHeader.e_oeminfo=0x0000;
+	ImageDosHeader.e_res2[0]=0;
+	ImageDosHeader.e_res2[1]=0;
+	ImageDosHeader.e_res2[2]=0;
+	ImageDosHeader.e_res2[3]=0;
+	ImageDosHeader.e_res2[4]=0;
+	ImageDosHeader.e_res2[5]=0;
+	ImageDosHeader.e_res2[6]=0;
+	ImageDosHeader.e_res2[7]=0;
+	ImageDosHeader.e_res2[8]=0;
+	ImageDosHeader.e_res2[9]=0;
+	ImageDosHeader.e_lfanew=0x0100;	//PEヘッダの位置
+
+
+	/////////////////////////////////////////////
+	// PEヘッダ
+	/////////////////////////////////////////////
+
+	IMAGE_NT_HEADERS ImagePeHdr;
+	ImagePeHdr.Signature=IMAGE_NT_SIGNATURE;
+
+	//マシンタイプ
+	ImagePeHdr.FileHeader.Machine=			IMAGE_FILE_MACHINE_I386;
+
+	ImagePeHdr.FileHeader.NumberOfSections=		bUse_CodeSection+
+												bUse_ExportSection+
+												bUse_ImportSection+
+												bUse_DataSection+
+												bUse_RWSection+
+												bUse_RSrcSection+
+												bUse_RelocSection+
+												bUse_DebugSection;	//セクション数
+	ImagePeHdr.FileHeader.TimeDateStamp=		(DWORD)time(NULL);
+	ImagePeHdr.FileHeader.PointerToSymbolTable=	0x00000000;
+	ImagePeHdr.FileHeader.NumberOfSymbols=		0x00000000;
+	ImagePeHdr.FileHeader.SizeOfOptionalHeader=	IMAGE_SIZEOF_NT_OPTIONAL32_HEADER;
+	if(bDll){
+		ImagePeHdr.FileHeader.Characteristics=	IMAGE_FILE_EXECUTABLE_IMAGE|
+												IMAGE_FILE_32BIT_MACHINE|
+												IMAGE_FILE_LINE_NUMS_STRIPPED|
+												IMAGE_FILE_LOCAL_SYMS_STRIPPED|
+												IMAGE_FILE_DLL;
+	}
+	else{
+		ImagePeHdr.FileHeader.Characteristics=	IMAGE_FILE_EXECUTABLE_IMAGE|
+												IMAGE_FILE_32BIT_MACHINE|
+												IMAGE_FILE_LINE_NUMS_STRIPPED|
+												IMAGE_FILE_LOCAL_SYMS_STRIPPED;
+	}
+
+	ImagePeHdr.OptionalHeader.Magic=				0x010B;
+	ImagePeHdr.OptionalHeader.MajorLinkerVersion=	4;
+	ImagePeHdr.OptionalHeader.MinorLinkerVersion=	0;
+	ImagePeHdr.OptionalHeader.SizeOfCode=			FileSize_CodeSection;	//コードサイズ（.textのセッションサイズ）
+	ImagePeHdr.OptionalHeader.SizeOfInitializedData=FileSize_DataSection;	//データサイズ（.dataのセッションサイズ）
+	ImagePeHdr.OptionalHeader.SizeOfUninitializedData=0;					//未初期化データのサイズ（なし）
+	if(bDll){
+		if(DllMain_EntryPoint==-1)
+			ImagePeHdr.OptionalHeader.AddressOfEntryPoint=0;
+		else
+			ImagePeHdr.OptionalHeader.AddressOfEntryPoint=MemPos_CodeSection+DllMain_EntryPoint;
+	}
+	else ImagePeHdr.OptionalHeader.AddressOfEntryPoint=	MemPos_CodeSection;
+	ImagePeHdr.OptionalHeader.BaseOfCode=			MemPos_CodeSection;	//.textのアドレス
+	ImagePeHdr.OptionalHeader.BaseOfData=			MemPos_DataSection;	//.dataのアドレス
+
+	ImagePeHdr.OptionalHeader.ImageBase=			ImageBase;		//イメージベース
+	ImagePeHdr.OptionalHeader.SectionAlignment=		MEM_ALIGNMENT;		//セクションアラインメント
+	ImagePeHdr.OptionalHeader.FileAlignment=		FILE_ALIGNMENT;
+	ImagePeHdr.OptionalHeader.MajorOperatingSystemVersion=4;
+	ImagePeHdr.OptionalHeader.MinorOperatingSystemVersion=0;
+	ImagePeHdr.OptionalHeader.MajorImageVersion=	0;
+	ImagePeHdr.OptionalHeader.MinorImageVersion=	0;
+	ImagePeHdr.OptionalHeader.MajorSubsystemVersion=4;
+	ImagePeHdr.OptionalHeader.MinorSubsystemVersion=0;
+	ImagePeHdr.OptionalHeader.Win32VersionValue=	0;
+	ImagePeHdr.OptionalHeader.SizeOfImage=			EXE_HEADER_SIZE+
+													MemSize_CodeSection+
+													MemSize_ExportSection+
+													MemSize_ImportSection+
+													MemSize_DataSection+
+													MemSize_RWSection+
+													MemSize_RSrcSection+
+													MemSize_RelocSection+
+													MemSize_DebugSection;//すべてのイメージサイズ
+	ImagePeHdr.OptionalHeader.SizeOfHeaders=		EXE_HEADER_SIZE;//ヘッダサイズ
+	ImagePeHdr.OptionalHeader.CheckSum=				0;
+	extern unsigned short TypeOfSubSystem;
+	ImagePeHdr.OptionalHeader.Subsystem=			TypeOfSubSystem;
+	ImagePeHdr.OptionalHeader.DllCharacteristics=	0;
+	ImagePeHdr.OptionalHeader.SizeOfStackReserve=	0x00100000;
+	ImagePeHdr.OptionalHeader.SizeOfStackCommit=	0x00001000;
+	ImagePeHdr.OptionalHeader.SizeOfHeapReserve=	0x00100000;
+	ImagePeHdr.OptionalHeader.SizeOfHeapCommit=		0x00001000;
+	ImagePeHdr.OptionalHeader.LoaderFlags=			0;
+	ImagePeHdr.OptionalHeader.NumberOfRvaAndSizes=	IMAGE_NUMBEROF_DIRECTORY_ENTRIES;
+
+	//データ ディクショナリ
+	ImagePeHdr.OptionalHeader.DataDirectory[0].VirtualAddress=MemPos_ExportSection;
+	ImagePeHdr.OptionalHeader.DataDirectory[0].Size=FileSize_ExportSection;
+	ImagePeHdr.OptionalHeader.DataDirectory[1].VirtualAddress=MemPos_ImportSection;//インポートテーブル
+	ImagePeHdr.OptionalHeader.DataDirectory[1].Size=FileSize_ImportSection;
+	ImagePeHdr.OptionalHeader.DataDirectory[2].VirtualAddress=MemPos_RSrcSection;
+	ImagePeHdr.OptionalHeader.DataDirectory[2].Size=RSrcSectionSize;
+	ImagePeHdr.OptionalHeader.DataDirectory[3].VirtualAddress=0;
+	ImagePeHdr.OptionalHeader.DataDirectory[3].Size=0;
+	ImagePeHdr.OptionalHeader.DataDirectory[4].VirtualAddress=0;
+	ImagePeHdr.OptionalHeader.DataDirectory[4].Size=0;
+	ImagePeHdr.OptionalHeader.DataDirectory[5].VirtualAddress=MemPos_RelocSection;
+	ImagePeHdr.OptionalHeader.DataDirectory[5].Size=pobj_Reloc->length;
+	ImagePeHdr.OptionalHeader.DataDirectory[6].VirtualAddress=0;
+	ImagePeHdr.OptionalHeader.DataDirectory[6].Size=0;
+	ImagePeHdr.OptionalHeader.DataDirectory[7].VirtualAddress=0;
+	ImagePeHdr.OptionalHeader.DataDirectory[7].Size=0;
+	ImagePeHdr.OptionalHeader.DataDirectory[8].VirtualAddress=0;
+	ImagePeHdr.OptionalHeader.DataDirectory[8].Size=0;
+	ImagePeHdr.OptionalHeader.DataDirectory[9].VirtualAddress=0;
+	ImagePeHdr.OptionalHeader.DataDirectory[9].Size=0;
+	ImagePeHdr.OptionalHeader.DataDirectory[10].VirtualAddress=0;
+	ImagePeHdr.OptionalHeader.DataDirectory[10].Size=0;
+	ImagePeHdr.OptionalHeader.DataDirectory[11].VirtualAddress=0;
+	ImagePeHdr.OptionalHeader.DataDirectory[11].Size=0;
+	ImagePeHdr.OptionalHeader.DataDirectory[12].VirtualAddress=MemPos_ImportSection+
+		(ImportDllNum+1)*sizeof(IMAGE_IMPORT_DESCRIPTOR)+
+		16*ImportDllNum+	//DLL名
+		LookupSize+			//ルックアップテーブル
+		HintSize;			//ヒント名（関数名）テーブル
+	ImagePeHdr.OptionalHeader.DataDirectory[12].Size=LookupSize;
+	ImagePeHdr.OptionalHeader.DataDirectory[13].VirtualAddress=0;
+	ImagePeHdr.OptionalHeader.DataDirectory[13].Size=0;
+	ImagePeHdr.OptionalHeader.DataDirectory[14].VirtualAddress=0;
+	ImagePeHdr.OptionalHeader.DataDirectory[14].Size=0;
+	ImagePeHdr.OptionalHeader.DataDirectory[15].VirtualAddress=0;
+	ImagePeHdr.OptionalHeader.DataDirectory[15].Size=0;
+
+
+	//コードセクションヘッダ
+	IMAGE_SECTION_HEADER CodeSectionHeader;
+	memset((char *)CodeSectionHeader.Name,0,IMAGE_SIZEOF_SHORT_NAME);
+	lstrcpy((char *)CodeSectionHeader.Name,".text");
+	CodeSectionHeader.Misc.VirtualSize=			MemSize_CodeSection;
+	CodeSectionHeader.VirtualAddress=			MemPos_CodeSection;	//開始アドレス
+	CodeSectionHeader.SizeOfRawData=			FileSize_CodeSection;
+	CodeSectionHeader.PointerToRawData=			FilePos_CodeSection;	//ファイル上の開始アドレス
+	CodeSectionHeader.PointerToRelocations=		0;
+	CodeSectionHeader.PointerToLinenumbers=		0;
+	CodeSectionHeader.NumberOfRelocations=		0;
+	CodeSectionHeader.NumberOfLinenumbers=		0;
+	CodeSectionHeader.Characteristics=			IMAGE_SCN_MEM_EXECUTE|
+												IMAGE_SCN_MEM_READ|
+												IMAGE_SCN_CNT_CODE;
+
+	//エクスポートセクションヘッダ
+	IMAGE_SECTION_HEADER ExportSectionHeader;
+	memset((char *)ExportSectionHeader.Name,0,IMAGE_SIZEOF_SHORT_NAME);
+	lstrcpy((char *)ExportSectionHeader.Name,".edata");
+	ExportSectionHeader.Misc.VirtualSize=		MemSize_ExportSection;
+	ExportSectionHeader.VirtualAddress=			MemPos_ExportSection;	//開始アドレス
+	ExportSectionHeader.SizeOfRawData=			FileSize_ExportSection;	//サイズ
+	ExportSectionHeader.PointerToRawData=		FilePos_ExportSection;	//ファイル上の開始アドレス
+	ExportSectionHeader.PointerToRelocations=	0;
+	ExportSectionHeader.PointerToLinenumbers=	0;
+	ExportSectionHeader.NumberOfRelocations=	0;
+	ExportSectionHeader.NumberOfLinenumbers=	0;
+	ExportSectionHeader.Characteristics=		IMAGE_SCN_CNT_INITIALIZED_DATA|
+												IMAGE_SCN_MEM_READ;
+
+	//インポートセクションヘッダ
+	IMAGE_SECTION_HEADER ImportSectionHeader;
+	memset((char *)ImportSectionHeader.Name,0,IMAGE_SIZEOF_SHORT_NAME);
+	lstrcpy((char *)ImportSectionHeader.Name,".idata");
+	ImportSectionHeader.Misc.VirtualSize=		MemSize_ImportSection;
+	ImportSectionHeader.VirtualAddress=			MemPos_ImportSection;	//開始アドレス
+	ImportSectionHeader.SizeOfRawData=			FileSize_ImportSection;	//サイズ
+	ImportSectionHeader.PointerToRawData=		FilePos_ImportSection;	//ファイル上の開始アドレス
+	ImportSectionHeader.PointerToRelocations=	0;
+	ImportSectionHeader.PointerToLinenumbers=	0;
+	ImportSectionHeader.NumberOfRelocations=	0;
+	ImportSectionHeader.NumberOfLinenumbers=	0;
+	ImportSectionHeader.Characteristics=		IMAGE_SCN_CNT_INITIALIZED_DATA|
+												IMAGE_SCN_MEM_READ;
+
+	//データセクションヘッダ
+	IMAGE_SECTION_HEADER DataSectionHeader;
+	memset((char *)DataSectionHeader.Name,0,IMAGE_SIZEOF_SHORT_NAME);
+	lstrcpy((char *)DataSectionHeader.Name,".sdata");
+	DataSectionHeader.Misc.VirtualSize=			MemSize_DataSection;
+	DataSectionHeader.VirtualAddress=			MemPos_DataSection;
+	DataSectionHeader.SizeOfRawData=			FileSize_DataSection;
+	DataSectionHeader.PointerToRawData=			FilePos_DataSection;
+	DataSectionHeader.PointerToRelocations=		0;
+	DataSectionHeader.PointerToLinenumbers=		0;
+	DataSectionHeader.NumberOfRelocations=		0;
+	DataSectionHeader.NumberOfLinenumbers=		0;
+	DataSectionHeader.Characteristics=			IMAGE_SCN_CNT_INITIALIZED_DATA|
+												IMAGE_SCN_MEM_READ|
+												IMAGE_SCN_MEM_WRITE;
+
+	//リライタブルセクションヘッダ
+	IMAGE_SECTION_HEADER RWSectionHeader;
+	memset((char *)RWSectionHeader.Name,0,IMAGE_SIZEOF_SHORT_NAME);
+	lstrcpy((char *)RWSectionHeader.Name,".data");
+	RWSectionHeader.Misc.VirtualSize=			AllInitGlobalVarSize+AllGlobalVarSize;
+	RWSectionHeader.VirtualAddress=				MemPos_RWSection;
+	RWSectionHeader.SizeOfRawData=				FileSize_RWSection;
+	RWSectionHeader.PointerToRawData=			FilePos_RWSection;
+	RWSectionHeader.PointerToRelocations=		0;
+	RWSectionHeader.PointerToLinenumbers=		0;
+	RWSectionHeader.NumberOfRelocations=		0;
+	RWSectionHeader.NumberOfLinenumbers=		0;
+	RWSectionHeader.Characteristics=			IMAGE_SCN_CNT_INITIALIZED_DATA|
+												IMAGE_SCN_MEM_READ|
+												IMAGE_SCN_MEM_WRITE;
+
+	//リソースセクションヘッダ
+	IMAGE_SECTION_HEADER RSrcSectionHeader;
+	memset((char *)RSrcSectionHeader.Name,0,IMAGE_SIZEOF_SHORT_NAME);
+	lstrcpy((char *)RSrcSectionHeader.Name,".rsrc");
+	RSrcSectionHeader.Misc.VirtualSize=			RSrcSectionSize;
+	RSrcSectionHeader.VirtualAddress=			MemPos_RSrcSection;
+	RSrcSectionHeader.SizeOfRawData=			FileSize_RSrcSection;
+	RSrcSectionHeader.PointerToRawData=			FilePos_RSrcSection;
+	RSrcSectionHeader.PointerToRelocations=		0;
+	RSrcSectionHeader.PointerToLinenumbers=		0;
+	RSrcSectionHeader.NumberOfRelocations=		0;
+	RSrcSectionHeader.NumberOfLinenumbers=		0;
+	RSrcSectionHeader.Characteristics=			IMAGE_SCN_CNT_INITIALIZED_DATA|
+												IMAGE_SCN_MEM_READ;
+
+	//リロケーションセクションヘッダ
+	IMAGE_SECTION_HEADER RelocSectionHeader;
+	memset((char *)RelocSectionHeader.Name,0,IMAGE_SIZEOF_SHORT_NAME);
+	lstrcpy((char *)RelocSectionHeader.Name,".reloc");
+	RelocSectionHeader.Misc.VirtualSize=		pobj_Reloc->length;
+	RelocSectionHeader.VirtualAddress=			MemPos_RelocSection;	//開始アドレス
+	RelocSectionHeader.SizeOfRawData=			FileSize_RelocSection;	//サイズ
+	RelocSectionHeader.PointerToRawData=		FilePos_RelocSection;	//ファイル上の開始アドレス
+	RelocSectionHeader.PointerToRelocations=	0;
+	RelocSectionHeader.PointerToLinenumbers=	0;
+	RelocSectionHeader.NumberOfRelocations=		0;
+	RelocSectionHeader.NumberOfLinenumbers=		0;
+	RelocSectionHeader.Characteristics=			IMAGE_SCN_CNT_INITIALIZED_DATA|
+												IMAGE_SCN_MEM_DISCARDABLE|
+												IMAGE_SCN_MEM_READ;
+
+	//デバッグセクションヘッダ
+	IMAGE_SECTION_HEADER DebugSectionHeader;
+	memset((char *)DebugSectionHeader.Name,0,IMAGE_SIZEOF_SHORT_NAME);
+	lstrcpy((char *)DebugSectionHeader.Name,".debug");
+	DebugSectionHeader.Misc.VirtualSize=		pobj_DebugSection->length;
+	DebugSectionHeader.VirtualAddress=			MemPos_DebugSection;	//開始アドレス
+	DebugSectionHeader.SizeOfRawData=			FileSize_DebugSection;	//サイズ
+	DebugSectionHeader.PointerToRawData=		FilePos_DebugSection;	//ファイル上の開始アドレス
+	DebugSectionHeader.PointerToRelocations=	0;
+	DebugSectionHeader.PointerToLinenumbers=	0;
+	DebugSectionHeader.NumberOfRelocations=		0;
+	DebugSectionHeader.NumberOfLinenumbers=		0;
+	DebugSectionHeader.Characteristics=			IMAGE_SCN_MEM_DISCARDABLE|
+												IMAGE_SCN_MEM_READ;
+
+
+	hFile=CreateFile(OutputFileName,GENERIC_WRITE,0,NULL,CREATE_ALWAYS,FILE_ATTRIBUTE_NORMAL,NULL);
+	if(hFile==INVALID_HANDLE_VALUE){
+		SetError(53,OutputFileName,-1);
+		goto EndWriteOpcode;
+	}
+
+	//ヘッダ
+	WriteFile(hFile,(void *)&ImageDosHeader,sizeof(IMAGE_DOS_HEADER),(DWORD *)&i2,NULL);
+	i=i2;
+
+	//Dosスタブ
+	WriteFile(hFile,DosStubBuffer,DosStubSize,(DWORD *)&i2,NULL);
+	i+=i2;
+
+	//0x0100までNULLを並べる
+	temp2=(char *)HeapAlloc(hHeap,HEAP_ZERO_MEMORY,0x0100-i);
+	WriteFile(hFile,temp2,0x0100-i,(DWORD *)&i2,NULL);
+	HeapDefaultFree(temp2);
+	i+=i2;
+
+	//PEヘッダ
+	WriteFile(hFile,&ImagePeHdr,sizeof(IMAGE_NT_HEADERS),(DWORD *)&i2,NULL);
+	i+=i2;
+
+	//コード セクション ヘッダ
+	WriteFile(hFile,&CodeSectionHeader,sizeof(IMAGE_SECTION_HEADER),(DWORD *)&i2,NULL);
+	i+=i2;
+
+	if(bUse_ExportSection){
+		//エクスポート セクション ヘッダ
+		WriteFile(hFile,&ExportSectionHeader,sizeof(IMAGE_SECTION_HEADER),(DWORD *)&i2,NULL);
+		i+=i2;
+	}
+	if(bUse_ImportSection){
+		//インポート セクション ヘッダ
+		WriteFile(hFile,&ImportSectionHeader,sizeof(IMAGE_SECTION_HEADER),(DWORD *)&i2,NULL);
+		i+=i2;
+	}
+	if(bUse_DataSection){
+		//データ セクション ヘッダ
+		WriteFile(hFile,&DataSectionHeader,sizeof(IMAGE_SECTION_HEADER),(DWORD *)&i2,NULL);
+		i+=i2;
+	}
+	if(bUse_RWSection){
+		//リライタブルセクションヘッダ
+		WriteFile(hFile,&RWSectionHeader,sizeof(IMAGE_SECTION_HEADER),(DWORD *)&i2,NULL);
+		i+=i2;
+	}
+	if(bUse_RSrcSection){
+		//リソースセクションヘッダ
+		WriteFile(hFile,&RSrcSectionHeader,sizeof(IMAGE_SECTION_HEADER),(DWORD *)&i2,NULL);
+		i+=i2;
+	}
+	if(bUse_RelocSection){
+		//リロケーションセクションヘッダ
+		WriteFile(hFile,&RelocSectionHeader,sizeof(IMAGE_SECTION_HEADER),(DWORD *)&i2,NULL);
+		i+=i2;
+	}
+	if(bUse_DebugSection){
+		//デバッグセクションヘッダ
+		WriteFile(hFile,&DebugSectionHeader,sizeof(IMAGE_SECTION_HEADER),(DWORD *)&i2,NULL);
+		i+=i2;
+	}
+
+	//EXE_HEADER_SIZEまでNULLを並べる
+	temp2=(char *)HeapAlloc(hHeap,HEAP_ZERO_MEMORY,EXE_HEADER_SIZE-i);
+	WriteFile(hFile,temp2,EXE_HEADER_SIZE-i,(DWORD *)&i2,NULL);
+	HeapDefaultFree(temp2);
+	i+=i2;
+
+	//コード
+	WriteFile(hFile,OpBuffer,obp,(DWORD *)&i2,NULL);
+	i+=i2;
+
+	//FilePos_ExportSectionまでNULLを並べる
+	temp2=(char *)HeapAlloc(hHeap,HEAP_ZERO_MEMORY,FilePos_ExportSection-i);
+	WriteFile(hFile,temp2,FilePos_ExportSection-i,(DWORD *)&i2,NULL);
+	HeapDefaultFree(temp2);
+	i+=i2;
+
+	if(bUse_ExportSection){
+		//エクスポート ディレクトリ テーブル
+		WriteFile(hFile,&ImageExportDirectory,sizeof(IMAGE_EXPORT_DIRECTORY),(DWORD *)&i2,NULL);
+		i+=i2;
+
+		//エクスポート アドレス テーブル
+		WriteFile(hFile,lpdwExportAddressTable,ExportNum*sizeof(DWORD),(DWORD *)&i2,NULL);
+		i+=i2;
+
+		//エクスポート名ポインタ テーブル
+		WriteFile(hFile,lpdwExportNamePointerTable,ExportNum*sizeof(DWORD),(DWORD *)&i2,NULL);
+		i+=i2;
+
+		//エクスポート序数テーブル
+		WriteFile(hFile,lpwExportOrdinalTable,ExportNum*sizeof(WORD),(DWORD *)&i2,NULL);
+		i+=i2;
+
+		//シンボル名
+		WriteFile(hFile,lpExportNames,ExportNamesLength,(DWORD *)&i2,NULL);
+		i+=i2;
+	}
+
+	//FilePos_ImportSectionまでNULLを並べる
+	temp2=(char *)HeapAlloc(hHeap,HEAP_ZERO_MEMORY,FilePos_ImportSection-i);
+	WriteFile(hFile,temp2,FilePos_ImportSection-i,(DWORD *)&i2,NULL);
+	HeapDefaultFree(temp2);
+	i+=i2;
+
+	if(bUse_ImportSection){
+		//インポート ディレクトリ テーブル（Nullディレクトリ テーブルを含む）
+		for(i3=0;i3<(ImportDllNum+1);i3++){
+			WriteFile(hFile,&pImportTable[i3],sizeof(IMAGE_IMPORT_DESCRIPTOR),(DWORD *)&i2,NULL);
+			i+=i2;
+		}
+
+		//DLL名
+		for(i3=0;i3<ImportDllNum;i3++){
+			WriteFile(hFile,ppDllNames[i3],16,(DWORD *)&i2,NULL);
+			i+=i2;
+		}
+
+		//ルックアップ テーブル
+		WriteFile(hFile,pLookupTable,LookupSize,(DWORD *)&i2,NULL);
+		i+=i2;
+
+		//ヒント テーブル
+		WriteFile(hFile,pHintTable,HintSize,(DWORD *)&i2,NULL);
+		i+=i2;
+
+		//インポート アドレス テーブル
+		WriteFile(hFile,pLookupTable,LookupSize,(DWORD *)&i2,NULL);
+		i+=i2;
+	}
+
+	//FilePos_DataSectionまでNULLを並べる
+	temp2=(char *)HeapAlloc(hHeap,HEAP_ZERO_MEMORY,FilePos_DataSection-i);
+	WriteFile(hFile,temp2,FilePos_DataSection-i,(DWORD *)&i2,NULL);
+	HeapDefaultFree(temp2);
+	i+=i2;
+
+	if(bUse_DataSection){
+		//データ テーブル
+		WriteFile(hFile,dataTable.GetPtr(),dataTable.GetSize(),(DWORD *)&i2,NULL);
+		i+=i2;
+	}
+
+	//FilePos_RWSectionまでNULLを並べる
+	temp2=(char *)HeapAlloc(hHeap,HEAP_ZERO_MEMORY,FilePos_RWSection-i);
+	WriteFile(hFile,temp2,FilePos_RWSection-i,(DWORD *)&i2,NULL);
+	HeapDefaultFree(temp2);
+	i+=i2;
+
+	if(bUse_RWSection){
+		//リライタブル データ テーブル（グローバル変数の初期バッファ）
+		initGlobalBuf=(BYTE *)HeapReAlloc(hHeap,
+			HEAP_ZERO_MEMORY,
+			initGlobalBuf,
+			FileSize_RWSection);
+		WriteFile(hFile,initGlobalBuf,FileSize_RWSection,(DWORD *)&i2,NULL);
+		i+=i2;
+	}
+
+	//FilePos_RSrcSectionまでNULLを並べる
+	temp2=(char *)HeapAlloc(hHeap,HEAP_ZERO_MEMORY,FilePos_RSrcSection-i);
+	WriteFile(hFile,temp2,FilePos_RSrcSection-i,(DWORD *)&i2,NULL);
+	HeapDefaultFree(temp2);
+	i+=i2;
+
+	if(bUse_RSrcSection){
+		//リソースバッファ
+		WriteFile(hFile,RSrcSectionBuffer,RSrcSectionSize,(DWORD *)&i2,NULL);
+		i+=i2;
+	}
+
+	//FilePos_RelocSectionまでNULLを並べる
+	temp2=(char *)HeapAlloc(hHeap,HEAP_ZERO_MEMORY,FilePos_RelocSection-i);
+	WriteFile(hFile,temp2,FilePos_RelocSection-i,(DWORD *)&i2,NULL);
+	HeapDefaultFree(temp2);
+	i+=i2;
+
+	if(bUse_RelocSection){
+		//リロケーション情報
+		WriteFile(hFile,pobj_Reloc->buffer,pobj_Reloc->length,(DWORD *)&i2,NULL);
+		i+=i2;
+	}
+
+	//ファイルアラインメントを考慮
+	if(i%FILE_ALIGNMENT){
+		temp2=(char *)HeapAlloc(hHeap,HEAP_ZERO_MEMORY,FILE_ALIGNMENT-i%FILE_ALIGNMENT);
+		WriteFile(hFile,temp2,FILE_ALIGNMENT-i%FILE_ALIGNMENT,(DWORD *)&i2,NULL);
+		HeapDefaultFree(temp2);
+		i+=i2;
+	}
+
+	if(bUse_DebugSection){
+		//デバッグセクション
+		WriteFile(hFile,pobj_DebugSection->buffer,pobj_DebugSection->length,(DWORD *)&i2,NULL);
+		i+=i2;
+	}
+
+	//ファイルアラインメントを考慮
+	if(i%FILE_ALIGNMENT){
+		temp2=(char *)HeapAlloc(hHeap,HEAP_ZERO_MEMORY,FILE_ALIGNMENT-i%FILE_ALIGNMENT);
+		WriteFile(hFile,temp2,FILE_ALIGNMENT-i%FILE_ALIGNMENT,(DWORD *)&i2,NULL);
+		HeapDefaultFree(temp2);
+		i+=i2;
+	}
+
+	//書き込み終了
+	CloseHandle(hFile);
+
+
+EndWriteOpcode:
+
+	//Dosスタブ用のメモリを解放
+	HeapDefaultFree(DosStubBuffer);
+
+	//エクスポート テーブル情報を解放
+	HeapDefaultFree(lpdwExportAddressTable);
+	HeapDefaultFree(lpdwExportNamePointerTable);
+	HeapDefaultFree(lpwExportOrdinalTable);
+
+	//インポートDLL情報を解放
+	HeapDefaultFree(pImportTable);
+	for(i=0;i<ImportDllNum;i++)
+		HeapDefaultFree(ppDllNames[i]);
+	HeapDefaultFree(ppDllNames);
+
+	//ルックアップテーブルに関する情報を解放
+	HeapDefaultFree(pLookupTable);
+
+	//ヒントテーブルに関する情報を解放
+	HeapDefaultFree(pHintTable);
+
+	//グローバル変数の初期バッファを解放
+	HeapDefaultFree(initGlobalBuf);
+
+	//コードバッファを解放
+	HeapDefaultFree(OpBuffer);
+	OpBuffer=0;
+
+	//リソースセクションバッファを解放
+	HeapDefaultFree(RSrcSectionBuffer);
+
+	//デバッグセクションを開放
+	delete pobj_DebugSection;
+
+	//リロケーション情報を解放
+	delete pobj_Reloc;
+
+	//列挙体に関する情報の破棄
+	CEnumParent::DestroyEnum();
+
+	//クラスに関するメモリを解放
+	delete pobj_DBClass;
+	pobj_DBClass=0;
+}
Index: /trunk/abdev/BasicCompiler32/NumOpe.cpp
===================================================================
--- /trunk/abdev/BasicCompiler32/NumOpe.cpp	(revision 148)
+++ /trunk/abdev/BasicCompiler32/NumOpe.cpp	(revision 148)
@@ -0,0 +1,1132 @@
+#include "../BasicCompiler_Common/common.h"
+#include "Opcode.h"
+
+void PushReturnValue(int type){
+	//関数の戻り値をスタックへプッシュする
+	//※この処理内では、esi、ediは使用不可
+
+	if(type==DEF_OBJECT || type==DEF_STRUCT){
+		//push eax
+		op_push(REG_EAX);
+	}
+	else if(type==DEF_DOUBLE){
+		//sub esp,8
+		op_sub_esp(8);
+
+		//fstp qword ptr[esp]
+		OpBuffer[obp++]=(char)0xDD;
+		OpBuffer[obp++]=(char)0x1C;
+		OpBuffer[obp++]=(char)0x24;
+	}
+	else if(type==DEF_SINGLE){
+		//sub esp,4
+		op_sub_esp(4);
+
+		//fstp dword ptr[esp]
+		OpBuffer[obp++]=(char)0xD9;
+		OpBuffer[obp++]=(char)0x1C;
+		OpBuffer[obp++]=(char)0x24;
+	}
+	else if(type==DEF_INT64||type==DEF_QWORD){
+		//push edx
+		op_push(REG_EDX);
+
+		//push eax
+		op_push(REG_EAX);
+	}
+	else if(type==DEF_LONG){
+		//push eax
+		op_push(REG_EAX);
+	}
+	else if(type==DEF_INTEGER || (isUnicode&&type==DEF_CHAR)){
+		//movsx ebx,ax
+		OpBuffer[obp++]=(char)0x0F;
+		OpBuffer[obp++]=(char)0xBF;
+		OpBuffer[obp++]=(char)0xD8;
+
+		//push ebx
+		op_push(REG_EBX);
+	}
+	else if(type==DEF_SBYTE || (isUnicode==false&&type==DEF_CHAR)){
+		//movsx ebx,al
+		OpBuffer[obp++]=(char)0x0F;
+		OpBuffer[obp++]=(char)0xBE;
+		OpBuffer[obp++]=(char)0xD8;
+
+		//push ebx
+		op_push(REG_EBX);
+	}
+	else if(type==DEF_DWORD||type==DEF_WORD||type==DEF_BYTE||type==DEF_BOOLEAN||
+		IsPtrType(type)){
+		//push eax
+		op_push(REG_EAX);
+	}
+	else{
+		SetError();
+	}
+}
+
+void NewStringObject( const char *str ){
+	///////////////////////////////////////////////////////
+	// lpszTextを元にStringオブジェクトを生成し、
+	// オブジェクトポインタをregに格納する
+	///////////////////////////////////////////////////////
+
+	char *parameter = (char *)malloc( lstrlen( str ) + 32 );
+	sprintf( parameter, "\"%s\"%c%c*Char", str, 1, ESC_AS );
+	SetStringQuotes( parameter );
+
+	Operator_New( *pobj_DBClass->GetStringClassPtr(), "", parameter, Type( DEF_OBJECT, *pobj_DBClass->GetStringClassPtr() ) );
+
+	free( parameter );
+}
+
+void ExtendRegToBigType( int reg, int bigBasicType, int baseBasicType ){
+	if( reg != REG_EAX ){
+		SetError();
+	}
+	switch( Type::GetBasicSize( bigBasicType ) ){
+		case sizeof(_int64):
+			ExtendTypeTo64(baseBasicType);
+			break;
+		case sizeof(long):
+			ExtendTypeTo32(baseBasicType,reg);
+			break;
+		case sizeof(short):
+			ExtendTypeTo16(baseBasicType,reg);
+			break;
+	}
+}
+
+
+
+bool VarToReg( RELATIVE_VAR &relativeVar, const Type &baseType, Type &resultType ){
+	const int useReg = REG_EAX;
+
+	//大きな型への暗黙の変換
+	int bigType = AutoBigCast(baseType.GetBasicType(),resultType.GetBasicType());
+
+	if(resultType.GetBasicType()&FLAG_PTR){
+		//配列ポインタ
+		resultType.SetBasicType( GetPtrType(resultType.GetBasicType()^FLAG_PTR) );
+
+		SetVarPtrToReg(useReg, &relativeVar);
+	}
+	else if( resultType.IsStruct() ){
+		//構造体ポインタをeaxへ格納（構造体は値型）
+		SetVarPtrToReg(useReg, &relativeVar);
+	}
+	else if( resultType.IsReal() ){
+		// 実数
+		SetReg_RealVariable( resultType.GetBasicType(), &relativeVar );
+	}
+	else if( resultType.IsWhole() || resultType.IsObject()){
+		//整数型
+		SetReg_WholeVariable(resultType.GetBasicType(),&relativeVar,useReg);
+	}
+	else if( resultType.IsStruct() ){
+		//構造体ポインタをUseRegへ格納（構造体は値型）
+		SetVarPtrToReg(useReg,&relativeVar);
+	}
+	else{
+		return false;
+	}
+
+	if( resultType.GetBasicType() != bigType ){
+		// 大きな型へ変換された場合
+		// ※レジスタの値をキャストする
+		ExtendRegToBigType( useReg, bigType, resultType.GetBasicType() );
+
+		resultType.SetBasicType( bigType );
+	}
+
+	return true;
+}
+bool TermMemberOpe( const CClass &objClass, const Type &baseType, Type &resultType, const char *termFull, const char *termLeft, const char *member ){
+	const int useReg = REG_EAX;
+
+	if( GetMemberType( objClass, member, resultType, 0, false ) ){
+		// メンバが見つかったとき
+
+		//オブジェクトポインタをecxにコピー
+		op_mov_RR( REG_ECX, useReg );
+
+		RELATIVE_VAR relativeVar;
+		relativeVar.dwKind=VAR_DIRECTMEM;
+
+		if( !_member_offset(
+			true,	//エラー表示あり
+			false,	//読み込み専用
+			objClass,
+			member,&relativeVar,resultType,0)){
+				return false;
+		}
+
+		if( !VarToReg( relativeVar, baseType, resultType ) ){
+			SetError(11,termFull,cp);
+		}
+
+		return true;
+	}
+
+
+	///////////////////////////////////////////////////////////////////
+	// 動的メソッドを検索
+	///////////////////////////////////////////////////////////////////
+	vector<UserProc *> userProcs;
+
+	char methodName[VN_SIZE], lpPtrOffset[VN_SIZE], parameter[VN_SIZE], dummy[1];
+	CClass::RefType refType;
+	lstrcpy( methodName, member );
+	GetVarFormatString(methodName,parameter,lpPtrOffset,dummy,refType);
+
+	objClass.GetMethods().Enum( methodName, userProcs );
+	UserProc *pUserProc;
+	if(userProcs.size()){
+		//オーバーロードを解決
+		pUserProc=OverloadSolutionWithStrParam(termFull,userProcs,parameter,termLeft);
+
+		if( pUserProc ){
+
+			resultType = pUserProc->ReturnType();
+
+			{
+				//オブジェクトポインタをスタックに入れておく
+				//push reg
+				op_push( useReg );
+
+				if( !Opcode_CallProc(parameter,pUserProc,PROCFLAG_NEW,termLeft,0 ) ){
+
+					return false;
+				}
+
+				op_pop();
+
+				/////////////////////
+				// 戻り値の処理
+				/////////////////////
+
+				//大きな型への暗黙の変換
+				int bigType = AutoBigCast(baseType.GetBasicType(), resultType.GetBasicType() );
+
+				if( resultType.GetBasicType() != bigType ){
+					// 大きな型へ変換された場合
+					// ※レジスタの値をキャストする
+					ExtendRegToBigType( REG_EAX, bigType, resultType.GetBasicType() );
+
+					resultType.SetBasicType( bigType );
+				}
+
+				//SetUseRegFromRax(resultType.GetBasicType(),UseReg,XmmReg);
+			}
+			
+			return true;
+		}
+	}
+
+	return false;
+}
+bool TermOpe( const char *term, const Type &baseType, Type &resultType, bool &isLiteral, BOOL *pbUseHeap, bool isWantObject, bool *pIsClassName, bool isProcedureCallOnly ){
+	char parameter[VN_SIZE];
+
+	// Withを解決
+	char termFull[VN_SIZE];
+	if(term[0]=='.'){
+		GetWithName(termFull);
+		lstrcat(termFull,term);
+	}
+	else lstrcpy(termFull,term);
+
+	char termLeft[VN_SIZE];
+	lstrcpy(termLeft,termFull);
+
+	// パース
+	char member[VN_SIZE];
+	CClass::RefType refType;
+	if( SplitMemberName( termFull, termLeft, member, refType ) ){
+		///////////////////////////////////////////////////////////////////
+		// オブジェクトとメンバに分解できるとき
+		// termLeft.member
+		///////////////////////////////////////////////////////////////////
+
+		isLiteral = false;
+
+		// オブジェクト側の型を取得
+		bool isClassName = false;
+		Type leftType;
+		if( GetTermType( termLeft, leftType, isLiteral, &isClassName ) ){
+			if( isClassName == false && Smoothie::Meta::blittableTypes.IsExist( leftType ) ){
+				// 左側のオブジェクト部分がBlittable型のとき
+
+				char temporary[VN_SIZE];
+				lstrcpy( temporary, termLeft );
+				sprintf( termLeft, "%s(%s)",
+					Smoothie::Meta::blittableTypes.Find( leftType ).GetCreateStaticMethodFullName().c_str(),
+					temporary );
+			}
+		}
+
+		if( !TermOpe( termLeft, baseType, leftType, isLiteral, pbUseHeap, true, &isClassName ) ){
+			goto globalArea;
+		}
+
+		if( isClassName ){
+			// 静的メンバ/メソッドの場合
+			goto globalArea;
+		}
+
+		if( !leftType.HasMember() ){
+			// メンバを持たない型の場合
+			return false;
+		}
+
+		return TermMemberOpe( leftType.GetClass(), baseType, resultType, termFull, termLeft, member );
+	}
+globalArea:
+
+
+	//////////////////////////////////////////////
+	// クラス名かどうかをチェック（静的メンバ用）
+	//////////////////////////////////////////////
+
+	if( pIsClassName ){
+		if( pobj_DBClass->Find( termFull ) ){
+			*pIsClassName = true;
+			return true;
+		}
+	}
+
+
+	/////////////////////////////////////////////////////////////////
+	// グローバル属性エリア
+	/////////////////////////////////////////////////////////////////
+
+	const int useReg = REG_EAX;
+
+
+	if(lstrcmpi(termFull,"This")==0 && isProcedureCallOnly == false ){
+		//Thisオブジェクト
+		resultType.SetType( DEF_OBJECT, pobj_CompilingClass );
+
+		SetThisPtrToReg( useReg );
+
+		isLiteral = false;
+
+		return true;
+	}
+
+
+	//////////////////////////////////////
+	// 関数（DLL、ユーザー定義、組み込み）
+	//////////////////////////////////////
+	char procName[VN_SIZE];
+	char temporary[8192];
+
+	int i2=GetCallProcName(termFull,procName);
+	if(termFull[i2]=='('){
+		int i4=GetStringInPare_RemovePare(parameter,termFull+i2+1);
+
+		void *pInfo;
+		int idProc=GetProc(procName,(void **)&pInfo);
+
+		if(idProc){
+			//閉じカッコ")"に続く文字がNULLでないとき
+			if(termFull[i2+1+i4+1]!='\0'){
+				SetError(42,NULL,cp);
+			}
+
+
+			{
+				////////////////
+				// 呼び出し
+				////////////////
+
+				CallProc(idProc,pInfo,procName,parameter,resultType);
+
+
+				/////////////////////
+				// 戻り値の処理
+				/////////////////////
+
+				//大きな型への暗黙の変換
+				int bigType = AutoBigCast(baseType.GetBasicType(), resultType.GetBasicType() );
+
+				/*
+				※後でNumOpe内でプッシュする
+				//スタックへプッシュ
+				PushReturnValue( resultType.GetBasicType() );
+				*/
+
+				if( resultType.GetBasicType() != bigType ){
+					// 大きな型へ変換された場合
+					// ※レジスタの値をキャストする
+					ExtendRegToBigType( useReg, bigType, resultType.GetBasicType() );
+
+					resultType.SetBasicType( bigType );
+				}
+
+				//SetUseRegFromRax(resultType.GetBasicType(),UseReg,XmmReg);
+			}
+
+
+			if(resultType.IsStruct()){
+				//構造体が戻ったときはヒープ領域にインスタンスが格納されている
+				//※後にfreeする必要あり
+				// TODO: 解放はGCに任せる
+				*pbUseHeap = 1;
+			}
+
+			isLiteral = false;
+
+			return true;
+		}
+		else if(GetConstCalcBuffer(procName,parameter,temporary)){
+			/////////////////////////
+			// マクロ関数
+			/////////////////////////
+
+			//閉じカッコ")"に続く文字がNULLでないときはエラーにする
+			if(termFull[i2+1+i4+1]!='\0') SetError(42,NULL,cp);
+
+			//マクロ関数の場合
+			NumOpe(useReg, temporary,Type(),resultType);
+
+			if(!IS_LITERAL(resultType.GetIndex())){
+				//リテラル値ではなかったとき
+				isLiteral = false;
+			}
+
+			return true;
+		}
+	}
+	else if( isProcedureCallOnly ){
+		// 関数呼び出し以外は受け付けない
+		return false;
+	}
+
+
+	////////////////////////////////
+	// インデクサ（getアクセサ）
+	////////////////////////////////
+
+	char VarName[VN_SIZE],ArrayElements[VN_SIZE];
+	GetArrayElement(termFull,VarName,ArrayElements);
+	if(ArrayElements[0]){
+		GetVarType(VarName,resultType,false);
+		if( resultType.IsObject() ){
+			CallIndexerGetterProc(/*UseReg,*/&resultType.GetClass(),VarName,ArrayElements,resultType);
+
+			isLiteral = false;
+
+			return true;
+		}
+	}
+
+
+	////////////////////////////////
+	// 変数
+	////////////////////////////////
+
+	RELATIVE_VAR relativeVar;
+	if(GetVarOffset(
+		false,	//エラー表示なし
+		false,	//読み込み専用
+		termFull,
+		&relativeVar,resultType)){
+		//////////
+		// 変数
+		//////////
+
+		if( !VarToReg( relativeVar, baseType, resultType ) ){
+			SetError(11,termFull,cp);
+		}
+
+		isLiteral = false;
+
+		return true;
+	}
+
+
+	/////////////////////////////////
+	// プロパティ用のメソッド
+	/////////////////////////////////
+
+	//配列要素を排除
+	GetArrayElement(termFull,VarName,ArrayElements);
+
+	if(GetSubHash(VarName,0)){
+
+		{
+			CallPropertyMethod(termFull,NULL,resultType);
+
+			//大きな型への暗黙の変換
+			int bigType = AutoBigCast(baseType.GetBasicType(), resultType.GetBasicType() );
+
+			if( resultType.GetBasicType() != bigType ){
+				// 大きな型へ変換された場合
+				// ※レジスタの値をキャストする
+				ExtendRegToBigType( REG_EAX, bigType, resultType.GetBasicType() );
+
+				resultType.SetBasicType( bigType );
+			}
+
+			//SetUseRegFromRax(resultType.GetBasicType(),UseReg,XmmReg);
+		}
+
+
+		if(resultType.IsStruct()){
+			//構造体が戻ったときはヒープ領域にインスタンスが格納されている
+			//※後にfreeする必要あり
+			// TODO: 解放はGCに任せる
+			*pbUseHeap = 1;
+		}
+
+		isLiteral = false;
+
+		return true;
+	}
+
+
+	return false;
+}
+
+
+bool NumOpe( int reg,
+			const char *expression,
+			const Type &baseType,
+			Type &resultType,
+			BOOL *pbUseHeap ){
+
+	if( !NumOpe( expression, baseType, resultType, pbUseHeap ) ){
+		return false;
+	}
+
+	if( reg != REG_EAX ){
+		// TODO: 未実装
+		SetError();
+	}
+
+	if( resultType.IsReal() ){
+		//fld ptr[esp]
+		op_fld_ptr_esp( resultType.GetBasicType() );
+
+		//add esp,size
+		op_add_esp( resultType.GetBasicSize() );
+	}
+	else{
+		//pop eax
+		op_pop(REG_EAX);
+
+		if( resultType.Is64() ){
+			//pop edx
+			op_pop(REG_EDX);
+		}
+	}
+	return true;
+}
+bool NumOpe( const char *expression,
+			const Type &baseType,
+			Type &resultType,
+			BOOL *pbUseHeap ){
+
+	int i,i2,i3;
+	char temporary[1024],temp2[1024];
+
+	if(expression[0]=='\0'){
+		SetError(1,NULL,cp);
+		return false;
+	}
+
+	if(expression[0]==1&& expression[1]==ESC_NEW ){
+		//New演算子（オブジェクト生成）
+
+		if( !Operator_New( expression+2, baseType, resultType ) ){
+			return false;
+		}
+
+		return true;
+	}
+
+	if( !baseType.IsNull() && expression[0] == '[' ){
+		// リテラル配列の場合
+
+		if( !baseType.IsPointer() ){
+			SetError(1,NULL,cp);
+			return false;
+		}
+		Type tempBaseType( baseType );
+		tempBaseType.PtrLevelDown();
+
+		char *buffer = (char *)malloc( lstrlen( expression ) + 1 );
+		lstrcpy( buffer, expression );
+		RemoveStringBracket( buffer );
+
+		void *binary = malloc( 1 );
+		int num = 0;
+
+		i = 0;
+		while( buffer[i] ){
+			i = GetOneParameter( buffer, i, temporary );
+			if( buffer[i] == ',' ){
+				i++;
+			}
+
+			Type resultType;
+			_int64 i64data;
+			if( !StaticCalculation( true, temporary, tempBaseType.GetBasicType(), &i64data, resultType ) ){
+				return false;
+			}
+			if( !resultType.IsWhole() ){
+				// TODO: 実数に未対応
+				SetError();
+				return false;
+			}
+
+			binary = realloc( binary, ( num + 1 ) * tempBaseType.GetSize() );
+			memcpy( (char *)binary + (num * tempBaseType.GetSize()), &i64data, tempBaseType.GetSize() );
+			num++;
+		}
+
+		i2 = dataTable.AddBinary( binary, num * tempBaseType.GetSize() );
+
+		//mov eax,i2
+		op_mov_RV(REG_EAX,i2);
+		obp-=sizeof(long);
+		pobj_DataTableSchedule->add();
+		obp+=sizeof(long);
+
+		free( buffer );
+
+		resultType = baseType;
+
+		//push eax
+		op_push( REG_EAX );
+
+		return true;
+	}
+
+
+	/////////////////////////////////
+	// 式要素を逆ポーランド式で取得
+	/////////////////////////////////
+
+	char *values[255];
+	long calc[255];
+	long stack[255];
+	int pnum;
+	if(!GetNumOpeElements(expression,&pnum,values,calc,stack)){
+		for(i=0;i<pnum;i++){
+			if(values[i]) HeapDefaultFree(values[i]);
+		}
+		return false;
+	}
+
+
+	BOOL bError;
+	bError=0;
+
+	//リテラル値のみの計算かどうかを判別するためのフラグ
+	BOOL bLiteralCalculation=1;
+
+	//リテラル演算の場合を考慮した演算前のバッファ位置
+	int BeforeObp;
+	BeforeObp=obp;
+
+	//リテラル演算の場合を考慮した演算前のプロシージャスケジュール位置
+	//※64ビットの掛け算、除算などで特殊関数が呼ばれるため
+	int Before_ProcAddrScheduleNum;
+	Before_ProcAddrScheduleNum=pobj_SubAddrSchedule->num;
+
+	//リテラル演算の場合を考慮した演算前のデータテーブルスケジュール位置
+	int Before_DataTableScheduleNum;
+	Before_DataTableScheduleNum=pobj_DataTableSchedule->num;
+
+	//リテラル演算の場合を考慮した演算前の再配置スケジュール
+	CReloc *pobj_BackReloc;
+	pobj_BackReloc=new CReloc();
+	pobj_BackReloc->copy(pobj_Reloc);
+
+	double dbl;
+	int sp;
+	int type_stack[255];
+	bool isNothing_stack[255];
+	LONG_PTR index_stack[255];
+	BOOL bUseHeap[255];
+	_int64 i64data;
+	for(i=0,sp=0;i<pnum;i++){
+		int idCalc;
+		idCalc=calc[i]%100;
+
+		if(idCalc){
+			if(type_stack[sp-2]==DEF_OBJECT){
+				if( idCalc == CALC_AS
+					&& type_stack[sp-1] == ( DEF_OBJECT | FLAG_CAST )
+					&& index_stack[sp-1] == index_stack[sp-2]
+					|| isNothing_stack[sp-2] ){
+						// 同一の型、またはNothingに対するAsはAs演算子を呼び出さない
+				}
+				else if( idCalc == CALC_AS
+					&& type_stack[sp-1] == ( DEF_OBJECT | FLAG_CAST )
+					&& ( ((CClass *)index_stack[sp-1])->IsEqualsOrSubClass( (CClass *)index_stack[sp-2] ) || ((CClass *)index_stack[sp-2])->IsEqualsOrSubClass( (CClass *)index_stack[sp-1] )
+					)){
+						// ダウンキャストを許可する
+				}
+				else{
+					//オーバーロードされたオペレータを呼び出す
+					i2=CallOperatorProc(idCalc,baseType,type_stack,index_stack,bUseHeap,sp);
+					if(i2==0){
+						if(idCalc==CALC_EQUAL) lstrcpy(temp2,"==");
+						else GetCalcName(idCalc,temp2);
+						sprintf(temporary,"Operator %s",temp2);
+						SetError(27,temporary,cp);
+						goto error;
+					}
+					else if(i2==-1) goto error;
+
+					continue;
+				}
+			}
+
+			if(!CheckCalcType(idCalc,type_stack,sp)) goto error;
+		}
+
+		switch(idCalc){
+			//数値
+			case 0:
+				index_stack[sp]=-1;
+				isNothing_stack[sp] = false;
+				bUseHeap[sp]=0;
+
+				char *term;
+				term=values[i];
+
+				if( calc[i+1]%100 == CALC_AS ){
+					// As演算子の右辺値
+					//型名
+					if( Type::StringToType( term, resultType ) ){
+						resultType.SetBasicType( resultType.GetBasicType() | FLAG_CAST );
+					}
+					else{
+						SetError(3, term, cp );
+						goto error;
+					}
+
+					type_stack[sp] = resultType.GetBasicType();
+					index_stack[sp] = resultType.GetIndex();
+					sp++;
+
+					break;
+				}
+
+				if(term[0]=='\"'){
+					//リテラル文字列
+					if(!RemoveStringQuotes(term)){
+						SetError(43,NULL,cp);
+						goto error;
+					}
+					i3=lstrlen(term);
+StrLiteral:
+
+					if( baseType.IsObject() || baseType.IsNull() ){
+						//要求タイプがオブジェクト、または未定のとき
+
+						//String型オブジェクトを生成
+						NewStringObject(term);
+
+						type_stack[sp]=DEF_OBJECT;
+						index_stack[sp]=(LONG_PTR)pobj_DBClass->GetStringClassPtr();
+						bLiteralCalculation=0;
+
+						sp++;
+						break;
+					}
+
+
+					type_stack[sp]=typeOfPtrChar;
+					bLiteralCalculation=0;
+
+					i2=dataTable.AddString(term,i3);
+
+					//push DataSize
+					OpBuffer[obp++]=(char)0x68;
+					*((long *)(OpBuffer+obp))=i2;
+					pobj_DataTableSchedule->add();
+					obp+=sizeof(long);
+				}
+				else if((term[0]=='e'||term[0]=='E')&&
+					(term[1]=='x'||term[1]=='X')&&
+					term[2]=='\"'){
+					//拡張版リテラル文字列（エスケープシーケンス可能）
+					if(!RemoveStringQuotes(term+2)){
+						SetError(43,NULL,cp);
+						goto error;
+					}
+					i3=FormatString_EscapeSequence(term+2);
+					term+=2;
+
+					goto StrLiteral;
+				}
+				else if(IsVariableTopChar(term[0])||
+					term[0]=='*'||
+					(term[0]=='.'&&IsVariableTopChar(term[1]))){
+					//////////////////
+					// 何らかの識別子
+
+					bool isLiteral;
+					if( TermOpe( term, baseType, resultType, isLiteral, &bUseHeap[sp] ) ){
+						if(resultType.IsNull()){
+							//戻り値が存在しないとき
+							for(i2=0;;i2++){
+								if(term[i2]=='('||term[i2]=='\0'){
+									term[i2]=0;
+									break;
+								}
+							}
+							SetError(38,term,cp);
+
+							goto error;
+						}
+
+						type_stack[sp] = resultType.GetBasicType();
+						index_stack[sp] = resultType.GetIndex();
+
+						if( !isLiteral ){
+							bLiteralCalculation=0;
+						}
+
+						if( resultType.GetBasicType() & FLAG_CAST ){
+							// 型名のみ
+							SetError();
+						}
+						else{
+							if( resultType.IsReal() ){
+								//sub esp,size
+								//fstp ptr[esp]
+								op_fstp_push( resultType );
+							}
+							else{
+								if( resultType.Is64() ){
+									//push edx
+									op_push( REG_EDX );
+								}
+								else{
+									ExtendTypeTo32( resultType.GetBasicType(), REG_EAX );
+								}
+
+								//push eax
+								op_push( REG_EAX );
+							}
+						}
+
+						sp++;
+						break;
+					}
+
+
+					// Nothing
+					if( lstrcmp( term, "Nothing" ) == 0 ){
+						isNothing_stack[sp] = true;
+
+						type_stack[sp] = DEF_OBJECT;
+						if( baseType.IsObject() ){
+							index_stack[sp] = baseType.GetIndex();
+						}
+						else{
+							index_stack[sp] = (LONG_PTR)pobj_DBClass->GetObjectClassPtr();
+						}
+
+						bLiteralCalculation = 0;
+
+						//push 0
+						op_push_V( 0 );
+
+						sp++;
+						break;
+					}
+
+
+					//////////////
+					// 定数の場合
+					//////////////
+
+					i3 = CDBConst::obj.GetBasicType(term);
+					if(i3){
+						if( CDBConst::obj.IsStringPtr( term ) ){
+							//リテラル文字列
+
+							double dbl = CDBConst::obj.GetDoubleData(term);
+							memcpy(&i64data,&dbl,sizeof(double));
+
+							//バイト数
+							i3=lstrlen((char *)i64data);
+
+							memcpy(term,(char *)i64data,i3);
+							term[i3]=0;
+							goto StrLiteral;
+						}
+
+						type_stack[sp]=i3;
+						if(IsRealNumberType(i3)){
+							//実数
+							double dbl = CDBConst::obj.GetDoubleData(term);
+							memcpy(&i64data,&dbl,sizeof(double));
+							goto Literal;
+						}
+						else if(IsWholeNumberType(i3)){
+							//整数
+							i64data = CDBConst::obj.GetWholeData(term);
+							goto Literal;
+						}
+						else{
+							SetError(300,NULL,cp);
+							goto error;
+						}
+					}
+
+
+					//該当する識別子が見当たらないときはエラー扱いにする
+					bError=1;
+					SetError(3,term,cp);
+					type_stack[sp]=DEF_DOUBLE;
+				}
+				else{
+					//リテラル値
+					type_stack[sp]=GetLiteralValue(term,&i64data,baseType.GetBasicType());
+Literal:
+					if(type_stack[sp]==DEF_INT64||
+						type_stack[sp]==DEF_QWORD||
+						type_stack[sp]==DEF_DOUBLE){
+						//64ビット（符号有り整数/実数）
+
+						//push HILONG(dbl)
+						op_push_V((long)*(long *)(((char *)(&i64data))+4));
+
+						//push LOLONG(dbl)
+						op_push_V(*(long *)(&i64data));
+					}
+					else if(type_stack[sp]==DEF_SINGLE){
+						//single実数
+
+						float flt;
+						memcpy(&dbl,&i64data,sizeof(double));
+						flt=(float)dbl;
+						memcpy(&i3,&flt,sizeof(long));
+
+						//push term
+						op_push_V(i3);
+					}
+					else{
+						//その他
+
+						//push term
+						op_push_V((long)i64data);
+
+						if((long)i64data==0) index_stack[sp]=LITERAL_NULL;
+					}
+
+
+					//リテラル値の種類
+					if(Is64Type(type_stack[sp])==0&&IsRealNumberType(type_stack[sp])==0){
+						//整数（符号有り/無し）
+
+						index_stack[sp]=GetLiteralIndex(i64data);
+					}
+				}
+				sp++;
+				break;
+
+			//論理演算子
+			case CALC_XOR:
+				//value[sp-2] xor= value[sp-1]
+				//xor演算
+				if(!Calc_Xor(type_stack,index_stack,&sp)) goto error;
+				break;
+			case CALC_OR:
+				//value[sp-2] or= value[sp-1]
+				//or演算
+				if(!Calc_Or(type_stack,index_stack,&sp)) goto error;
+				break;
+			case CALC_AND:
+				//value[sp-2] and= value[sp-1]
+				//and演算
+				if(!Calc_And(type_stack,index_stack,&sp)) goto error;
+				break;
+			case CALC_NOT:
+				//value[sp-1]=Not value[sp-1]
+				//NOT演算子
+				if(!Calc_Not(type_stack,sp)) goto error;
+				break;
+
+			//比較演算子
+			case CALC_PE:
+				//value[sp-2]<=value[sp-1]
+				if(!Calc_Relation_PE(type_stack,index_stack,&sp)) goto error;
+				break;
+			case CALC_QE:
+				//value[sp-2]>=value[sp-1]
+				if(!Calc_Relation_QE(type_stack,index_stack,&sp)) goto error;
+				break;
+			case CALC_P:
+				//value[sp-2]<value[sp-1]
+				if(!Calc_Relation_P(type_stack,index_stack,&sp)) goto error;
+				break;
+			case CALC_Q:
+				//value[sp-2]>value[sp-1]
+				if(!Calc_Relation_Q(type_stack,index_stack,&sp)) goto error;
+				break;
+			case CALC_NOTEQUAL:
+				//value[sp-2]<>value[sp-1]
+				if(!Calc_Relation_NotEqual(type_stack,&sp)) goto error;
+				break;
+			case CALC_EQUAL:
+				//value[sp-2]=value[sp-1]
+				if(!Calc_Relation_Equal(type_stack,&sp)) goto error;
+				break;
+
+			//ビットシフト
+			case CALC_SHL:
+				//value[sp-2]=value[sp-2]<<value[sp-1]
+				if(!Calc_SHL(type_stack,&sp)) goto error;
+				break;
+			case CALC_SHR:
+				//value[sp-2]=value[sp-2]>>value[sp-1]
+				if(!Calc_SHR(type_stack,&sp)) goto error;
+				break;
+
+			//算術演算
+			case CALC_ADDITION:
+			case CALC_SUBTRACTION:
+			case CALC_PRODUCT:
+				if(!CalcTwoTerm_Arithmetic(idCalc,type_stack,index_stack,&sp)) goto error;
+				break;
+
+			case CALC_MOD:
+				//value[sp-2]%=value[sp-1]
+				//剰余演算
+				if(!Calc_Mod(type_stack,&sp)) goto error;
+				break;
+			case CALC_QUOTIENT:
+				//value[sp-2]/=value[sp-1];
+				//除算
+				if(!Calc_Divide(type_stack,&sp,baseType.GetBasicType())) goto error;
+				break;
+			case CALC_INTQUOTIENT:
+				//value[sp-2]/=value[sp-1]
+				//整数除算
+				if(!Calc_IntDivide(type_stack,index_stack,&sp)) goto error;
+				break;
+			case CALC_MINUSMARK:
+				//value[sp-1]=-value[sp-1]
+				//符号反転
+				if(!Calc_MinusMark(type_stack,sp)) goto error;
+				index_stack[sp-1]=-1;
+				break;
+			case CALC_POWER:
+				//べき乗演算（浮動小数点演算のみ）
+				if(!Calc_Power(type_stack,&sp)) goto error;
+				break;
+			case CALC_AS:
+				//キャスト
+				if(!Calc_Cast(type_stack,index_stack,&sp)) goto error;
+				break;
+
+			case CALC_BYVAL:
+				//ポインタ型→参照型
+				if( PTR_LEVEL( type_stack[sp-1] ) <= 0 ){
+					//ポインタ型ではないとき
+					SetError( 3, NULL, cp );
+					goto error;
+				}
+
+				type_stack[sp-1] = PTR_LEVEL_DOWN( type_stack[sp-1] );
+
+				break;
+
+			default:
+				SetError(300,NULL,cp);
+				goto error;
+		}
+	}
+
+	if(bError) goto error;
+
+	if(sp!=1){
+		SetError(1,NULL,cp);
+		goto error;
+	}
+
+	if(bLiteralCalculation){
+		//右辺値が数値の定数式の場合
+		Type resultType;
+		StaticCalculation(true, expression,baseType.GetBasicType(),&i64data,resultType);
+
+		obp=BeforeObp;
+		pobj_SubAddrSchedule->num=Before_ProcAddrScheduleNum;
+		pobj_DataTableSchedule->num=Before_DataTableScheduleNum;
+		pobj_Reloc->copy(pobj_BackReloc);
+
+		if( resultType.GetBasicSize() == sizeof(_int64) ){
+			//64ビット（符号有り整数/実数）
+
+			//push HILONG(i64data)
+			op_push_V((long)*(long *)(((char *)(&i64data))+4));
+
+			//push LOLONG(i64data)
+			op_push_V(*(long *)(&i64data));
+		}
+		else if( resultType.IsSingle() ){
+			//single実数
+
+			memcpy(&dbl,&i64data,sizeof(_int64));
+
+			float flt;
+			flt=(float)dbl;
+			memcpy(&i3,&flt,sizeof(long));
+
+			//push flt
+			op_push_V(i3);
+		}
+		else{
+			//整数（符号有り/無し）
+
+			i3=(long)i64data;
+
+			if(resultType.GetBasicSize()==sizeof(char)) i3=i3&0x000000FF;
+			if(resultType.GetBasicSize()==sizeof(short)) i3=i3&0x0000FFFF;
+
+			//push term
+			op_push_V(i3);
+		}
+
+		type_stack[0]=resultType.GetBasicType();
+		index_stack[0]=resultType.GetIndex();
+	}
+	else{
+		//右辺値が数値の定数式ではないとき
+		if(IS_LITERAL(index_stack[0])) index_stack[0]=-1;
+	}
+
+	if(pbUseHeap) *pbUseHeap=bUseHeap[0];
+
+	resultType.SetType( type_stack[0], index_stack[0] );
+
+	bool isSuccessful = true;
+	goto finish;
+
+
+error:
+	isSuccessful = false;
+	goto finish;
+
+
+finish:
+
+	for(i=0;i<pnum;i++){
+		if(values[i]) HeapDefaultFree(values[i]);
+	}
+
+	//再配置スケジュールバックアップ情報を解放
+	delete pobj_BackReloc;
+
+	return isSuccessful;
+}
Index: /trunk/abdev/BasicCompiler32/NumOpe_Arithmetic.cpp
===================================================================
--- /trunk/abdev/BasicCompiler32/NumOpe_Arithmetic.cpp	(revision 148)
+++ /trunk/abdev/BasicCompiler32/NumOpe_Arithmetic.cpp	(revision 148)
@@ -0,0 +1,1471 @@
+#include "../BasicCompiler_Common/common.h"
+#include "Opcode.h"
+
+void GetStackData_ToRegister(int *type,int sp){
+	/*NumOpeポーランドのスタック蓄積による演算内容（2つのデータ）を
+		レジスタedx:eax、ecx:ebxに取得する*/
+
+	if(type[sp-1]==DEF_DOUBLE){
+		//fld qword ptr[esp]
+		op_fld_ptr_esp(DEF_DOUBLE);
+
+		//fistp qword ptr[esp]
+		op_fistp_ptr_esp( sizeof(_int64) );
+
+		//pop ebx
+		op_pop(REG_EBX);
+
+		//pop ecx
+		op_pop(REG_ECX);
+	}
+	else if(type[sp-1]==DEF_SINGLE){
+		//fld dword ptr[esp]
+		op_fld_ptr_esp(DEF_SINGLE);
+
+		//sub esp,4
+		op_sub_esp(4);
+
+		//fistp qword ptr[esp]
+		op_fistp_ptr_esp( sizeof(_int64) );
+
+		//pop ebx
+		op_pop(REG_EBX);
+
+		//pop ecx
+		op_pop(REG_ECX);
+	}
+	else if(type[sp-1]==DEF_INT64||type[sp-1]==DEF_QWORD){
+		//pop ebx
+		op_pop(REG_EBX);
+
+		//pop ecx
+		op_pop(REG_ECX);
+	}
+	else{
+		//pop eax
+		op_pop(REG_EAX);
+
+		if(IsSignedType(type[sp-1])){
+			//符号拡張
+			//edx:eax ← eax
+				
+			//cdq
+			op_cdq();
+		}
+		else{
+			//ビット拡張
+			//edx:eax ← eax
+
+			//xor edx,edx
+			op_zero_reg(REG_EDX);
+		}
+
+		//mov ebx,eax
+		OpBuffer[obp++]=(char)0x8B;
+		OpBuffer[obp++]=(char)0xD8;
+
+		//mov ecx,edx
+		OpBuffer[obp++]=(char)0x8B;
+		OpBuffer[obp++]=(char)0xCA;
+	}
+
+	//第1項を64ビットに対応させる
+	if(type[sp-2]==DEF_DOUBLE){
+		//fld qword ptr[esp]
+		op_fld_ptr_esp(DEF_DOUBLE);
+
+		//fistp qword ptr[esp]
+		op_fistp_ptr_esp( sizeof(_int64) );
+
+		//pop eax
+		op_pop(REG_EAX);
+
+		//pop edx
+		op_pop(REG_EDX);
+	}
+	else if(type[sp-2]==DEF_SINGLE){
+		//fld dword ptr[esp]
+		op_fld_ptr_esp(DEF_SINGLE);
+
+		//sub esp,4
+		op_sub_esp(4);
+
+		//fistp qword ptr[esp]
+		op_fistp_ptr_esp( sizeof(_int64) );
+
+		//pop eax
+		op_pop(REG_EAX);
+
+		//pop edx
+		op_pop(REG_EDX);
+	}
+	else if(type[sp-2]==DEF_INT64||type[sp-2]==DEF_QWORD){
+		//pop eax
+		op_pop(REG_EAX);
+
+		//pop edx
+		op_pop(REG_EDX);
+	}
+	else{
+		//pop eax
+		op_pop(REG_EAX);
+
+		if(IsSignedType(type[sp-2])){
+			//符号拡張
+			//edx:eax ← eax
+				
+			//cdq
+			op_cdq();
+		}
+		else{
+			//ビット拡張
+			//edx:eax ← eax
+
+			//xor edx,edx
+			op_zero_reg(REG_EDX);
+		}
+	}
+}
+
+void FormatStackData_To64bit(int *type,int sp){
+	//NumOpeポーランドのスタック蓄積による演算内容（2つのデータ）を64ビット整数型にする
+
+	GetStackData_ToRegister(type,sp);
+
+	//push ecx
+	op_push(REG_ECX);
+
+	//push ebx
+	op_push(REG_EBX);
+
+	//push edx
+	op_push(REG_EDX);
+
+	//push eax
+	op_push(REG_EAX);
+}
+
+BOOL CalcTwoTerm_Arithmetic(int idCalc,int *type,LONG_PTR *index_stack,int *pStackPointer){
+	/*	value[sp-2] = value[sp-2] + value[sp-1]
+		value[sp-2] = value[sp-2] - value[sp-1]
+		value[sp-2] = value[sp-2] * value[sp-1]		*/
+
+	int sp;
+	sp=*pStackPointer;
+
+	int AnswerType;
+	AnswerType=NeutralizationType(type[sp-2],index_stack[sp-2],type[sp-1],index_stack[sp-1]);
+
+	if(type[sp-2]==DEF_DOUBLE||type[sp-2]==DEF_SINGLE||
+		type[sp-1]==DEF_DOUBLE||type[sp-1]==DEF_SINGLE){
+		/////////////
+		// 実数演算
+		/////////////
+
+		if(type[sp-1]==DEF_DOUBLE){
+			//fld qword ptr[esp]
+			op_fld_ptr_esp(DEF_DOUBLE);
+
+			//add esp,8
+			op_add_esp(8);
+		}
+		else if(type[sp-1]==DEF_SINGLE){
+			//fld dword ptr[esp]
+			op_fld_ptr_esp(DEF_SINGLE);
+
+			//add esp,4
+			op_add_esp(4);
+		}
+		else if(type[sp-1]==DEF_INT64||type[sp-1]==DEF_QWORD){
+			//64ビット整数値
+
+			//fild qword ptr[esp]
+			op_fld_ptr_esp(DEF_INT64);
+
+			//add esp,8
+			op_add_esp(8);
+		}
+		else{
+			//その他整数型
+
+			//fild dword ptr[esp]
+			op_fld_ptr_esp(DEF_LONG);
+
+			//add esp,4
+			op_add_esp(4);
+		}
+
+		if(type[sp-2]==DEF_DOUBLE){
+			//fld qword ptr[esp]
+			op_fld_ptr_esp(DEF_DOUBLE);
+		}
+		else if(type[sp-2]==DEF_SINGLE){
+			//fld dword ptr[esp]
+			op_fld_ptr_esp(DEF_SINGLE);
+		}
+		else if(type[sp-2]==DEF_INT64||type[sp-2]==DEF_QWORD){
+			//64ビット整数値
+			op_fld_ptr_esp(DEF_INT64);
+		}
+		else{
+			//その他整数型
+
+			//fild dword ptr[esp]
+			op_fld_ptr_esp(DEF_LONG);
+		}
+
+		if(GetTypeSize(type[sp-2],-1)==sizeof(_int64)){
+			if(AnswerType==DEF_SINGLE){
+				//add esp,4
+				op_add_esp(4);
+			}
+		}
+		else{
+			if(AnswerType==DEF_DOUBLE){
+				//sub esp,4
+				op_sub_esp(4);
+			}
+		}
+
+		if(idCalc==CALC_ADDITION){
+			//faddp st(1),st
+			OpBuffer[obp++]=(char)0xDE;
+			OpBuffer[obp++]=(char)0xC1;
+		}
+		else if(idCalc==CALC_SUBTRACTION){
+			//fsubrp st(1),st
+			OpBuffer[obp++]=(char)0xDE;
+			OpBuffer[obp++]=(char)0xE1;
+		}
+		else if(idCalc==CALC_PRODUCT){
+			//fmulp st(1),st
+			OpBuffer[obp++]=(char)0xDE;
+			OpBuffer[obp++]=(char)0xC9;
+		}
+
+		if(AnswerType==DEF_DOUBLE){
+			//fstp qword ptr[esp]
+			OpBuffer[obp++]=(char)0xDD;
+			OpBuffer[obp++]=(char)0x1C;
+			OpBuffer[obp++]=(char)0x24;
+		}
+		else{
+			//fstp dword ptr[esp]
+			OpBuffer[obp++]=(char)0xD9;
+			OpBuffer[obp++]=(char)0x1C;
+			OpBuffer[obp++]=(char)0x24;
+		}
+	}
+	else if(Is64Type(type[sp-2])||Is64Type(type[sp-1])){
+		//////////////////////
+		// 64ビット整数演算
+		//////////////////////
+
+		if(idCalc==CALC_PRODUCT){
+			if(!((type[sp-1]==DEF_INT64||type[sp-1]==DEF_QWORD)&&
+				(type[sp-2]==DEF_INT64||type[sp-2]==DEF_QWORD))){
+				//2つの項のどちらかが64ビット整数でないとき
+				FormatStackData_To64bit(type,sp);
+			}
+
+			//call _allmul
+			extern UserProc *pSub_allmul;
+			op_call(pSub_allmul);
+
+			//push edx
+			op_push(REG_EDX);
+
+			//push eax
+			op_push(REG_EAX);
+		}
+		else{
+			if(type[sp-1]==DEF_INT64||type[sp-1]==DEF_QWORD){
+				//第2項が64ビット整数値のとき
+
+				//pop ebx
+				op_pop(REG_EBX);
+
+				//pop ecx
+				op_pop(REG_ECX);
+			}
+			else{
+				//第2項がその他整数値のとき
+
+				//pop eax
+				op_pop(REG_EAX);
+
+				if(IsSignedType(type[sp-1])){
+					//符号拡張
+					//edx:eax ← eax
+					
+					//cdq
+					op_cdq();
+				}
+				else{
+					//ビット拡張
+					//edx:eax ← eax
+
+					//xor edx,edx
+					op_zero_reg(REG_EDX);
+				}
+
+				//mov ebx,eax
+				OpBuffer[obp++]=(char)0x8B;
+				OpBuffer[obp++]=(char)0xD8;
+
+				//mov ecx,edx
+				OpBuffer[obp++]=(char)0x8B;
+				OpBuffer[obp++]=(char)0xCA;
+			}
+
+			if(type[sp-2]==DEF_INT64||type[sp-2]==DEF_QWORD){
+				//第1項が64ビット整数値のとき
+
+				if(idCalc==CALC_ADDITION){
+					//add dword ptr[esp],ebx
+					OpBuffer[obp++]=(char)0x01;
+					OpBuffer[obp++]=(char)0x1C;
+					OpBuffer[obp++]=(char)0x24;
+
+					//adc dword ptr[esp+sizeof(long)],ecx
+					OpBuffer[obp++]=(char)0x11;
+					OpBuffer[obp++]=(char)0x4C;
+					OpBuffer[obp++]=(char)0x24;
+					OpBuffer[obp++]=(char)0x04;
+				}
+				else if(idCalc==CALC_SUBTRACTION){
+					//sub dword ptr[esp],ebx
+					OpBuffer[obp++]=(char)0x29;
+					OpBuffer[obp++]=(char)0x1C;
+					OpBuffer[obp++]=(char)0x24;
+
+					//sbb dword ptr[esp+sizeof(long)],ecx
+					OpBuffer[obp++]=(char)0x19;
+					OpBuffer[obp++]=(char)0x4C;
+					OpBuffer[obp++]=(char)0x24;
+					OpBuffer[obp++]=(char)0x04;
+				}
+			}
+			else{
+				//第1項がその他整数値のとき
+
+				//pop eax
+				op_pop(REG_EAX);
+
+				if(IsSignedType(type[sp-2])){
+					//符号拡張
+					//edx:eax ← eax
+
+					//cdq
+					op_cdq();
+				}
+				else{
+					//ビット拡張
+					//edx:eax ← eax
+
+					//xor edx,edx
+					op_zero_reg(REG_EDX);
+				}
+
+				if(idCalc==CALC_ADDITION){
+					//add ebx,eax
+					OpBuffer[obp++]=(char)0x03;
+					OpBuffer[obp++]=(char)0xD8;
+
+					//adc ecx,edx
+					OpBuffer[obp++]=(char)0x13;
+					OpBuffer[obp++]=(char)0xCA;
+				}
+				else if(idCalc==CALC_SUBTRACTION){
+					//sub ebx,eax
+					OpBuffer[obp++]=(char)0x2B;
+					OpBuffer[obp++]=(char)0xC3;
+
+					//sbb ecx,edx
+					OpBuffer[obp++]=(char)0x1B;
+					OpBuffer[obp++]=(char)0xD1;
+				}
+
+				//push ecx
+				op_push(REG_ECX);
+
+				//push ebx
+				op_push(REG_EBX);
+			}
+		}
+	}
+	else{
+		//////////////////////////
+		//32ビット以下の整数演算
+		//////////////////////////
+
+		//pop ebx
+		op_pop(REG_EBX);
+
+		//pop eax
+		op_pop(REG_EAX);
+
+		//sub esp,4
+		op_sub_esp(4);
+
+		if(idCalc==CALC_ADDITION){
+			//add eax,ebx
+			OpBuffer[obp++]=(char)0x03;
+			OpBuffer[obp++]=(char)0xC3;
+		}
+		else if(idCalc==CALC_SUBTRACTION){
+			//sub eax,ebx
+			OpBuffer[obp++]=(char)0x2B;
+			OpBuffer[obp++]=(char)0xC3;
+		}
+		else if(idCalc==CALC_PRODUCT){
+			//imul eax,ebx（64ビット演算ではないので、符号を考慮しない）
+			OpBuffer[obp++]=(char)0x0F;
+			OpBuffer[obp++]=(char)0xAF;
+			OpBuffer[obp++]=(char)0xC3;
+		}
+
+		//mov dword ptr[esp],eax
+		OpBuffer[obp++]=(char)0x89;
+		OpBuffer[obp++]=(char)0x04;
+		OpBuffer[obp++]=(char)0x24;
+	}
+
+	sp--;
+	type[sp-1]=AnswerType;
+
+	*pStackPointer=sp;
+
+	return 1;
+}
+
+BOOL Calc_Mod(int *type,int *pStackPointer){
+	//value[sp-2]%=value[sp-1]
+	//剰余演算
+
+	int sp;
+	sp=*pStackPointer;
+
+	if(type[sp-1]==DEF_INT64||type[sp-1]==DEF_QWORD||
+		type[sp-2]==DEF_INT64||type[sp-2]==DEF_QWORD){
+		////////////////
+		// 64ビット演算
+		////////////////
+
+		//第2項を64ビットに対応させる
+		FormatStackData_To64bit(type,sp);
+
+		if(IsSignedType(type[sp-2])==0&&IsSignedType(type[sp-1])==0){
+			//符号なし演算
+
+			//call _aullrem
+			extern UserProc *pSub_aullrem;
+			op_call(pSub_aullrem);
+		}
+		else{
+			//符号あり演算
+
+			//call _allrem
+			extern UserProc *pSub_allrem;
+			op_call(pSub_allrem);
+		}
+
+		//push edx
+		op_push(REG_EDX);
+
+		//push eax
+		op_push(REG_EAX);
+
+		sp--;
+		if(type[sp-1]==DEF_QWORD&&type[sp]==DEF_QWORD) type[sp-1]=DEF_QWORD;
+		else type[sp-1]=DEF_INT64;
+	}
+	else{
+		////////////////
+		// 32ビット演算
+		////////////////
+
+		if(type[sp-1]==DEF_DOUBLE){
+			//fld qword ptr[esp]
+			op_fld_ptr_esp(DEF_DOUBLE);
+
+			//add esp,4
+			op_add_esp(4);
+
+			//fistp dword ptr[esp]
+			op_fistp_ptr_esp( sizeof(long) );
+		}
+		else if(type[sp-1]==DEF_SINGLE){
+			//fld dword ptr[esp]
+			op_fld_ptr_esp(DEF_SINGLE);
+
+			//fistp dword ptr[esp]
+			op_fistp_ptr_esp( sizeof(long) );
+		}
+
+		//pop ebx
+		op_pop(REG_EBX);
+
+		if(type[sp-2]==DEF_DOUBLE){
+			//fld qword ptr[esp]
+			op_fld_ptr_esp(DEF_DOUBLE);
+
+			//add esp,4
+			op_add_esp(4);
+
+			//fistp dword ptr[esp]
+			op_fistp_ptr_esp( sizeof(long) );
+		}
+		else if(type[sp-2]==DEF_SINGLE){
+			//fld dword ptr[esp]
+			op_fld_ptr_esp(DEF_SINGLE);
+
+			//fistp dword ptr[esp]
+			op_fistp_ptr_esp( sizeof(long) );
+		}
+
+		//pop eax
+		op_pop(REG_EAX);
+
+		//sub esp,4
+		op_sub_esp(4);
+
+		if(type[sp-2]==DEF_DWORD&&type[sp-1]==DEF_DWORD){
+			//xor edx,edx
+			op_zero_reg(REG_EDX);
+
+			//div ebx (eax=eax/ebx...edx)
+			OpBuffer[obp++]=(char)0xF7;
+			OpBuffer[obp++]=(char)0xF3;
+		}
+		else{
+			//cdq
+			op_cdq();
+
+			//idiv ebx (eax=eax/ebx...edx)
+			OpBuffer[obp++]=(char)0xF7;
+			OpBuffer[obp++]=(char)0xFB;
+		}
+
+		//mov dword ptr[esp],edx
+		OpBuffer[obp++]=(char)0x89;
+		OpBuffer[obp++]=(char)0x14;
+		OpBuffer[obp++]=(char)0x24;
+
+		sp--;
+		type[sp-1]=DEF_LONG;
+	}
+
+	*pStackPointer=sp;
+
+	return 1;
+}
+
+BOOL Calc_Divide(int *type,int *pStackPointer,int BaseType){
+	//value[sp-2]/=value[sp-1];
+	//除算
+
+	int sp;
+	sp=*pStackPointer;
+
+	///////////////////////
+	// 浮動小数点演算のみ
+	///////////////////////
+
+	int AnswerType;
+	if(type[sp-2]==DEF_DOUBLE||type[sp-1]==DEF_DOUBLE||BaseType==DEF_DOUBLE) AnswerType=DEF_DOUBLE;
+	else AnswerType=DEF_SINGLE;
+
+	if(type[sp-1]==DEF_DOUBLE){
+		//fld qword ptr[esp]
+		op_fld_ptr_esp(DEF_DOUBLE);
+
+		//add esp,8
+		op_add_esp(8);
+	}
+	else if(type[sp-1]==DEF_SINGLE){
+		//fld dword ptr[esp]
+		op_fld_ptr_esp(DEF_SINGLE);
+
+		//add esp,4
+		op_add_esp(4);
+	}
+	else if(type[sp-1]==DEF_INT64||type[sp-1]==DEF_QWORD){
+		//64ビット整数値
+
+		//fild qword ptr[esp]
+		op_fld_ptr_esp(DEF_INT64);
+
+		//add esp,8
+		op_add_esp(8);
+	}
+	else if(type[sp-1]==DEF_DWORD){
+		//pop eax
+		op_pop(REG_EAX);
+
+		//push 0
+		op_push_V(0);
+
+		//push eax
+		op_push(REG_EAX);
+
+		//fild qword ptr[esp]
+		OpBuffer[obp++]=(char)0xDF;
+		OpBuffer[obp++]=(char)0x2C;
+		OpBuffer[obp++]=(char)0x24;
+
+		//add esp,8
+		op_add_esp(8);
+	}
+	else{
+		//fild dword ptr[esp]
+		op_fld_ptr_esp(DEF_LONG);
+
+		//add esp,4
+		op_add_esp(4);
+	}
+
+	if(type[sp-2]==DEF_DOUBLE){
+		//fld qword ptr[esp]
+		op_fld_ptr_esp(DEF_DOUBLE);
+	}
+	else if(type[sp-2]==DEF_SINGLE){
+		//fld dword ptr[esp]
+		op_fld_ptr_esp(DEF_SINGLE);
+	}
+	else if(type[sp-2]==DEF_INT64||type[sp-2]==DEF_QWORD){
+		//64ビット整数値
+
+		//fild qword ptr[esp]
+		op_fld_ptr_esp(DEF_INT64);
+	}
+	else if(type[sp-2]==DEF_DWORD){
+		//pop eax
+		op_pop(REG_EAX);
+
+		//push 0
+		op_push_V(0);
+
+		//push eax
+		op_push(REG_EAX);
+
+		//fild qword ptr[esp]
+		OpBuffer[obp++]=(char)0xDF;
+		OpBuffer[obp++]=(char)0x2C;
+		OpBuffer[obp++]=(char)0x24;
+	}
+	else{	//Long
+		//fild dword ptr[esp]
+		op_fld_ptr_esp(DEF_LONG);
+	}
+                                                            //↓ここだけ例外DWord
+	if(GetTypeSize(type[sp-2],-1)==sizeof(_int64)||type[sp-2]==DEF_DWORD){
+		if(AnswerType==DEF_SINGLE){
+			//add esp,4
+			op_add_esp(4);
+		}
+	}
+	else{
+		if(AnswerType==DEF_DOUBLE){
+			//sub esp,4
+			op_sub_esp(4);
+		}
+	}
+
+	//fdivrp st(1),st
+	OpBuffer[obp++]=(char)0xDE;
+	OpBuffer[obp++]=(char)0xF1;
+
+	sp--;
+	if(AnswerType==DEF_DOUBLE){
+		//fstp qword ptr[esp]
+		OpBuffer[obp++]=(char)0xDD;
+		OpBuffer[obp++]=(char)0x1C;
+		OpBuffer[obp++]=(char)0x24;
+
+		type[sp-1]=DEF_DOUBLE;
+	}
+	else{
+		//fstp dword ptr[esp]
+		OpBuffer[obp++]=(char)0xD9;
+		OpBuffer[obp++]=(char)0x1C;
+		OpBuffer[obp++]=(char)0x24;
+
+		type[sp-1]=DEF_SINGLE;
+	}
+
+	*pStackPointer=sp;
+
+	return 1;
+}
+
+BOOL Calc_IntDivide(int *type,LONG_PTR *index_stack,int *pStackPointer){
+	//value[sp-2]/=value[sp-1]
+	//除算（整数）
+
+	int sp;
+	sp=*pStackPointer;
+
+	if(type[sp-1]==DEF_INT64||type[sp-1]==DEF_QWORD||
+		type[sp-2]==DEF_INT64||type[sp-2]==DEF_QWORD){
+		////////////////
+		// 64ビット演算
+		////////////////
+
+		//2つの項を64ビットに対応させる
+		FormatStackData_To64bit(type,sp);
+
+		if(IsSignedType(type[sp-2])==0&&IsSignedType(type[sp-1])==0){
+			//符号なし演算
+
+			//call _aulldiv
+			extern UserProc *pSub_aulldiv;
+			op_call(pSub_aulldiv);
+		}
+		else{
+			//符号あり演算
+
+			//call _alldiv
+			extern UserProc *pSub_alldiv;
+			op_call(pSub_alldiv);
+		}
+
+		//push edx
+		op_push(REG_EDX);
+
+		//push eax
+		op_push(REG_EAX);
+
+		sp--;
+		if(type[sp-1]==DEF_QWORD&&type[sp]==DEF_QWORD) type[sp-1]=DEF_QWORD;
+		else type[sp-1]=DEF_INT64;
+	}
+	else{
+		////////////////
+		// 32ビット演算
+		////////////////
+
+		if(type[sp-1]==DEF_DOUBLE){
+			//fld qword ptr[esp]
+			op_fld_ptr_esp(DEF_DOUBLE);
+
+			//add esp,4
+			op_add_esp(4);
+
+			//fistp dword ptr[esp]
+			op_fistp_ptr_esp( sizeof(long) );
+		}
+		else if(type[sp-1]==DEF_SINGLE){
+			//fld dword ptr[esp]
+			op_fld_ptr_esp(DEF_SINGLE);
+
+			//fistp dword ptr[esp]
+			op_fistp_ptr_esp( sizeof(long) );
+		}
+
+		//pop ebx
+		op_pop(REG_EBX);
+
+		if(type[sp-2]==DEF_DOUBLE){
+			//fld qword ptr[esp]
+			op_fld_ptr_esp(DEF_DOUBLE);
+
+			//add esp,4
+			op_add_esp(4);
+
+			//fistp dword ptr[esp]
+			op_fistp_ptr_esp( sizeof(long) );
+		}
+		else if(type[sp-2]==DEF_SINGLE){
+			//fld dword ptr[esp]
+			op_fld_ptr_esp(DEF_SINGLE);
+
+			//fistp dword ptr[esp]
+			op_fistp_ptr_esp( sizeof(long) );
+		}
+
+		//pop eax
+		op_pop(REG_EAX);
+
+		//sub esp,4
+		op_sub_esp(4);
+
+		if((type[sp-2]==DEF_DWORD&&type[sp-1]==DEF_DWORD)||
+			(IS_POSITIVE_LITERAL(index_stack[sp-2])&&type[sp-1]==DEF_DWORD)||
+			(type[sp-2]==DEF_DWORD&&IS_POSITIVE_LITERAL(index_stack[sp-1]))){
+			//xor edx,edx
+			op_zero_reg(REG_EDX);
+
+			//div ebx (eax=eax/ebx...edx)
+			OpBuffer[obp++]=(char)0xF7;
+			OpBuffer[obp++]=(char)0xF3;
+		}
+		else{
+			//cdq
+			op_cdq();
+
+			//idiv ebx (eax=eax/ebx...edx)
+			OpBuffer[obp++]=(char)0xF7;
+			OpBuffer[obp++]=(char)0xFB;
+		}
+
+		//mov dword ptr[esp],eax
+		OpBuffer[obp++]=(char)0x89;
+		OpBuffer[obp++]=(char)0x04;
+		OpBuffer[obp++]=(char)0x24;
+
+		sp--;
+
+		//整数以外の型だったときはLong型にする
+		if(!IsWholeNumberType(type[sp-1])) type[sp-1]=DEF_LONG;
+	}
+
+	*pStackPointer=sp;
+	return 1;
+}
+
+BOOL Calc_MinusMark(int *type,int sp){
+	//value[sp-1]=-value[sp-1]
+	//符号反転
+
+	if(type[sp-1]==DEF_DOUBLE){
+		//fld qword ptr[esp]
+		op_fld_ptr_esp(DEF_DOUBLE);
+
+		//push -1
+		op_push_V(-1);
+
+		//fild dword ptr[esp]
+		op_fld_ptr_esp(DEF_LONG);
+
+		//add esp,4
+		op_add_esp(4);
+
+		//fmulp st(1),st
+		OpBuffer[obp++]=(char)0xDE;
+		OpBuffer[obp++]=(char)0xC9;
+
+		//fstp qword ptr[esp]
+		OpBuffer[obp++]=(char)0xDD;
+		OpBuffer[obp++]=(char)0x1C;
+		OpBuffer[obp++]=(char)0x24;
+	}
+	else if(type[sp-1]==DEF_SINGLE){
+		//fld dword ptr[esp]
+		op_fld_ptr_esp(DEF_SINGLE);
+
+		//push -1
+		op_push_V(-1);
+
+		//fild dword ptr[esp]
+		op_fld_ptr_esp(DEF_LONG);
+
+		//add esp,4
+		op_add_esp(4);
+
+		//fmulp st(1),st
+		OpBuffer[obp++]=(char)0xDE;
+		OpBuffer[obp++]=(char)0xC9;
+
+		//fstp dword ptr[esp]
+		OpBuffer[obp++]=(char)0xD9;
+		OpBuffer[obp++]=(char)0x1C;
+		OpBuffer[obp++]=(char)0x24;
+	}
+	else if(type[sp-1]==DEF_INT64||type[sp-1]==DEF_QWORD){
+		//pop eax
+		op_pop(REG_EAX);
+
+		//neg eax
+		OpBuffer[obp++]=(char)0xF7;
+		OpBuffer[obp++]=(char)0xD8;
+
+		//pop edx
+		op_pop(REG_EDX);
+
+		//adc edx,0
+		OpBuffer[obp++]=(char)0x83;
+		OpBuffer[obp++]=(char)0xD2;
+		OpBuffer[obp++]=(char)0x00;
+
+		//neg edx
+		OpBuffer[obp++]=(char)0xF7;
+		OpBuffer[obp++]=(char)0xDA;
+
+		//push edx
+		op_push(REG_EDX);
+
+		//push eax
+		op_push(REG_EAX);
+
+		type[sp-1]=DEF_INT64;	//QWordはInt64へ
+	}
+	else if(IsWholeNumberType(type[sp-1])){
+		//pop eax
+		op_pop(REG_EAX);
+
+		//imul eax,-1
+		OpBuffer[obp++]=(char)0x6B;
+		OpBuffer[obp++]=(char)0xC0;
+		OpBuffer[obp++]=(char)0xFF;
+
+		//push eax
+		op_push(REG_EAX);
+
+		type[sp-1]=GetSignedType(type[sp-1]);
+	}
+
+	return 1;
+}
+
+BOOL Calc_Power(int *type,int *pStackPointer){
+	//べき乗（実数演算のみ）
+
+	int sp;
+	sp=*pStackPointer;
+
+	if(type[sp-1]==DEF_DOUBLE){
+		//fld qword ptr[esp]
+		op_fld_ptr_esp(DEF_DOUBLE);
+
+		//add esp,8
+		op_add_esp(8);
+	}
+	else if(type[sp-1]==DEF_SINGLE){
+		//fld dword ptr[esp]
+		op_fld_ptr_esp(DEF_SINGLE);
+
+		//add esp,4
+		op_add_esp(4);
+	}
+	else if(type[sp-1]==DEF_INT64||type[sp-1]==DEF_QWORD){
+		//64ビット整数値
+
+		//fild qword ptr[esp]
+		op_fld_ptr_esp(DEF_INT64);
+
+		//add esp,8
+		op_add_esp(8);
+	}
+	else{
+		//32ビット整数値
+
+		//fild dword ptr[esp]
+		op_fld_ptr_esp(DEF_LONG);
+
+		//add esp,4
+		op_add_esp(4);
+	}
+
+	if(type[sp-2]==DEF_DOUBLE){
+		//fld qword ptr[esp]
+		op_fld_ptr_esp(DEF_DOUBLE);
+	}
+	else if(type[sp-2]==DEF_SINGLE){
+		//fld dword ptr[esp]
+		op_fld_ptr_esp(DEF_SINGLE);
+
+		//sub esp,4
+		op_sub_esp(4);
+	}
+	else if(type[sp-2]==DEF_INT64||type[sp-2]==DEF_QWORD){
+		//64ビット整数値
+
+		//fild qword ptr[esp]
+		op_fld_ptr_esp(DEF_INT64);
+	}
+	else{
+		//32ビット整数値
+
+		//fild dword ptr[esp]
+		op_fld_ptr_esp(DEF_LONG);
+
+		//sub esp,4
+		op_sub_esp(4);
+	}
+
+	//sub esp,8
+	op_sub_esp(8);
+
+	//fstp qword ptr[esp]
+	OpBuffer[obp++]=(char)0xDD;
+	OpBuffer[obp++]=(char)0x1C;
+	OpBuffer[obp++]=(char)0x24;
+
+	//fstp qword ptr[esp+8]
+	OpBuffer[obp++]=(char)0xDD;
+	OpBuffer[obp++]=(char)0x5C;
+	OpBuffer[obp++]=(char)0x24;
+	OpBuffer[obp++]=(char)0x08;
+
+	//call pow
+	extern UserProc *pSub_pow;
+	op_call(pSub_pow);
+
+	//sub esp,8
+	op_sub_esp(8);
+
+	//fstp qword ptr[esp]
+	OpBuffer[obp++]=(char)0xDD;
+	OpBuffer[obp++]=(char)0x1C;
+	OpBuffer[obp++]=(char)0x24;
+
+	sp--;
+	type[sp-1]=DEF_DOUBLE;
+
+	*pStackPointer=sp;
+	return 1;
+}
+
+BOOL Calc_Cast(int *type,LONG_PTR *index_stack,int *pStackPointer){
+	//キャスト
+
+	int sp;
+	sp=*pStackPointer;
+
+	int CastType;
+	CastType=type[sp-1];
+	if((CastType&FLAG_CAST)==0){
+		SetError(47,NULL,cp);
+		return 0;
+	}
+	CastType=CastType&(~FLAG_CAST);
+
+	if(IsPtrType(CastType)){
+		ChangeTypeToLong(type[sp-2]);
+	}
+	else if(IsRealNumberType(CastType)){
+		if(CastType==DEF_DOUBLE) ChangeTypeToDouble(type[sp-2]);
+		else if(CastType==DEF_SINGLE) ChangeTypeToSingle(type[sp-2]);
+	}
+	else ChangeTypeToWhole(type[sp-2],CastType);
+
+	type[sp-2]=CastType;
+	index_stack[sp-2]=index_stack[sp-1];
+
+	sp--;
+
+	*pStackPointer=sp;
+	return 1;
+}
+
+BOOL Calc_SHL(int *type,int *pStackPointer){
+	//左ビットシフト
+	//value[sp-2]=value[sp-2]<<value[sp-1]
+
+	int sp;
+	sp=*pStackPointer;
+
+	if(type[sp-2]==DEF_INT64||type[sp-2]==DEF_QWORD){
+		////////////////
+		// 64ビット演算
+		////////////////
+
+		//2項目は32ビット整数として利用
+		if(type[sp-1]==DEF_DOUBLE){
+			//fld qword ptr[esp]
+			op_fld_ptr_esp(DEF_DOUBLE);
+
+			//add esp,4
+			op_add_esp(4);
+
+			//fistp dword ptr[esp]
+			op_fistp_ptr_esp( sizeof(long) );
+
+			//pop ecx
+			op_pop(REG_ECX);
+		}
+		else if(type[sp-1]==DEF_SINGLE){
+			//fld dword ptr[esp]
+			op_fld_ptr_esp(DEF_SINGLE);
+
+			//fistp dword ptr[esp]
+			op_fistp_ptr_esp( sizeof(long) );
+
+			//pop ecx
+			op_pop(REG_ECX);
+		}
+		else if(type[sp-1]==DEF_INT64||type[sp-1]==DEF_QWORD){
+			//pop ecx
+			op_pop(REG_ECX);
+
+			//add esp,4
+			op_add_esp(4);
+		}
+		else{
+			//pop ecx
+			op_pop(REG_ECX);
+		}
+
+		//第1項を64ビットに対応させる
+		if(type[sp-2]==DEF_DOUBLE){
+			//fld qword ptr[esp]
+			op_fld_ptr_esp(DEF_DOUBLE);
+
+			//fistp qword ptr[esp]
+			op_fistp_ptr_esp( sizeof(_int64) );
+
+			//pop eax
+			op_pop(REG_EAX);
+
+			//pop edx
+			op_pop(REG_EDX);
+		}
+		else if(type[sp-2]==DEF_SINGLE){
+			//fld dword ptr[esp]
+			op_fld_ptr_esp(DEF_SINGLE);
+
+			//sub esp,4
+			op_sub_esp(4);
+
+			//fistp qword ptr[esp]
+			op_fistp_ptr_esp( sizeof(_int64) );
+
+			//pop eax
+			op_pop(REG_EAX);
+
+			//pop edx
+			op_pop(REG_EDX);
+		}
+		else if(type[sp-2]==DEF_INT64||type[sp-2]==DEF_QWORD){
+			//pop eax
+			op_pop(REG_EAX);
+
+			//pop edx
+			op_pop(REG_EDX);
+		}
+		else{
+			//pop eax
+			op_pop(REG_EAX);
+
+			if(IsSignedType(type[sp-2])){
+				//符号拡張
+				//edx:eax ← eax
+					
+				//cdq
+				op_cdq();
+			}
+			else{
+				//ビット拡張
+				//edx:eax ← eax
+
+				//xor edx,edx
+				op_zero_reg(REG_EDX);
+			}
+		}
+
+		//call _allshl
+		extern UserProc *pSub_allshl;
+		op_call(pSub_allshl);
+
+		//push edx
+		op_push(REG_EDX);
+
+		//push eax
+		op_push(REG_EAX);
+
+		sp--;
+	}
+	else{
+		////////////////
+		// 32ビット演算
+		////////////////
+
+		//2項目は32ビット整数として利用
+		if(type[sp-1]==DEF_DOUBLE){
+			//fld qword ptr[esp]
+			op_fld_ptr_esp(DEF_DOUBLE);
+
+			//add esp,4
+			op_add_esp(4);
+
+			//fistp dword ptr[esp]
+			op_fistp_ptr_esp( sizeof(long) );
+
+			//pop ecx
+			op_pop(REG_ECX);
+		}
+		else if(type[sp-1]==DEF_SINGLE){
+			//fld dword ptr[esp]
+			op_fld_ptr_esp(DEF_SINGLE);
+
+			//fistp dword ptr[esp]
+			op_fistp_ptr_esp( sizeof(long) );
+
+			//pop ecx
+			op_pop(REG_ECX);
+		}
+		else if(type[sp-1]==DEF_INT64||type[sp-1]==DEF_QWORD){
+			//pop ecx
+			op_pop(REG_ECX);
+
+			//add esp,4
+			op_add_esp(4);
+		}
+		else{
+			//pop ecx
+			op_pop(REG_ECX);
+		}
+
+		if(type[sp-2]==DEF_DOUBLE){
+			//fld qword ptr[esp]
+			op_fld_ptr_esp(DEF_DOUBLE);
+
+			//add esp,4
+			op_add_esp(4);
+
+			//fistp dword ptr[esp]
+			op_fistp_ptr_esp( sizeof(long) );
+		}
+		else if(type[sp-2]==DEF_SINGLE){
+			//fld dword ptr[esp]
+			op_fld_ptr_esp(DEF_SINGLE);
+
+			//fistp dword ptr[esp]
+			op_fistp_ptr_esp( sizeof(long) );
+		}
+
+		//pop eax
+		op_pop(REG_EAX);
+
+		//sub esp,4
+		op_sub_esp(4);
+
+		//shl eax,cl
+		OpBuffer[obp++]=(char)0xD3;
+		OpBuffer[obp++]=(char)0xE0;
+
+		//mov dword ptr[esp],eax
+		OpBuffer[obp++]=(char)0x89;
+		OpBuffer[obp++]=(char)0x04;
+		OpBuffer[obp++]=(char)0x24;
+
+		sp--;
+
+		//32ビット型にする
+		if(IsSignedType(type[sp-1])) type[sp-1]=DEF_LONG;
+		else type[sp-1]=DEF_DWORD;
+	}
+
+	*pStackPointer=sp;
+	return 1;
+}
+
+BOOL Calc_SHR(int *type,int *pStackPointer){
+	//右ビットシフト
+	//value[sp-2]=value[sp-2]>>value[sp-1]
+
+	int sp;
+	sp=*pStackPointer;
+
+	if(type[sp-2]==DEF_INT64||type[sp-2]==DEF_QWORD){
+		////////////////
+		// 64ビット演算
+		////////////////
+
+		//2項目は32ビット整数として利用
+		if(type[sp-1]==DEF_DOUBLE){
+			//fld qword ptr[esp]
+			op_fld_ptr_esp(DEF_DOUBLE);
+
+			//add esp,4
+			op_add_esp(4);
+
+			//fistp dword ptr[esp]
+			op_fistp_ptr_esp( sizeof(long) );
+
+			//pop ecx
+			op_pop(REG_ECX);
+		}
+		else if(type[sp-1]==DEF_SINGLE){
+			//fld dword ptr[esp]
+			op_fld_ptr_esp(DEF_SINGLE);
+
+			//fistp dword ptr[esp]
+			op_fistp_ptr_esp( sizeof(long) );
+
+			//pop ecx
+			op_pop(REG_ECX);
+		}
+		else if(type[sp-1]==DEF_INT64||type[sp-1]==DEF_QWORD){
+			//pop ecx
+			op_pop(REG_ECX);
+
+			//add esp,4
+			op_add_esp(4);
+		}
+		else{
+			//pop ecx
+			op_pop(REG_ECX);
+		}
+
+		//第1項を64ビットに対応させる
+		if(type[sp-2]==DEF_DOUBLE){
+			//fld qword ptr[esp]
+			op_fld_ptr_esp(DEF_DOUBLE);
+
+			//fistp qword ptr[esp]
+			op_fistp_ptr_esp( sizeof(_int64) );
+
+			//pop eax
+			op_pop(REG_EAX);
+
+			//pop edx
+			op_pop(REG_EDX);
+		}
+		else if(type[sp-2]==DEF_SINGLE){
+			//fld dword ptr[esp]
+			op_fld_ptr_esp(DEF_SINGLE);
+
+			//sub esp,4
+			op_sub_esp(4);
+
+			//fistp qword ptr[esp]
+			op_fistp_ptr_esp( sizeof(_int64) );
+
+			//pop eax
+			op_pop(REG_EAX);
+
+			//pop edx
+			op_pop(REG_EDX);
+		}
+		else if(type[sp-2]==DEF_INT64||type[sp-2]==DEF_QWORD){
+			//pop eax
+			op_pop(REG_EAX);
+
+			//pop edx
+			op_pop(REG_EDX);
+		}
+		else{
+			//pop eax
+			op_pop(REG_EAX);
+
+			if(IsSignedType(type[sp-2])){
+				//符号拡張
+				//edx:eax ← eax
+
+				//cdq
+				op_cdq();
+			}
+			else{
+				//ビット拡張
+				//edx:eax ← eax
+
+				//xor edx,edx
+				op_zero_reg(REG_EDX);
+			}
+		}
+
+		if(type[sp-2]==DEF_QWORD){
+			//符号なし演算
+
+			//call _aullshr
+			extern UserProc *pSub_aullshr;
+			op_call(pSub_aullshr);
+		}
+		else{
+			//符号あり演算
+
+			//call _allshr
+			extern UserProc *pSub_allshr;
+			op_call(pSub_allshr);
+		}
+
+		//push edx
+		op_push(REG_EDX);
+
+		//push eax
+		op_push(REG_EAX);
+
+		sp--;
+	}
+	else{
+		////////////////
+		// 32ビット演算
+		////////////////
+
+		//2項目は32ビット整数として利用
+		if(type[sp-1]==DEF_DOUBLE){
+			//fld qword ptr[esp]
+			op_fld_ptr_esp(DEF_DOUBLE);
+
+			//add esp,4
+			op_add_esp(4);
+
+			//fistp dword ptr[esp]
+			op_fistp_ptr_esp( sizeof(long) );
+
+			//pop ecx
+			op_pop(REG_ECX);
+		}
+		else if(type[sp-1]==DEF_SINGLE){
+			//fld dword ptr[esp]
+			op_fld_ptr_esp(DEF_SINGLE);
+
+			//fistp dword ptr[esp]
+			op_fistp_ptr_esp( sizeof(long) );
+
+			//pop ecx
+			op_pop(REG_ECX);
+		}
+		else if(type[sp-1]==DEF_INT64||type[sp-1]==DEF_QWORD){
+			//pop ecx
+			op_pop(REG_ECX);
+
+			//add esp,4
+			op_add_esp(4);
+		}
+		else{
+			//pop ecx
+			op_pop(REG_ECX);
+		}
+
+		if(type[sp-2]==DEF_DOUBLE){
+			//fld qword ptr[esp]
+			op_fld_ptr_esp(DEF_DOUBLE);
+
+			//add esp,4
+			op_add_esp(4);
+
+			//fistp dword ptr[esp]
+			op_fistp_ptr_esp( sizeof(long) );
+		}
+		else if(type[sp-2]==DEF_SINGLE){
+			//fld dword ptr[esp]
+			op_fld_ptr_esp(DEF_SINGLE);
+
+			//fistp dword ptr[esp]
+			op_fistp_ptr_esp( sizeof(long) );
+		}
+
+		//pop eax
+		op_pop(REG_EAX);
+
+		//sub esp,4
+		op_sub_esp(4);
+
+		if(type[sp-2]==DEF_DWORD){
+			//shr eax,cl
+			OpBuffer[obp++]=(char)0xD3;
+			OpBuffer[obp++]=(char)0xE8;
+		}
+		else{
+			//sar eax,cl
+			OpBuffer[obp++]=(char)0xD3;
+			OpBuffer[obp++]=(char)0xF8;
+		}
+
+		//mov dword ptr[esp],eax
+		OpBuffer[obp++]=(char)0x89;
+		OpBuffer[obp++]=(char)0x04;
+		OpBuffer[obp++]=(char)0x24;
+
+		sp--;
+
+		//整数以外の型だったときはLong型にする
+		if(!IsWholeNumberType(type[sp-1])) type[sp-1]=DEF_LONG;
+	}
+
+	*pStackPointer=sp;
+	return 1;
+}
Index: /trunk/abdev/BasicCompiler32/NumOpe_Logical.cpp
===================================================================
--- /trunk/abdev/BasicCompiler32/NumOpe_Logical.cpp	(revision 148)
+++ /trunk/abdev/BasicCompiler32/NumOpe_Logical.cpp	(revision 148)
@@ -0,0 +1,505 @@
+#include "../BasicCompiler_Common/common.h"
+#include "Opcode.h"
+
+BOOL Calc_Xor(int *type,LONG_PTR *index_stack,int *pStackPointer){
+	//value[sp-2] xor= value[sp-1]
+	//xor演算
+
+	int sp;
+	sp=*pStackPointer;
+
+	if(IsRealNumberType(type[sp-2])||IsRealNumberType(type[sp-1])){
+		//いずれかの項が実数のとき
+		SetError(45,"xor",cp);
+		return 0;
+	}
+
+	if(type[sp-2]==DEF_INT64||type[sp-2]==DEF_QWORD||
+		type[sp-1]==DEF_INT64||type[sp-1]==DEF_QWORD){
+		////////////////////
+		// 64ビット整数演算
+		////////////////////
+
+		//第2項を64ビットに対応させる
+		if(type[sp-1]==DEF_INT64||type[sp-1]==DEF_QWORD){
+			//第2項が64ビット整数値のとき
+
+			//pop ebx
+			op_pop(REG_EBX);
+
+			//pop ecx
+			op_pop(REG_ECX);
+		}
+		else{
+			//第2項がその他整数値のとき
+
+			//pop eax
+			op_pop(REG_EAX);
+
+			if(IsSignedType(type[sp-1])){
+				//符号拡張
+				//edx:eax ← eax
+				
+				//cdq
+				op_cdq();
+			}
+			else{
+				//ビット拡張
+				//edx:eax ← eax
+
+				//xor edx,edx
+				op_zero_reg(REG_EDX);
+			}
+
+			//mov ebx,eax
+			OpBuffer[obp++]=(char)0x8B;
+			OpBuffer[obp++]=(char)0xD8;
+
+			//mov ecx,edx
+			OpBuffer[obp++]=(char)0x8B;
+			OpBuffer[obp++]=(char)0xCA;
+		}
+
+		if(type[sp-2]==DEF_INT64||type[sp-2]==DEF_QWORD){
+			//第1項が64ビット整数値のとき
+
+			//xor dword ptr[esp],ebx
+			OpBuffer[obp++]=(char)0x31;
+			OpBuffer[obp++]=(char)0x1C;
+			OpBuffer[obp++]=(char)0x24;
+
+			//xor dword ptr[esp+sizeof(long)],ecx
+			OpBuffer[obp++]=(char)0x31;
+			OpBuffer[obp++]=(char)0x4C;
+			OpBuffer[obp++]=(char)0x24;
+			OpBuffer[obp++]=(char)0x04;
+		}
+		else{
+			//第1項がその他整数値のとき
+			if(IsSignedType(type[sp-2])){
+				//pop eax
+				op_pop(REG_EAX);
+
+				//符号拡張
+				//edx:eax ← eax
+
+				//cdq
+				op_cdq();
+			}
+			else{
+				//pop eax
+				op_pop(REG_EAX);
+
+				//ビット拡張
+				//edx:eax ← eax
+
+				//xor edx,edx
+				op_zero_reg(REG_EDX);
+			}
+
+			//xor ebx,eax
+			OpBuffer[obp++]=(char)0x33;
+			OpBuffer[obp++]=(char)0xD8;
+
+			//xor ecx,edx
+			OpBuffer[obp++]=(char)0x33;
+			OpBuffer[obp++]=(char)0xCA;
+
+			//push ecx
+			op_push(REG_ECX);
+
+			//push ebx
+			op_push(REG_EBX);
+		}
+
+		sp--;
+		if(type[sp-1]==DEF_QWORD&&type[sp]==DEF_QWORD) type[sp-1]=DEF_QWORD;
+		else type[sp-1]=DEF_INT64;
+	}
+	else{
+		////////////////////
+		// 整数演算
+		////////////////////
+
+		//pop ebx
+		op_pop(REG_EBX);
+
+		//pop eax
+		op_pop(REG_EAX);
+
+		//sub esp,4
+		op_sub_esp(4);
+
+		//xor eax,ebx
+		OpBuffer[obp++]=(char)0x33;
+		OpBuffer[obp++]=(char)0xC3;
+
+		//mov dword ptr[esp],eax
+		OpBuffer[obp++]=(char)0x89;
+		OpBuffer[obp++]=(char)0x04;
+		OpBuffer[obp++]=(char)0x24;
+
+		sp--;
+		type[sp-1]=NeutralizationType(type[sp-1],index_stack[sp-1],type[sp],index_stack[sp]);
+	}
+
+	*pStackPointer=sp;
+	return 1;
+}
+
+BOOL Calc_Or(int *type,LONG_PTR *index_stack,int *pStackPointer){
+	//value[sp-2] or= value[sp-1]
+	//or演算
+
+	int sp;
+	sp=*pStackPointer;
+
+	if(IsRealNumberType(type[sp-2])||IsRealNumberType(type[sp-1])){
+		//いずれかの項が実数のとき
+		SetError(45,"or",cp);
+		return 0;
+	}
+
+	if(type[sp-2]==DEF_INT64||type[sp-2]==DEF_QWORD||
+		type[sp-1]==DEF_INT64||type[sp-1]==DEF_QWORD){
+		////////////////////
+		// 64ビット整数演算
+		////////////////////
+
+		//第2項を64ビットに対応させる
+		if(type[sp-1]==DEF_INT64||type[sp-1]==DEF_QWORD){
+			//第2項が64ビット整数値のとき
+
+			//pop ebx
+			op_pop(REG_EBX);
+
+			//pop ecx
+			op_pop(REG_ECX);
+		}
+		else{
+			//第2項が32ビット整数値のとき
+
+			//pop eax
+			op_pop(REG_EAX);
+
+			if(IsSignedType(type[sp-1])){
+				//符号拡張
+				//edx:eax ← eax
+				
+				//cdq
+				op_cdq();
+			}
+			else{
+				//ビット拡張
+				//edx:eax ← eax
+
+				//xor edx,edx
+				op_zero_reg(REG_EDX);
+			}
+
+			//mov ebx,eax
+			OpBuffer[obp++]=(char)0x8B;
+			OpBuffer[obp++]=(char)0xD8;
+
+			//mov ecx,edx
+			OpBuffer[obp++]=(char)0x8B;
+			OpBuffer[obp++]=(char)0xCA;
+		}
+
+		if(type[sp-2]==DEF_INT64||type[sp-2]==DEF_QWORD){
+			//第1項が64ビット整数値のとき
+
+			//or dword ptr[esp],ebx
+			OpBuffer[obp++]=(char)0x09;
+			OpBuffer[obp++]=(char)0x1C;
+			OpBuffer[obp++]=(char)0x24;
+
+			//or dword ptr[esp+sizeof(long)],ecx
+			OpBuffer[obp++]=(char)0x09;
+			OpBuffer[obp++]=(char)0x4C;
+			OpBuffer[obp++]=(char)0x24;
+			OpBuffer[obp++]=(char)0x04;
+		}
+		else{
+			//第1項が32ビット整数値のとき
+			if(IsSignedType(type[sp-2])){
+				//pop eax
+				op_pop(REG_EAX);
+
+				//符号拡張
+				//edx:eax ← eax
+
+				//cdq
+				op_cdq();
+			}
+			else{
+				//pop eax
+				op_pop(REG_EAX);
+
+				//ビット拡張
+				//edx:eax ← eax
+
+				//xor edx,edx
+				op_zero_reg(REG_EDX);
+			}
+
+			//or ebx,eax
+			OpBuffer[obp++]=(char)0x0B;
+			OpBuffer[obp++]=(char)0xD8;
+
+			//or ecx,edx
+			OpBuffer[obp++]=(char)0x0B;
+			OpBuffer[obp++]=(char)0xCA;
+
+			//push ecx
+			op_push(REG_ECX);
+
+			//push ebx
+			op_push(REG_EBX);
+		}
+
+		sp--;
+		if(type[sp-1]==DEF_QWORD&&type[sp]==DEF_QWORD) type[sp-1]=DEF_QWORD;
+		else type[sp-1]=DEF_INT64;
+	}
+	else{
+		////////////////////
+		// 32ビット整数演算
+		////////////////////
+
+		//pop ebx
+		op_pop(REG_EBX);
+
+		//pop eax
+		op_pop(REG_EAX);
+
+		//sub esp,4
+		op_sub_esp(4);
+
+		//or eax,ebx
+		OpBuffer[obp++]=(char)0x0B;
+		OpBuffer[obp++]=(char)0xC3;
+
+		//mov dword ptr[esp],eax
+		OpBuffer[obp++]=(char)0x89;
+		OpBuffer[obp++]=(char)0x04;
+		OpBuffer[obp++]=(char)0x24;
+
+		sp--;
+		type[sp-1]=NeutralizationType(type[sp-1],index_stack[sp-1],type[sp],index_stack[sp]);
+	}
+
+	*pStackPointer=sp;
+	return 1;
+}
+
+BOOL Calc_And(int *type,LONG_PTR *index_stack,int *pStackPointer){
+	//value[sp-2] and= value[sp-1]
+	//and演算
+
+	int sp;
+	sp=*pStackPointer;
+
+	if(IsRealNumberType(type[sp-2])||IsRealNumberType(type[sp-1])){
+		//いずれかの項が実数のとき
+		SetError(45,"and",cp);
+		return 0;
+	}
+
+	if(type[sp-2]==DEF_INT64||type[sp-2]==DEF_QWORD||
+		type[sp-1]==DEF_INT64||type[sp-1]==DEF_QWORD){
+		////////////////////
+		// 64ビット整数演算
+		////////////////////
+
+		//第2項を64ビットに対応させる
+		if(type[sp-1]==DEF_INT64||type[sp-1]==DEF_QWORD){
+			//第2項が64ビット整数値のとき
+
+			//pop ebx
+			op_pop(REG_EBX);
+
+			//pop ecx
+			op_pop(REG_ECX);
+		}
+		else{
+			//第2項が32ビット整数値のとき
+
+			//pop eax
+			op_pop(REG_EAX);
+
+			if(IsSignedType(type[sp-1])){
+				//符号拡張
+				//edx:eax ← eax
+				
+				//cdq
+				op_cdq();
+			}
+			else{
+				//ビット拡張
+				//edx:eax ← eax
+
+				//xor edx,edx
+				op_zero_reg(REG_EDX);
+			}
+
+			//mov ebx,eax
+			OpBuffer[obp++]=(char)0x8B;
+			OpBuffer[obp++]=(char)0xD8;
+
+			//mov ecx,edx
+			OpBuffer[obp++]=(char)0x8B;
+			OpBuffer[obp++]=(char)0xCA;
+		}
+
+		if(type[sp-2]==DEF_INT64||type[sp-2]==DEF_QWORD){
+			//第1項が64ビット整数値のとき
+
+			//and dword ptr[esp],ebx
+			OpBuffer[obp++]=(char)0x21;
+			OpBuffer[obp++]=(char)0x1C;
+			OpBuffer[obp++]=(char)0x24;
+
+			//and dword ptr[esp+sizeof(long)],ecx
+			OpBuffer[obp++]=(char)0x21;
+			OpBuffer[obp++]=(char)0x4C;
+			OpBuffer[obp++]=(char)0x24;
+			OpBuffer[obp++]=(char)0x04;
+		}
+		else{
+			//第1項が32ビット整数値のとき
+			if(IsSignedType(type[sp-2])){
+				//pop eax
+				op_pop(REG_EAX);
+
+				//符号拡張
+				//edx:eax ← eax
+
+				//cdq
+				op_cdq();
+			}
+			else{
+				//pop eax
+				op_pop(REG_EAX);
+
+				//ビット拡張
+				//edx:eax ← eax
+
+				//xor edx,edx
+				op_zero_reg(REG_EDX);
+			}
+
+			//and ebx,eax
+			OpBuffer[obp++]=(char)0x23;
+			OpBuffer[obp++]=(char)0xD8;
+
+			//and ecx,edx
+			OpBuffer[obp++]=(char)0x23;
+			OpBuffer[obp++]=(char)0xCA;
+
+			//push ecx
+			op_push(REG_ECX);
+
+			//push ebx
+			op_push(REG_EBX);
+		}
+
+		sp--;
+		if(type[sp-1]==DEF_QWORD&&type[sp]==DEF_QWORD) type[sp-1]=DEF_QWORD;
+		else type[sp-1]=DEF_INT64;
+	}
+	else{
+		////////////////////
+		// 32ビット整数演算
+		////////////////////
+
+		//pop ebx
+		op_pop(REG_EBX);
+
+		//pop eax
+		op_pop(REG_EAX);
+
+		//sub esp,4
+		op_sub_esp(4);
+
+		//and eax,ebx
+		OpBuffer[obp++]=(char)0x23;
+		OpBuffer[obp++]=(char)0xC3;
+
+		//mov dword ptr[esp],eax
+		OpBuffer[obp++]=(char)0x89;
+		OpBuffer[obp++]=(char)0x04;
+		OpBuffer[obp++]=(char)0x24;
+
+		sp--;
+		type[sp-1]=NeutralizationType(type[sp-1],index_stack[sp-1],type[sp],index_stack[sp]);
+	}
+
+	*pStackPointer=sp;
+	return 1;
+}
+
+BOOL Calc_Not(int *type,int sp){
+	//value[sp-1]=Not value[sp-1]
+	//NOT演算子
+
+	if(IsRealNumberType(type[sp-1])){
+		//実数のとき
+		SetError(45,"Not",cp);
+		return 0;
+	}
+
+	if( type[sp - 1] == DEF_BOOLEAN ){
+		//pop eax
+		op_pop( REG_EAX );
+
+		//cmp eax,0
+		op_cmp_value(GetTypeSize(type[sp-1],-1),REG_EAX,0);
+
+		//setne al
+		op_setne( REG_EAX );
+
+		//and eax,000000FFh
+		op_and_RV(REG_EAX,(int)0xFF);
+
+		//neg
+		op_neg( REG_EAX );
+
+		//sbb eax, eax
+		op_sbb_RR( REG_EAX, REG_EAX );
+
+		//add eax, 1
+		op_add_RV8( REG_EAX, 1 );
+
+		//push eax
+		op_push( REG_EAX );
+	}
+	else if(type[sp-1]==DEF_INT64||type[sp-1]==DEF_QWORD){
+		////////////////////
+		// 64ビット整数演算
+		////////////////////
+
+		//not dword ptr[esp]
+		OpBuffer[obp++]=(char)0xF7;
+		OpBuffer[obp++]=(char)0x14;
+		OpBuffer[obp++]=(char)0x24;
+
+		//not dword ptr[esp+4]
+		OpBuffer[obp++]=(char)0xF7;
+		OpBuffer[obp++]=(char)0x54;
+		OpBuffer[obp++]=(char)0x24;
+		OpBuffer[obp++]=(char)0x04;
+	}
+	else{
+		////////////////////
+		// 32ビット整数演算
+		////////////////////
+
+		//not dword ptr[esp]
+		OpBuffer[obp++]=(char)0xF7;
+		OpBuffer[obp++]=(char)0x14;
+		OpBuffer[obp++]=(char)0x24;
+	}
+
+	return 1;
+}
Index: /trunk/abdev/BasicCompiler32/NumOpe_Relation.cpp
===================================================================
--- /trunk/abdev/BasicCompiler32/NumOpe_Relation.cpp	(revision 148)
+++ /trunk/abdev/BasicCompiler32/NumOpe_Relation.cpp	(revision 148)
@@ -0,0 +1,1385 @@
+#include "../BasicCompiler_Common/common.h"
+#include "Opcode.h"
+
+void AutoExtendToBigType( int *type_stack,int sp, int reg1, int reg2 ){
+	/*
+	int bigSize = GetTypeSize( type_stack[sp-1], -1 );
+	if( bigSize != GetTypeSize( type_stack[sp-2], -1 ) ){
+		int extReg = reg2;
+		int oldType = type_stack[sp-2];
+		if( bigSize < GetTypeSize( type_stack[sp-2], -1 ) ){
+			bigSize = GetTypeSize( type_stack[sp-2], -1 );
+			extReg = reg1;
+			oldType = type_stack[sp-1];
+		}
+		if( bigSize == 2 ){
+			ExtendTypeTo16( oldType, extReg );
+		}
+		else if( bigSize == 4 ){
+			ExtendTypeTo32( oldType, extReg );
+		}
+		else{
+			SetError();
+		}
+	}*/
+}
+
+
+BOOL Calc_Relation_PE(int *type_stack,LONG_PTR *index_stack,int *pStackPointer){
+	//value[sp-2]<=value[sp-1]
+
+	int sp;
+	sp=*pStackPointer;
+
+	int AnswerType;
+	AnswerType=NeutralizationType(type_stack[sp-2],index_stack[sp-2],type_stack[sp-1],index_stack[sp-1]);
+
+	if(IsRealNumberType(AnswerType)){
+		//////////////
+		// 実数演算
+		//////////////
+
+		if(type_stack[sp-1]==DEF_DOUBLE){
+			//fld qword ptr[esp]
+			op_fld_ptr_esp(DEF_DOUBLE);
+
+			//add esp,8
+			op_add_esp(8);
+		}
+		else if(type_stack[sp-1]==DEF_SINGLE){
+			//fld dword ptr[esp]
+			op_fld_ptr_esp(DEF_SINGLE);
+
+			//add esp,4
+			op_add_esp(4);
+		}
+		else if(type_stack[sp-1]==DEF_INT64||type_stack[sp-1]==DEF_QWORD){
+			//64ビット整数値
+
+			//fild qword ptr[esp]
+			op_fld_ptr_esp(DEF_INT64);
+
+			//add esp,8
+			op_add_esp(8);
+		}
+		else{
+			//その他整数型
+
+			//fild dword ptr[esp]
+			op_fld_ptr_esp(DEF_LONG);
+
+			//add esp,4
+			op_add_esp(4);
+		}
+
+		if(type_stack[sp-2]==DEF_DOUBLE){
+			//fld qword ptr[esp]
+			op_fld_ptr_esp(DEF_DOUBLE);
+
+			//add esp,4
+			op_add_esp(4);
+		}
+		else if(type_stack[sp-2]==DEF_SINGLE){
+			//fld dword ptr[esp]
+			op_fld_ptr_esp(DEF_SINGLE);
+		}
+		else if(type_stack[sp-2]==DEF_INT64||type_stack[sp-2]==DEF_QWORD){
+			//64ビット整数値
+
+			//fild qword ptr[esp]
+			op_fld_ptr_esp(DEF_INT64);
+
+			//add esp,4
+			op_add_esp(4);
+		}
+		else{
+			//その他整数型
+
+			//fild dword ptr[esp]
+			op_fld_ptr_esp(DEF_LONG);
+		}
+
+		//fcompp
+		OpBuffer[obp++]=(char)0xDE;
+		OpBuffer[obp++]=(char)0xD9;
+
+		//fnstsw ax
+		OpBuffer[obp++]=(char)0xDF;
+		OpBuffer[obp++]=(char)0xE0;
+
+		//mov ecx,1
+		OpBuffer[obp++]=(char)0xB9;
+		*((long *)(OpBuffer+obp))=1;
+		obp+=sizeof(long);
+
+		//test ah,41h
+		OpBuffer[obp++]=(char)0xF6;
+		OpBuffer[obp++]=(char)0xC4;
+		OpBuffer[obp++]=(char)0x41;
+
+		//jne 5
+		OpBuffer[obp++]=(char)0x75;
+		OpBuffer[obp++]=(char)0x02;
+
+		//xor ecx,ecx（ecxを0にする）
+		op_zero_reg(REG_ECX);
+
+		//mov dword ptr[esp],ecx
+		OpBuffer[obp++]=(char)0x89;
+		OpBuffer[obp++]=(char)0x0C;
+		OpBuffer[obp++]=(char)0x24;
+	}
+	else if(Is64Type(AnswerType)){
+		////////////////////
+		// 64ビット整数演算
+		////////////////////
+		int TrueSchedule,
+			FalseSchedule1,
+			FalseSchedule2;
+
+		// 第1項 <= 第2項
+
+		//第1項 edx:eax
+		//第2項 ecx:ebx
+		GetStackData_ToRegister(type_stack,sp);
+
+		//cmp edx,ecx
+		OpBuffer[obp++]=(char)0x3B;
+		OpBuffer[obp++]=(char)0xD1;
+
+		if(IsSignedType(type_stack[sp-2])==0&&IsSignedType(type_stack[sp-1])==0){
+			//符号なし演算
+
+			//ja FalseSchedule1（偽へジャンプ）
+			OpBuffer[obp++]=(char)0x77;
+		}
+		else{
+			//符号あり演算
+
+			//jg FalseSchedule1（偽へジャンプ）
+			OpBuffer[obp++]=(char)0x7F;
+		}
+		FalseSchedule1=obp;
+		obp++;
+
+		if(IsSignedType(type_stack[sp-2])==0&&IsSignedType(type_stack[sp-1])==0){
+			//符号なし演算
+
+			//jb TrueSchedule（真へジャンプ）
+			OpBuffer[obp++]=(char)0x72;
+		}
+		else{
+			//符号あり演算
+
+			//jl TrueSchedule（真へジャンプ）
+			OpBuffer[obp++]=(char)0x7C;
+		}
+		TrueSchedule=obp;
+		obp++;
+
+		//cmp eax,ebx
+		OpBuffer[obp++]=(char)0x3B;
+		OpBuffer[obp++]=(char)0xC3;
+
+		//ja FalseSchedule2（偽へジャンプ）
+		OpBuffer[obp++]=(char)0x77;
+		FalseSchedule2=obp;
+		obp++;
+
+		//TrueScheduleのジャンプ先の設定
+		OpBuffer[TrueSchedule]=obp-(TrueSchedule+1);
+
+		//mov eax,1
+		OpBuffer[obp++]=(char)0xB8;
+		*((long *)(OpBuffer+obp))=1;
+		obp+=sizeof(long);
+
+		//jmp 2（演算終了位置へジャンプ）
+		OpBuffer[obp++]=(char)0xEB;
+		OpBuffer[obp++]=(char)0x02;
+
+		//FalseScheduleのジャンプ先の設定
+		OpBuffer[FalseSchedule1]=obp-(FalseSchedule1+1);
+		OpBuffer[FalseSchedule2]=obp-(FalseSchedule2+1);
+
+		//xor eax,eax（eaxを0にする）
+		op_zero_reg(REG_EAX);
+
+		//push eax
+		op_push(REG_EAX);
+	}
+	else{
+		////////////////////
+		// 32ビット整数演算
+		////////////////////
+
+		//pop ebx
+		op_pop(REG_EBX);
+
+		//pop eax
+		op_pop(REG_EAX);
+
+		// どちらかのサイズが足りない場合は自動拡張する
+		AutoExtendToBigType( type_stack, sp, REG_EAX, REG_EBX );
+
+		//sub esp,4
+		op_sub_esp(4);
+
+		//mov ecx,1
+		OpBuffer[obp++]=(char)0xB9;
+		*((long *)(OpBuffer+obp))=1;
+		obp+=sizeof(long);
+
+		//cmp eax,ebx
+		OpBuffer[obp++]=(char)0x3B;
+		OpBuffer[obp++]=(char)0xC3;
+
+		if(IsSignedType(type_stack[sp-2])==0&&IsSignedType(type_stack[sp-1])==0){
+			//符号なし演算
+
+			//jbe 5（次のmovを飛び越す）
+			OpBuffer[obp++]=(char)0x76;
+			OpBuffer[obp++]=(char)0x05;
+		}
+		else{
+			//符号あり演算
+
+			//jle 5（次のmovを飛び越す）
+			OpBuffer[obp++]=(char)0x7E;
+			OpBuffer[obp++]=(char)0x05;
+		}
+
+		//mov ecx,0
+		OpBuffer[obp++]=(char)0xB9;
+		*((long *)(OpBuffer+obp))=0;
+		obp+=sizeof(long);
+
+		//mov dword ptr[esp],ecx
+		OpBuffer[obp++]=(char)0x89;
+		OpBuffer[obp++]=(char)0x0C;
+		OpBuffer[obp++]=(char)0x24;
+	}
+
+	sp--;
+	type_stack[sp-1]=DEF_BOOLEAN;
+
+	*pStackPointer=sp;
+	return 1;
+}
+
+BOOL Calc_Relation_QE(int *type_stack,LONG_PTR *index_stack,int *pStackPointer){
+	//value[sp-2]>=value[sp-1]
+
+	int sp;
+	sp=*pStackPointer;
+
+	int AnswerType;
+	AnswerType=NeutralizationType(type_stack[sp-2],index_stack[sp-2],type_stack[sp-1],index_stack[sp-1]);
+
+	if(IsRealNumberType(AnswerType)){
+		//浮動小数点演算
+		if(type_stack[sp-1]==DEF_DOUBLE){
+			//fld qword ptr[esp]
+			op_fld_ptr_esp(DEF_DOUBLE);
+
+			//add esp,8
+			op_add_esp(8);
+		}
+		else if(type_stack[sp-1]==DEF_SINGLE){
+			//fld dword ptr[esp]
+			op_fld_ptr_esp(DEF_SINGLE);
+
+			//add esp,4
+			op_add_esp(4);
+		}
+		else if(type_stack[sp-1]==DEF_INT64||type_stack[sp-1]==DEF_QWORD){
+			//64ビット整数値
+
+			//fild qword ptr[esp]
+			op_fld_ptr_esp(DEF_INT64);
+
+			//add esp,8
+			op_add_esp(8);
+		}
+		else{
+			//その他整数型
+
+			//fild dword ptr[esp]
+			op_fld_ptr_esp(DEF_LONG);
+
+			//add esp,4
+			op_add_esp(4);
+		}
+
+		if(type_stack[sp-2]==DEF_DOUBLE){
+			//fld qword ptr[esp]
+			op_fld_ptr_esp(DEF_DOUBLE);
+
+			//add esp,4
+			op_add_esp(4);
+		}
+		else if(type_stack[sp-2]==DEF_SINGLE){
+			//fld dword ptr[esp]
+			op_fld_ptr_esp(DEF_SINGLE);
+		}
+		else if(type_stack[sp-2]==DEF_INT64||type_stack[sp-2]==DEF_QWORD){
+			//64ビット整数値
+
+			//fild qword ptr[esp]
+			op_fld_ptr_esp(DEF_INT64);
+
+			//add esp,4
+			op_add_esp(4);
+		}
+		else{
+			//その他整数型
+
+			//fild dword ptr[esp]
+			op_fld_ptr_esp(DEF_LONG);
+		}
+
+		//fcompp
+		OpBuffer[obp++]=(char)0xDE;
+		OpBuffer[obp++]=(char)0xD9;
+
+		//fnstsw ax
+		OpBuffer[obp++]=(char)0xDF;
+		OpBuffer[obp++]=(char)0xE0;
+
+		//mov ecx,1
+		OpBuffer[obp++]=(char)0xB9;
+		*((long *)(OpBuffer+obp))=1;
+		obp+=sizeof(long);
+
+		//test ah,1
+		OpBuffer[obp++]=(char)0xF6;
+		OpBuffer[obp++]=(char)0xC4;
+		OpBuffer[obp++]=(char)0x01;
+
+		//je 5
+		OpBuffer[obp++]=(char)0x74;
+		OpBuffer[obp++]=(char)0x05;
+
+		//mov ecx,0
+		OpBuffer[obp++]=(char)0xB9;
+		*((long *)(OpBuffer+obp))=0;
+		obp+=sizeof(long);
+
+		//mov dword ptr[esp],ecx
+		OpBuffer[obp++]=(char)0x89;
+		OpBuffer[obp++]=(char)0x0C;
+		OpBuffer[obp++]=(char)0x24;
+	}
+	else if(Is64Type(AnswerType)){
+		////////////////////
+		// 64ビット整数演算
+		////////////////////
+		int TrueSchedule,
+			FalseSchedule1,
+			FalseSchedule2;
+
+		// 第1項 >= 第2項
+
+		//第1項 edx:eax
+		//第2項 ecx:ebx
+		GetStackData_ToRegister(type_stack,sp);
+
+		//cmp edx,ecx
+		OpBuffer[obp++]=(char)0x3B;
+		OpBuffer[obp++]=(char)0xD1;
+
+		if(IsSignedType(AnswerType)){
+			//符号あり演算
+
+			//jl FalseSchedule1（偽へジャンプ）
+			OpBuffer[obp++]=(char)0x7C;
+		}
+		else{
+			//符号なし演算
+
+			//jb FalseSchedule1（偽へジャンプ）
+			OpBuffer[obp++]=(char)0x72;
+		}
+		FalseSchedule1=obp;
+		obp++;
+
+		if(IsSignedType(AnswerType)){
+			//符号あり演算
+
+			//jg TrueSchedule（真へジャンプ）
+			OpBuffer[obp++]=(char)0x7F;
+		}
+		else{
+			//符号なし演算
+
+			//ja TrueSchedule（真へジャンプ）
+			OpBuffer[obp++]=(char)0x77;
+		}
+		TrueSchedule=obp;
+		obp++;
+
+		//cmp eax,ebx
+		OpBuffer[obp++]=(char)0x3B;
+		OpBuffer[obp++]=(char)0xC3;
+
+		//jb FalseSchedule2（偽へジャンプ）
+		OpBuffer[obp++]=(char)0x72;
+		FalseSchedule2=obp;
+		obp++;
+
+		//TrueScheduleのジャンプ先の設定
+		OpBuffer[TrueSchedule]=obp-(TrueSchedule+1);
+
+		//mov eax,1
+		OpBuffer[obp++]=(char)0xB8;
+		*((long *)(OpBuffer+obp))=1;
+		obp+=sizeof(long);
+
+		//jmp 2（演算終了位置へジャンプ）
+		OpBuffer[obp++]=(char)0xEB;
+		OpBuffer[obp++]=(char)0x02;
+
+		//FalseScheduleのジャンプ先の設定
+		OpBuffer[FalseSchedule1]=obp-(FalseSchedule1+1);
+		OpBuffer[FalseSchedule2]=obp-(FalseSchedule2+1);
+
+		//xor eax,eax（eaxを0にする）
+		op_zero_reg(REG_EAX);
+
+		//push eax
+		op_push(REG_EAX);
+	}
+	else{
+		////////////////////
+		// 32ビット整数演算
+		////////////////////
+
+		//pop ebx
+		op_pop(REG_EBX);
+
+		//pop eax
+		op_pop(REG_EAX);
+
+		// どちらかのサイズが足りない場合は自動拡張する
+		AutoExtendToBigType( type_stack, sp, REG_EAX, REG_EBX );
+
+		//sub esp,4
+		op_sub_esp(4);
+
+		//mov ecx,1
+		OpBuffer[obp++]=(char)0xB9;
+		*((long *)(OpBuffer+obp))=1;
+		obp+=sizeof(long);
+
+		//cmp eax,ebx
+		OpBuffer[obp++]=(char)0x3B;
+		OpBuffer[obp++]=(char)0xC3;
+
+		if(IsSignedType(AnswerType)){
+			//符号あり演算
+
+			//jge 5（次のmovを飛び越す）符号有り
+			OpBuffer[obp++]=(char)0x7D;
+			OpBuffer[obp++]=(char)0x05;
+		}
+		else{
+			//符号なし演算
+
+			//jae 5（次のmovを飛び越す）
+			OpBuffer[obp++]=(char)0x73;
+			OpBuffer[obp++]=(char)0x05;
+		}
+
+		//mov ecx,0
+		OpBuffer[obp++]=(char)0xB9;
+		*((long *)(OpBuffer+obp))=0;
+		obp+=sizeof(long);
+
+		//mov dword ptr[esp],ecx
+		OpBuffer[obp++]=(char)0x89;
+		OpBuffer[obp++]=(char)0x0C;
+		OpBuffer[obp++]=(char)0x24;
+	}
+
+	sp--;
+	type_stack[sp-1]=DEF_BOOLEAN;
+
+	*pStackPointer=sp;
+	return 1;
+}
+
+BOOL Calc_Relation_P(int *type_stack,LONG_PTR *index_stack,int *pStackPointer){
+	//value[sp-2]<value[sp-1]
+
+	int sp;
+	sp=*pStackPointer;
+
+	int AnswerType;
+	AnswerType=NeutralizationType(type_stack[sp-2],index_stack[sp-2],type_stack[sp-1],index_stack[sp-1]);
+
+	if(IsRealNumberType(AnswerType)){
+		//////////////
+		// 実数演算
+		//////////////
+
+		if(type_stack[sp-1]==DEF_DOUBLE){
+			//fld qword ptr[esp]
+			op_fld_ptr_esp(DEF_DOUBLE);
+
+			//add esp,8
+			op_add_esp(8);
+		}
+		else if(type_stack[sp-1]==DEF_SINGLE){
+			//fld dword ptr[esp]
+			op_fld_ptr_esp(DEF_SINGLE);
+
+			//add esp,4
+			op_add_esp(4);
+		}
+		else if(type_stack[sp-1]==DEF_INT64||type_stack[sp-1]==DEF_QWORD){
+			//64ビット整数値
+
+			//fild qword ptr[esp]
+			op_fld_ptr_esp(DEF_INT64);
+
+			//add esp,8
+			op_add_esp(8);
+		}
+		else{
+			//その他整数型
+
+			//fild dword ptr[esp]
+			op_fld_ptr_esp(DEF_LONG);
+
+			//add esp,4
+			op_add_esp(4);
+		}
+
+		if(type_stack[sp-2]==DEF_DOUBLE){
+			//fld qword ptr[esp]
+			op_fld_ptr_esp(DEF_DOUBLE);
+
+			//add esp,4
+			op_add_esp(4);
+		}
+		else if(type_stack[sp-2]==DEF_SINGLE){
+			//fld dword ptr[esp]
+			op_fld_ptr_esp(DEF_SINGLE);
+		}
+		else if(type_stack[sp-2]==DEF_INT64||type_stack[sp-2]==DEF_QWORD){
+			//64ビット整数値
+
+			//fild qword ptr[esp]
+			op_fld_ptr_esp(DEF_INT64);
+
+			//add esp,4
+			op_add_esp(4);
+		}
+		else{
+			//その他整数型
+
+			//fild dword ptr[esp]
+			op_fld_ptr_esp(DEF_LONG);
+		}
+
+		//fcompp
+		OpBuffer[obp++]=(char)0xDE;
+		OpBuffer[obp++]=(char)0xD9;
+
+		//fnstsw ax
+		OpBuffer[obp++]=(char)0xDF;
+		OpBuffer[obp++]=(char)0xE0;
+
+		//mov ecx,1
+		OpBuffer[obp++]=(char)0xB9;
+		*((long *)(OpBuffer+obp))=1;
+		obp+=sizeof(long);
+
+		//test ah,01h
+		OpBuffer[obp++]=(char)0xF6;
+		OpBuffer[obp++]=(char)0xC4;
+		OpBuffer[obp++]=(char)0x01;
+
+		//jne 5
+		OpBuffer[obp++]=(char)0x75;
+		OpBuffer[obp++]=(char)0x05;
+
+		//mov ecx,0
+		OpBuffer[obp++]=(char)0xB9;
+		*((long *)(OpBuffer+obp))=0;
+		obp+=sizeof(long);
+
+		//mov dword ptr[esp],ecx
+		OpBuffer[obp++]=(char)0x89;
+		OpBuffer[obp++]=(char)0x0C;
+		OpBuffer[obp++]=(char)0x24;
+	}
+	else if(Is64Type(AnswerType)){
+		////////////////////
+		// 64ビット整数演算
+		////////////////////
+		int TrueSchedule1,
+			TrueSchedule2,
+			FalseSchedule;
+
+		// 第1項 < 第2項
+
+		//第1項 edx:eax
+		//第2項 ecx:ebx
+		GetStackData_ToRegister(type_stack,sp);
+
+		//cmp edx,ecx
+		OpBuffer[obp++]=(char)0x3B;
+		OpBuffer[obp++]=(char)0xD1;
+
+		if(IsSignedType(AnswerType)){
+			//符号あり演算
+
+			//jl TrueSchedule1（真へジャンプ）
+			OpBuffer[obp++]=(char)0x7C;
+		}
+		else{
+			//符号なし演算
+
+			//jb TrueSchedule1（真へジャンプ）
+			OpBuffer[obp++]=(char)0x72;
+		}
+		TrueSchedule1=obp;
+		obp++;
+
+		if(IsSignedType(AnswerType)){
+			//符号あり演算
+
+			//jg FalseSchedule（偽へジャンプ）
+			OpBuffer[obp++]=(char)0x7F;
+		}
+		else{
+			//符号なし演算
+
+			//ja FalseSchedule（偽へジャンプ）
+			OpBuffer[obp++]=(char)0x77;
+		}
+		FalseSchedule=obp;
+		obp++;
+
+		//cmp eax,ebx
+		OpBuffer[obp++]=(char)0x3B;
+		OpBuffer[obp++]=(char)0xC3;
+
+		//jb TrueSchedule2（真へジャンプ）
+		OpBuffer[obp++]=(char)0x72;
+		TrueSchedule2=obp;
+		obp++;
+
+		//FalseScheduleのジャンプ先の設定
+		OpBuffer[FalseSchedule]=obp-(FalseSchedule+1);
+
+		//xor eax,eax（eaxを0にする）
+		op_zero_reg(REG_EAX);
+
+		//jmp 5（演算終了位置へジャンプ）
+		OpBuffer[obp++]=(char)0xEB;
+		OpBuffer[obp++]=(char)0x05;
+
+		//TrueScheduleのジャンプ先の設定
+		OpBuffer[TrueSchedule1]=obp-(TrueSchedule1+1);
+		OpBuffer[TrueSchedule2]=obp-(TrueSchedule2+1);
+
+		//mov eax,1
+		OpBuffer[obp++]=(char)0xB8;
+		*((long *)(OpBuffer+obp))=1;
+		obp+=sizeof(long);
+
+		//push eax
+		op_push(REG_EAX);
+	}
+	else{
+		///////////////////
+		//32ビット整数演算
+		///////////////////
+
+		//pop ebx
+		op_pop(REG_EBX);
+
+		//pop eax
+		op_pop(REG_EAX);
+
+		// どちらかのサイズが足りない場合は自動拡張する
+		AutoExtendToBigType( type_stack, sp, REG_EAX, REG_EBX );
+
+		//sub esp,4
+		op_sub_esp(4);
+
+		//mov ecx,1
+		OpBuffer[obp++]=(char)0xB9;
+		*((long *)(OpBuffer+obp))=1;
+		obp+=sizeof(long);
+
+		//cmp eax,ebx
+		OpBuffer[obp++]=(char)0x3B;
+		OpBuffer[obp++]=(char)0xC3;
+
+		if(IsSignedType(AnswerType)){
+			//符号あり演算
+
+			//jl 5（次のmovを飛び越す）
+			OpBuffer[obp++]=(char)0x7C;
+			OpBuffer[obp++]=(char)0x05;
+		}
+		else{
+			//符号なし演算
+
+			//jb 5（次のmovを飛び越す）
+			OpBuffer[obp++]=(char)0x72;
+			OpBuffer[obp++]=(char)0x05;
+		}
+
+		//mov ecx,0
+		OpBuffer[obp++]=(char)0xB9;
+		*((long *)(OpBuffer+obp))=0;
+		obp+=sizeof(long);
+
+		//mov dword ptr[esp],ecx
+		OpBuffer[obp++]=(char)0x89;
+		OpBuffer[obp++]=(char)0x0C;
+		OpBuffer[obp++]=(char)0x24;
+	}
+
+	sp--;
+	type_stack[sp-1]=DEF_BOOLEAN;
+
+	*pStackPointer=sp;
+	return 1;
+}
+
+BOOL Calc_Relation_Q(int *type_stack,LONG_PTR *index_stack,int *pStackPointer){
+	//value[sp-2]>value[sp-1]
+
+	int sp;
+	sp=*pStackPointer;
+
+	int AnswerType;
+	AnswerType=NeutralizationType(type_stack[sp-2],index_stack[sp-2],type_stack[sp-1],index_stack[sp-1]);
+
+	if(IsRealNumberType(AnswerType)){
+		//////////////
+		// 実数演算
+		//////////////
+
+		if(type_stack[sp-1]==DEF_DOUBLE){
+			//fld qword ptr[esp]
+			op_fld_ptr_esp(DEF_DOUBLE);
+
+			//add esp,8
+			op_add_esp(8);
+		}
+		else if(type_stack[sp-1]==DEF_SINGLE){
+			//fld dword ptr[esp]
+			op_fld_ptr_esp(DEF_SINGLE);
+
+			//add esp,4
+			op_add_esp(4);
+		}
+		else if(type_stack[sp-1]==DEF_INT64||type_stack[sp-1]==DEF_QWORD){
+			//64ビット整数値
+
+			//fild qword ptr[esp]
+			op_fld_ptr_esp(DEF_INT64);
+
+			//add esp,8
+			op_add_esp(8);
+		}
+		else{	//Long、DWord
+			//fild dword ptr[esp]
+			op_fld_ptr_esp(DEF_LONG);
+
+			//add esp,4
+			op_add_esp(4);
+		}
+
+		if(type_stack[sp-2]==DEF_DOUBLE){
+			//fld qword ptr[esp]
+			op_fld_ptr_esp(DEF_DOUBLE);
+
+			//add esp,4
+			op_add_esp(4);
+		}
+		else if(type_stack[sp-2]==DEF_SINGLE){
+			//fld dword ptr[esp]
+			op_fld_ptr_esp(DEF_SINGLE);
+		}
+		else if(type_stack[sp-2]==DEF_INT64||type_stack[sp-2]==DEF_QWORD){
+			//64ビット整数値
+
+			//fild qword ptr[esp]
+			op_fld_ptr_esp(DEF_INT64);
+
+			//add esp,4
+			op_add_esp(4);
+		}
+		else{	//Long、DWord
+			//fild dword ptr[esp]
+			op_fld_ptr_esp(DEF_LONG);
+		}
+
+		//fcompp
+		OpBuffer[obp++]=(char)0xDE;
+		OpBuffer[obp++]=(char)0xD9;
+
+		//fnstsw ax
+		OpBuffer[obp++]=(char)0xDF;
+		OpBuffer[obp++]=(char)0xE0;
+
+		//mov ecx,1
+		OpBuffer[obp++]=(char)0xB9;
+		*((long *)(OpBuffer+obp))=1;
+		obp+=sizeof(long);
+
+		//test ah,41
+		OpBuffer[obp++]=(char)0xF6;
+		OpBuffer[obp++]=(char)0xC4;
+		OpBuffer[obp++]=(char)0x41;
+
+		//je 5
+		OpBuffer[obp++]=(char)0x74;
+		OpBuffer[obp++]=(char)0x05;
+
+		//mov ecx,0
+		OpBuffer[obp++]=(char)0xB9;
+		*((long *)(OpBuffer+obp))=0;
+		obp+=sizeof(long);
+
+		//mov dword ptr[esp],ecx
+		OpBuffer[obp++]=(char)0x89;
+		OpBuffer[obp++]=(char)0x0C;
+		OpBuffer[obp++]=(char)0x24;
+	}
+	else if(Is64Type(AnswerType)){
+		////////////////////
+		// 64ビット整数演算
+		////////////////////
+		int FalseSchedule,
+			TrueSchedule1,
+			TrueSchedule2;
+
+		// 第1項 > 第2項
+
+		//第1項 edx:eax
+		//第2項 ecx:ebx
+		GetStackData_ToRegister(type_stack,sp);
+
+		//cmp edx,ecx
+		OpBuffer[obp++]=(char)0x3B;
+		OpBuffer[obp++]=(char)0xD1;
+
+		if(IsSignedType(AnswerType)){
+			//符号有り
+
+			//jg TrueSchedule1（真へジャンプ）
+			OpBuffer[obp++]=(char)0x7F;
+		}
+		else{
+			//符号無し
+
+			//ja TrueSchedule1（真へジャンプ）
+			OpBuffer[obp++]=(char)0x77;
+		}
+		TrueSchedule1=obp;
+		obp++;
+
+		if(IsSignedType(AnswerType)){
+			//符号有り
+
+			//jl FalseSchedule（偽へジャンプ）
+			OpBuffer[obp++]=(char)0x7C;
+		}
+		else{
+			//符号無し
+
+			//jb FalseSchedule（偽へジャンプ）
+			OpBuffer[obp++]=(char)0x72;
+		}
+		FalseSchedule=obp;
+		obp++;
+
+		//cmp eax,ebx
+		OpBuffer[obp++]=(char)0x3B;
+		OpBuffer[obp++]=(char)0xC3;
+
+		//ja TrueSchedule2（真へジャンプ）
+		OpBuffer[obp++]=(char)0x77;
+		TrueSchedule2=obp;
+		obp++;
+
+		//FalseScheduleのジャンプ先の設定
+		OpBuffer[FalseSchedule]=obp-(FalseSchedule+1);
+
+		//xor eax,eax（eaxを0にする）
+		op_zero_reg(REG_EAX);
+
+		//jmp 5（演算終了位置へジャンプ）
+		OpBuffer[obp++]=(char)0xEB;
+		OpBuffer[obp++]=(char)0x05;
+
+		//TrueScheduleのジャンプ先の設定
+		OpBuffer[TrueSchedule1]=obp-(TrueSchedule1+1);
+		OpBuffer[TrueSchedule2]=obp-(TrueSchedule2+1);
+
+		//mov eax,1
+		OpBuffer[obp++]=(char)0xB8;
+		*((long *)(OpBuffer+obp))=1;
+		obp+=sizeof(long);
+
+		//push eax
+		op_push(REG_EAX);
+	}
+	else{
+		////////////////////
+		// 32ビット整数演算
+		////////////////////
+
+		//pop ebx
+		op_pop(REG_EBX);
+
+		//pop eax
+		op_pop(REG_EAX);
+
+		// どちらかのサイズが足りない場合は自動拡張する
+		AutoExtendToBigType( type_stack, sp, REG_EAX, REG_EBX );
+
+		//sub esp,4
+		op_sub_esp(4);
+
+		//mov ecx,1
+		OpBuffer[obp++]=(char)0xB9;
+		*((long *)(OpBuffer+obp))=1;
+		obp+=sizeof(long);
+
+		//cmp eax,ebx
+		OpBuffer[obp++]=(char)0x3B;
+		OpBuffer[obp++]=(char)0xC3;
+
+		if(IsSignedType(AnswerType)){
+			//jg 5（次のmovを飛び越す）
+			OpBuffer[obp++]=(char)0x7F;
+			OpBuffer[obp++]=(char)0x05;
+		}
+		else{
+			//ja 5（次のmovを飛び越す）
+			OpBuffer[obp++]=(char)0x77;
+			OpBuffer[obp++]=(char)0x05;
+		}
+
+		//mov ecx,0
+		OpBuffer[obp++]=(char)0xB9;
+		*((long *)(OpBuffer+obp))=0;
+		obp+=sizeof(long);
+
+		//mov dword ptr[esp],ecx
+		OpBuffer[obp++]=(char)0x89;
+		OpBuffer[obp++]=(char)0x0C;
+		OpBuffer[obp++]=(char)0x24;
+	}
+
+	sp--;
+	type_stack[sp-1]=DEF_BOOLEAN;
+
+	*pStackPointer=sp;
+	return 1;
+}
+
+BOOL Calc_Relation_NotEqual(int *type,int *pStackPointer){
+	//value[sp-2]<>value[sp-1]
+
+	int sp;
+	sp=*pStackPointer;
+
+	if(type[sp-2]==DEF_DOUBLE||type[sp-2]==DEF_SINGLE||
+		type[sp-1]==DEF_DOUBLE||type[sp-1]==DEF_SINGLE){
+		//////////////
+		// 実数演算
+		//////////////
+
+		if(type[sp-1]==DEF_DOUBLE){
+			//fld qword ptr[esp]
+			op_fld_ptr_esp(DEF_DOUBLE);
+
+			//add esp,8
+			op_add_esp(8);
+		}
+		else if(type[sp-1]==DEF_SINGLE){
+			//fld dword ptr[esp]
+			op_fld_ptr_esp(DEF_SINGLE);
+
+			//add esp,4
+			op_add_esp(4);
+		}
+		else if(type[sp-1]==DEF_INT64||type[sp-1]==DEF_QWORD){
+			//64ビット整数値
+
+			//fild qword ptr[esp]
+			op_fld_ptr_esp(DEF_INT64);
+
+			//add esp,8
+			op_add_esp(8);
+		}
+		else{	//Long、DWord
+			//fild dword ptr[esp]
+			op_fld_ptr_esp(DEF_LONG);
+
+			//add esp,4
+			op_add_esp(4);
+		}
+
+		if(type[sp-2]==DEF_DOUBLE){
+			//fld qword ptr[esp]
+			op_fld_ptr_esp(DEF_DOUBLE);
+
+			//add esp,4
+			op_add_esp(4);
+		}
+		else if(type[sp-2]==DEF_SINGLE){
+			//fld dword ptr[esp]
+			op_fld_ptr_esp(DEF_SINGLE);
+		}
+		else if(type[sp-2]==DEF_INT64||type[sp-2]==DEF_QWORD){
+			//64ビット整数値
+
+			//fild qword ptr[esp]
+			op_fld_ptr_esp(DEF_INT64);
+
+			//add esp,4
+			op_add_esp(4);
+		}
+		else{	//Long、DWord
+			//fild dword ptr[esp]
+			op_fld_ptr_esp(DEF_LONG);
+		}
+
+		//fcompp
+		OpBuffer[obp++]=(char)0xDE;
+		OpBuffer[obp++]=(char)0xD9;
+
+		//fnstsw ax
+		OpBuffer[obp++]=(char)0xDF;
+		OpBuffer[obp++]=(char)0xE0;
+
+		//mov ecx,1
+		OpBuffer[obp++]=(char)0xB9;
+		*((long *)(OpBuffer+obp))=1;
+		obp+=sizeof(long);
+
+		//test ah,40
+		OpBuffer[obp++]=(char)0xF6;
+		OpBuffer[obp++]=(char)0xC4;
+		OpBuffer[obp++]=(char)0x40;
+
+		//je 5
+		OpBuffer[obp++]=(char)0x74;
+		OpBuffer[obp++]=(char)0x05;
+
+		//mov ecx,0
+		OpBuffer[obp++]=(char)0xB9;
+		*((long *)(OpBuffer+obp))=0;
+		obp+=sizeof(long);
+
+		//mov dword ptr[esp],ecx
+		OpBuffer[obp++]=(char)0x89;
+		OpBuffer[obp++]=(char)0x0C;
+		OpBuffer[obp++]=(char)0x24;
+	}
+	else if(type[sp-2]==DEF_INT64||type[sp-2]==DEF_QWORD||
+		type[sp-1]==DEF_INT64||type[sp-1]==DEF_QWORD){
+		////////////////////
+		// 64ビット整数演算
+		////////////////////
+		int TrueSchedule1,
+			TrueSchedule2;
+
+		// 第1項 <> 第2項
+
+		//第1項 edx:eax
+		//第2項 ecx:ebx
+		GetStackData_ToRegister(type,sp);
+
+		//cmp eax,ebx
+		OpBuffer[obp++]=(char)0x3B;
+		OpBuffer[obp++]=(char)0xC3;
+
+		//jnz TrueSchedule1（真へジャンプ）
+		OpBuffer[obp++]=(char)0x75;
+		TrueSchedule1=obp;
+		obp++;
+
+		//cmp edx,ecx
+		OpBuffer[obp++]=(char)0x3B;
+		OpBuffer[obp++]=(char)0xD1;
+
+		//jnz TrueSchedule2（真へジャンプ）
+		OpBuffer[obp++]=(char)0x75;
+		TrueSchedule2=obp;
+		obp++;
+
+		//xor eax,eax（eaxを0にする）
+		op_zero_reg(REG_EAX);
+
+		//jmp 5（演算終了位置へジャンプ）
+		OpBuffer[obp++]=(char)0xEB;
+		OpBuffer[obp++]=(char)0x05;
+
+		//TrueScheduleのジャンプ先の設定
+		OpBuffer[TrueSchedule1]=obp-(TrueSchedule1+1);
+		OpBuffer[TrueSchedule2]=obp-(TrueSchedule2+1);
+
+		//mov eax,1
+		OpBuffer[obp++]=(char)0xB8;
+		*((long *)(OpBuffer+obp))=1;
+		obp+=sizeof(long);
+
+		//push eax
+		op_push(REG_EAX);
+	}
+	else{
+		////////////////////
+		// 32ビット整数演算
+		////////////////////
+
+		//pop eax
+		op_pop(REG_EAX);
+
+		//pop ebx
+		op_pop(REG_EBX);
+
+		// どちらかのサイズが足りない場合は自動拡張する
+		AutoExtendToBigType( type, sp, REG_EAX, REG_EBX );
+
+		//sub esp,4
+		op_sub_esp(4);
+
+		//xor eax,ebx
+		OpBuffer[obp++]=(char)0x33;
+		OpBuffer[obp++]=(char)0xC3;
+
+		//jz 5（次のmovを飛び越す）
+		OpBuffer[obp++]=(char)0x74;
+		OpBuffer[obp++]=(char)0x05;
+
+		//mov eax,1
+		OpBuffer[obp++]=(char)0xB8;
+		*((long *)(OpBuffer+obp))=1;
+		obp+=sizeof(long);
+
+		//mov dword ptr[esp],eax
+		OpBuffer[obp++]=(char)0x89;
+		OpBuffer[obp++]=(char)0x04;
+		OpBuffer[obp++]=(char)0x24;
+	}
+
+	sp--;
+	type[sp-1]=DEF_BOOLEAN;
+
+	*pStackPointer=sp;
+	return 1;
+}
+
+BOOL Calc_Relation_Equal(int *type,int *pStackPointer){
+	//value[sp-2]=value[sp-1]
+
+	int sp;
+	sp=*pStackPointer;
+
+	if(type[sp-2]==DEF_DOUBLE||type[sp-2]==DEF_SINGLE||
+		type[sp-1]==DEF_DOUBLE||type[sp-1]==DEF_SINGLE){
+		//////////////
+		// 実数演算
+		//////////////
+
+		if(type[sp-1]==DEF_DOUBLE){
+			//fld qword ptr[esp]
+			op_fld_ptr_esp(DEF_DOUBLE);
+
+			//add esp,8
+			op_add_esp(8);
+		}
+		else if(type[sp-1]==DEF_SINGLE){
+			//fld dword ptr[esp]
+			op_fld_ptr_esp(DEF_SINGLE);
+
+			//add esp,4
+			op_add_esp(4);
+		}
+		else if(type[sp-1]==DEF_INT64||type[sp-1]==DEF_QWORD){
+			//64ビット整数値
+
+			//fild qword ptr[esp]
+			op_fld_ptr_esp(DEF_INT64);
+
+			//add esp,8
+			op_add_esp(8);
+		}
+		else{	//Long、DWord
+			//fild dword ptr[esp]
+			op_fld_ptr_esp(DEF_LONG);
+
+			//add esp,4
+			op_add_esp(4);
+		}
+
+		if(type[sp-2]==DEF_DOUBLE){
+			//fld qword ptr[esp]
+			op_fld_ptr_esp(DEF_DOUBLE);
+
+			//add esp,4
+			op_add_esp(4);
+		}
+		else if(type[sp-2]==DEF_SINGLE){
+			//fld dword ptr[esp]
+			op_fld_ptr_esp(DEF_SINGLE);
+		}
+		else if(type[sp-2]==DEF_INT64||type[sp-2]==DEF_QWORD){
+			//64ビット整数値
+
+			//fild qword ptr[esp]
+			op_fld_ptr_esp(DEF_INT64);
+
+			//add esp,4
+			op_add_esp(4);
+		}
+		else{	//Long、DWord
+			//fild dword ptr[esp]
+			op_fld_ptr_esp(DEF_LONG);
+		}
+
+		//fcompp
+		OpBuffer[obp++]=(char)0xDE;
+		OpBuffer[obp++]=(char)0xD9;
+
+		//fnstsw ax
+		OpBuffer[obp++]=(char)0xDF;
+		OpBuffer[obp++]=(char)0xE0;
+
+		//mov ecx,1
+		OpBuffer[obp++]=(char)0xB9;
+		*((long *)(OpBuffer+obp))=1;
+		obp+=sizeof(long);
+
+		//test ah,40
+		OpBuffer[obp++]=(char)0xF6;
+		OpBuffer[obp++]=(char)0xC4;
+		OpBuffer[obp++]=(char)0x40;
+
+		//jne 5
+		OpBuffer[obp++]=(char)0x75;
+		OpBuffer[obp++]=(char)0x05;
+
+		//mov ecx,0
+		OpBuffer[obp++]=(char)0xB9;
+		*((long *)(OpBuffer+obp))=0;
+		obp+=sizeof(long);
+
+		//mov dword ptr[esp],ecx
+		OpBuffer[obp++]=(char)0x89;
+		OpBuffer[obp++]=(char)0x0C;
+		OpBuffer[obp++]=(char)0x24;
+	}
+	else if(type[sp-2]==DEF_INT64||type[sp-2]==DEF_QWORD||
+		type[sp-1]==DEF_INT64||type[sp-1]==DEF_QWORD){
+		////////////////////
+		// 64ビット整数演算
+		////////////////////
+		int FalseSchedule1,
+			FalseSchedule2;
+
+		// 第1項 == 第2項
+
+		//第1項 edx:eax
+		//第2項 ecx:ebx
+		GetStackData_ToRegister(type,sp);
+
+		//cmp eax,ebx
+		OpBuffer[obp++]=(char)0x3B;
+		OpBuffer[obp++]=(char)0xC3;
+
+		//jnz FalseSchedule1（偽へジャンプ）
+		OpBuffer[obp++]=(char)0x75;
+		FalseSchedule1=obp;
+		obp++;
+
+		//cmp edx,ecx
+		OpBuffer[obp++]=(char)0x3B;
+		OpBuffer[obp++]=(char)0xD1;
+
+		//jnz FalseSchedule2（偽へジャンプ）
+		OpBuffer[obp++]=(char)0x75;
+		FalseSchedule2=obp;
+		obp++;
+
+		//mov eax,1
+		OpBuffer[obp++]=(char)0xB8;
+		*((long *)(OpBuffer+obp))=1;
+		obp+=sizeof(long);
+
+		//jmp 2（演算終了位置へジャンプ）
+		OpBuffer[obp++]=(char)0xEB;
+		OpBuffer[obp++]=(char)0x02;
+
+		//FalseScheduleのジャンプ先の設定
+		OpBuffer[FalseSchedule1]=obp-(FalseSchedule1+1);
+		OpBuffer[FalseSchedule2]=obp-(FalseSchedule2+1);
+
+		//xor eax,eax（eaxを0にする）
+		op_zero_reg(REG_EAX);
+
+		//push eax
+		op_push(REG_EAX);
+	}
+	else{
+		////////////////////
+		// 32ビット整数演算
+		////////////////////
+
+		//pop eax
+		op_pop(REG_EAX);
+
+		//pop ebx
+		op_pop(REG_EBX);
+
+		// どちらかのサイズが足りない場合は自動拡張する
+		AutoExtendToBigType( type, sp, REG_EAX, REG_EBX );
+
+		//sub esp,4
+		op_sub_esp(4);
+
+		//xor eax,ebx
+		OpBuffer[obp++]=(char)0x33;
+		OpBuffer[obp++]=(char)0xC3;
+
+		//jz 4（次のxorとjmpを飛び越す）
+		OpBuffer[obp++]=(char)0x74;
+		OpBuffer[obp++]=(char)0x04;
+
+		//xor eax,eax
+		OpBuffer[obp++]=(char)0x33;
+		OpBuffer[obp++]=(char)0xC0;
+
+		//jmp 5
+		OpBuffer[obp++]=(char)0xEB;
+		OpBuffer[obp++]=(char)0x05;
+
+		//mov eax,1
+		OpBuffer[obp++]=(char)0xB8;
+		*((long *)(OpBuffer+obp))=1;
+		obp+=sizeof(long);
+
+		//mov dword ptr[esp],eax
+		OpBuffer[obp++]=(char)0x89;
+		OpBuffer[obp++]=(char)0x04;
+		OpBuffer[obp++]=(char)0x24;
+	}
+
+	sp--;
+	type[sp-1]=DEF_BOOLEAN;
+
+	*pStackPointer=sp;
+	return 1;
+}
Index: /trunk/abdev/BasicCompiler32/NumOpe_TypeOperation.cpp
===================================================================
--- /trunk/abdev/BasicCompiler32/NumOpe_TypeOperation.cpp	(revision 148)
+++ /trunk/abdev/BasicCompiler32/NumOpe_TypeOperation.cpp	(revision 148)
@@ -0,0 +1,197 @@
+#include "../BasicCompiler_Common/common.h"
+#include "Opcode.h"
+
+void ExtendStackTo32(int type);
+void ExtendStackTo64(int type){
+	if(Is64Type(type)) return;
+
+	//32ビットに拡張
+	ExtendStackTo32(type);
+
+	//64ビットに拡張
+	if(IsSignedType(type)){
+		//符号あり
+
+		//pop eax
+		op_pop(REG_EAX);
+
+		//cdq
+		op_cdq();
+
+		//push edx
+		op_push(REG_EDX);
+
+		//push eax
+		op_push(REG_EAX);
+	}
+	else{
+		//符号なし
+
+		//pop eax
+		op_pop(REG_EAX);
+
+		//push 0
+		op_push_V(0);
+
+		//push eax
+		op_push(REG_EAX);
+	}
+}
+void ExtendStackTo32(int type){
+	if(GetTypeSize(type,-1)==sizeof(long)) return;
+
+	if(Is64Type(type)){
+		//pop eax
+		op_pop(REG_EAX);
+
+		//pop edx
+		op_pop(REG_EDX);
+
+		//push eax
+		op_push(REG_EAX);
+	}
+	else if(type==DEF_INTEGER || (isUnicode&&type==DEF_CHAR)){
+		//pop eax
+		op_pop(REG_EAX);
+
+		//movsx eax,ax
+		OpBuffer[obp++]=(char)0x0F;
+		OpBuffer[obp++]=(char)0xBF;
+		OpBuffer[obp++]=(char)0xC0;
+
+		//push eax
+		op_push(REG_EAX);
+	}
+	else if(type==DEF_WORD){
+		//pop eax
+		op_pop(REG_EAX);
+
+		//and eax,0000FFFFh
+		OpBuffer[obp++]=(char)0x25;
+		*((long *)(OpBuffer+obp))=0x0000FFFF;
+		obp+=sizeof(long);
+
+		//push eax
+		op_push(REG_EAX);
+	}
+	else if(type==DEF_SBYTE || (isUnicode==false&&type==DEF_CHAR)){
+		//pop eax
+		op_pop(REG_EAX);
+
+		//movsx eax,al
+		OpBuffer[obp++]=(char)0x0F;
+		OpBuffer[obp++]=(char)0xBE;
+		OpBuffer[obp++]=(char)0xC0;
+
+		//push eax
+		op_push(REG_EAX);
+	}
+	else if(type==DEF_BYTE||type==DEF_BOOLEAN){
+		//pop eax
+		op_pop(REG_EAX);
+
+		//and eax,000000FFh
+		OpBuffer[obp++]=(char)0x25;
+		*((long *)(OpBuffer+obp))=0x000000FF;
+		obp+=sizeof(long);
+
+		//push eax
+		op_push(REG_EAX);
+	}
+}
+void ExtendStackTo16(int type){
+	if(type==DEF_SBYTE || (isUnicode==false&&type==DEF_CHAR)){
+		//pop eax
+		op_pop(REG_EAX);
+
+		//movsx eax,al
+		OpBuffer[obp++]=(char)0x0F;
+		OpBuffer[obp++]=(char)0xBE;
+		OpBuffer[obp++]=(char)0xC0;
+
+		//push eax
+		op_push(REG_EAX);
+	}
+	else if(type==DEF_BYTE){
+		//pop eax
+		op_pop(REG_EAX);
+
+		//and eax,000000FFh
+		OpBuffer[obp++]=(char)0x25;
+		*((long *)(OpBuffer+obp))=0x000000FF;
+		obp+=sizeof(long);
+
+		//push eax
+		op_push(REG_EAX);
+	}
+}
+void ExtendStackTo8(int type){
+	if(Is64Type(type)){
+		//pop eax
+		op_pop(REG_EAX);
+
+		//pop edx
+		op_pop(REG_EDX);
+
+		//push eax
+		op_push(REG_EAX);
+	}
+}
+
+
+void ChangeTypeToWhole(int OldType,int NewType){
+	if(OldType==DEF_DOUBLE){
+		if(Is64Type(NewType)){
+			//fld qword ptr[esp]
+			op_fld_ptr_esp(DEF_DOUBLE);
+
+			//fistp qword ptr[esp]
+			op_fistp_ptr_esp( sizeof(_int64) );
+		}
+		else{
+			//fld qword ptr[esp]
+			op_fld_ptr_esp(DEF_DOUBLE);
+
+			//add esp,4
+			op_add_esp(4);
+
+			//fistp dword ptr[esp]
+			op_fistp_ptr_esp( sizeof(long) );
+		}
+	}
+	else if(OldType==DEF_SINGLE){
+		if(Is64Type(NewType)){
+			//fld dword ptr[esp]
+			op_fld_ptr_esp(DEF_SINGLE);
+
+			//sub esp,4
+			op_sub_esp(4);
+
+			//fistp qword ptr[esp]
+			op_fistp_ptr_esp( sizeof(_int64) );
+		}
+		else{
+			//fld dword ptr[esp]
+			op_fld_ptr_esp(DEF_SINGLE);
+
+			//fistp dword ptr[esp]
+			op_fistp_ptr_esp( sizeof(long) );
+		}
+	}
+	else{
+		//整数から整数へ変換
+
+		if(Is64Type(NewType)){
+			ExtendStackTo64(OldType);
+		}
+		else if(GetTypeSize(NewType,-1)==sizeof(long)){
+			ExtendStackTo32(OldType);
+		}
+		else if(GetTypeSize(NewType,-1)==sizeof(short)){
+			ExtendStackTo16(OldType);
+		}
+		else if(GetTypeSize(NewType,-1)==sizeof(char)){
+			ExtendStackTo8(OldType);
+		}
+	}
+}
Index: /trunk/abdev/BasicCompiler32/Opcode.h
===================================================================
--- /trunk/abdev/BasicCompiler32/Opcode.h	(revision 148)
+++ /trunk/abdev/BasicCompiler32/Opcode.h	(revision 148)
@@ -0,0 +1,354 @@
+//Opcode.h
+
+//未定義の定数情報
+#define IMAGE_FILE_MACHINE_AMD64 0x8664
+
+
+//レジスタを示す定数
+#define REG_NON -1
+#define REG_EAX 0x00	//reg:000
+#define REG_ECX 0x01	//reg:001
+#define REG_EDX 0x02	//reg:010
+#define REG_EBX 0x03	//reg:011
+#define REG_ESP 0x04	//reg:100
+#define REG_EBP 0x05	//reg:101
+#define REG_ESI 0x06	//reg:110
+#define REG_EDI 0x07	//reg:111
+
+#define REG_RAX REG_EAX
+#define REG_RCX REG_ECX
+#define REG_RDX REG_EDX
+#define REG_RBX REG_EBX
+#define REG_RSP REG_ESP
+#define REG_RBP REG_EBP
+#define REG_RSI REG_ESI
+#define REG_RDI REG_EDI
+
+#define REGISTER_OPERAND(reg) (reg&0x07)
+
+//変数の種類
+#define NON_VAR				0
+#define VAR_GLOBAL			1	// Global Variable
+#define VAR_REFGLOBAL		2	// Global Refference Variable
+#define VAR_LOCAL			3	// Local Variable
+#define VAR_REFLOCAL		4	// Local Refference Variable
+#define VAR_DIRECTMEM		5	// Direct memory
+
+
+extern int cp;
+extern int obp;
+extern char *OpBuffer;
+
+#define breakpoint OpBuffer[obp++]=(char)0xCC;
+
+
+//ラベルアドレス
+struct LABEL{
+	char *pName;
+	int line;
+	DWORD address;
+};
+
+//Goto未知ラベル
+struct GOTOLABELSCHEDULE{
+	char *pName;
+	int line;
+	DWORD pos;
+	DWORD now_cp;
+};
+
+//プロシージャの種類
+#define PROC_DEFAULT	1	//ユーザー定義関数
+#define PROC_DLL		2	//DLL関数
+#define PROC_BUILTIN	3	//コンパイラ埋め込み型
+#define PROC_PTR		4	//関数ポインタ
+
+//プロシージャ
+struct PROCEDURE{
+	char name[255];
+	int address;
+	int types[MAX_PARMS];
+	_int8 ByVal[MAX_PARMS];
+	BOOL ReturnType;
+};
+
+//With情報
+struct WITHINFO{
+	char **ppName;
+	int *pWithCp;
+	int num;
+};
+
+
+//RSrcSection.cpp
+char *GetRSrcSectionBuffer(int *pLen);
+
+//Compile.cpp
+void ChangeOpcode(char *Command);
+void GetGlobalDataForDll(void);
+DWORD CompileBuffer(char Return_Sequence,WORD Return_Command);
+
+//Compile_Calc.cpp
+void ChangeTypeToDouble_ToFpuReg(int OldType);
+void ChangeTypeToDouble(int OldType);
+void ChangeTypeToSingle(int OldType);
+void ChangeTypeToInt64(int OldType);
+void ChangeTypeToLong(int OldType);
+void ChangeTypeToInteger(int OldType);
+void ChangeTypeToByte(int OldType);
+void SetVariableFromEax(int VarType,int CalcType,RELATIVE_VAR *pRelativeVar);
+void OpcodeCalc( const char *Command );
+
+//NumOpe.cpp
+void PushReturnValue(int type);
+bool TermOpe(
+			 const char *term,
+			 const Type &baseType,
+			 Type &resultType,
+			 bool &isLiteral,
+			 BOOL *pbUseHeap,
+			 bool isWantObject = false,
+			 bool *pIsClassName = NULL,
+			 bool isProcedureCallOnly = false );
+bool NumOpe( int reg,
+			const char *expression,
+			const Type &baseType,
+			Type &resultType,
+			BOOL *pbUseHeap = NULL );
+bool NumOpe( const char *Command,
+		   const Type &baseType,
+		   Type &resultType,
+		   BOOL *pbUseHeap = NULL );
+
+//NumOpe_Arithmetic.cpp
+void GetStackData_ToRegister(int *type,int sp);
+BOOL CalcTwoTerm_Arithmetic(int idCalc,int *type,LONG_PTR *index_stack,int *pStackPointer);
+BOOL Calc_Mod(int *type,int *pStackPointer);
+BOOL Calc_Divide(int *type,int *pStackPointer,int BaseType);
+BOOL Calc_IntDivide(int *type,LONG_PTR *index_stack,int *pStackPointer);
+BOOL Calc_MinusMark(int *type,int sp);
+BOOL Calc_Power(int *type,int *pStackPointer);
+BOOL Calc_Cast(int *type,LONG_PTR *index_stack,int *pStackPointer);
+BOOL Calc_SHL(int *type,int *pStackPointer);
+BOOL Calc_SHR(int *type,int *pStackPointer);
+
+//NumOpe_Logical.cpp
+BOOL Calc_Xor(int *type,LONG_PTR *index_stack,int *pStackPointer);
+BOOL Calc_Or(int *type,LONG_PTR *index_stack,int *pStackPointer);
+BOOL Calc_And(int *type,LONG_PTR *index_stack,int *pStackPointer);
+BOOL Calc_Not(int *type,int sp);
+
+//NumOpe_Relation.cpp
+BOOL Calc_Relation_PE(int *type_stack,LONG_PTR *index_stack,int *pStackPointer);
+BOOL Calc_Relation_QE(int *type_stack,LONG_PTR *index_stack,int *pStackPointer);
+BOOL Calc_Relation_P(int *type_stack,LONG_PTR *index_stack,int *pStackPointer);
+BOOL Calc_Relation_Q(int *type_stack,LONG_PTR *index_stack,int *pStackPointer);
+BOOL Calc_Relation_NotEqual(int *type,int *pStackPointer);
+BOOL Calc_Relation_Equal(int *type,int *pStackPointer);
+
+//NumOpe_TypeOperation.cpp
+void ExtendStackTo64(int type);
+void ChangeTypeToWhole(int OldType,int NewType);
+
+//Compile_Set_Var.cpp
+BOOL IsUse_ecx(RELATIVE_VAR *pRelativeVar);
+void SetStructVariable( const Type &varType, const Type &calcType, BOOL bUseHeap);
+void SetRealVariable(int VarType, int CalcType, RELATIVE_VAR *pRelativeVar);
+void SetWholeVariable( int varSize,int calcType, RELATIVE_VAR *pRelative );
+
+void SetDoubleVariable(int type,DWORD VarKind,DWORD offset,BOOL bOffsetOffset);
+void SetSingleVariable(int type,DWORD VarKind,DWORD offset,BOOL bOffsetOffset);
+void SetInt64Variable(int type,RELATIVE_VAR *pRelative);
+void SetDWordVariable(int type,DWORD VarKind,DWORD offset,BOOL bOffsetOffset);
+void SetLongVariable(int type,DWORD VarKind,DWORD offset,BOOL bOffsetOffset);
+void Set16Variable(int type,DWORD VarKind,DWORD offset,BOOL bOffsetOffset);
+void Set8Variable(int type,DWORD VarKind,DWORD offset,BOOL bOffsetOffset);
+void SetBooleanVariable(int type,RELATIVE_VAR *pRelative);
+void ExtendTypeTo64(int type);
+void ExtendTypeTo32(int type,int reg);
+void ExtendTypeTo16(int type,int reg);
+
+//increment.cpp
+void IncDec(int idCalc, const char *lpszLeft, const char *lpszRight);
+
+//calc2.cpp
+#define EXP_TYPE_NUMBER	1
+#define EXP_TYPE_EAX	2
+#define EXP_TYPE_FPU	3
+#define EXP_TYPE_VAR	4
+int NumOpEx(char *Command,double *pDbl,DWORD *pdwType,RELATIVE_VAR *pRelativeVar);
+
+//SetVar.cpp
+BOOL SetVariable(DWORD dwVarType,RELATIVE_VAR *pVarRelativeVar,
+				 DWORD dwExpType,DWORD dwType,void *data);
+
+//Compile_Calc_PushVar.cpp
+void SetReg_RealVariable(int type,RELATIVE_VAR *pRelativeVar);
+void SetReg_WholeVariable(int type,RELATIVE_VAR *pRelativeVar,int reg, bool is64Head = false);
+void PushDoubleVariable(RELATIVE_VAR *pRelativeVar);
+void PushLongVariable(RELATIVE_VAR *pRelativeVar);
+void PushIntegerVariable(RELATIVE_VAR *pRelativeVar);
+void PushWordVariable(RELATIVE_VAR *pRelativeVar);
+void PushCharVariable(RELATIVE_VAR *pRelativeVar);
+void PushByteVariable(RELATIVE_VAR *pRelativeVar);
+
+//Compile_Object.cpp
+void Operator_New( const CClass &classObj, const char *objectSizeStr, const char *parameter, const Type &baseType );
+void OpcodeDelete(const char *Parameter, bool isSweeping);
+
+//Compile_Var.cpp
+void SetRelativeOffset( RELATIVE_VAR &relativeVar );
+bool _member_offset(bool isErrorEnabled, bool isWriteAccess, const CClass &objClass, const char *member, RELATIVE_VAR *pRelativeVar, Type &resultType, BOOL bPrivateAccess);
+void SetThisPtrToReg(int reg);
+bool GetVarOffset(bool isErrorEnabled,bool isWriteAccess,const char *NameBuffer,RELATIVE_VAR *pRelativeVar,Type &resultType,int *pss = 0);
+bool SetInitGlobalData(int offset,const Type &type,const int *SubScripts,const char *InitBuf);
+#define DIMFLAG_INITDEBUGVAR			1
+#define DIMFLAG_NONCALL_CONSTRACTOR		2
+#define DIMFLAG_STATIC					4
+#define DIMFLAG_CONST					8
+void dim( char *VarName,int *SubScripts,Type &type, const char *InitBuf,const char *ConstractParameter,DWORD dwFlags);
+void SetVarPtrToEax(RELATIVE_VAR *pRelativeVar);
+void SetVarPtrToReg(int reg,RELATIVE_VAR *pRelativeVar);
+bool Compile_AddGlobalRootsForGc();
+
+//ParamImpl.cpp
+class ParamImpl{
+	char *Parms[255];
+	vector<Type> types;
+	int ParmsNum;
+
+	Type returnType;
+
+	//一時オブジェクト管理用
+	bool useTempObject;
+	bool useTempParameters[255];
+	int nCountOfTempObjects;
+
+public:
+	ParamImpl(const char *buffer);
+	ParamImpl(const Parameters &params);
+	~ParamImpl();
+	void SetReturnType( const Type &returnType );
+
+private:
+	bool EvaluateOverloadScore( int level, const Parameters &targetParms, const Type &targetResultType );
+public:
+	UserProc *_OverloadSolution( const char *name, std::vector<UserProc *> &subs, bool isEnabledReturnType = false );
+	UserProc *OverloadSolution( const char *name, std::vector<UserProc *> &subs, bool isEnabledReturnType = false );
+
+	void ApplyDefaultParameters( const Parameters &params );
+	bool ErrorCheck( const string &procName, const Parameters &params, int SecondParmNum = -1 );
+	void MacroParameterSupport( const Parameters &params );
+	void SetStructParameter( const Type &baseType, const char *expression );
+	int SetParameter( const string &procName, const Parameters &params, int SecondParmNum = -1 );
+
+	//一時オブジェクトパラメータの生成と破棄
+	int NewTempParameters( const string &procName, const Parameters &params, int SecondParmNum = -1 );
+	void DeleteTempParameters();
+};
+
+//Compile_CallProc.cpp
+void AddLocalVarAddrSchedule();
+#define PROCFLAG_NEW	1
+bool Opcode_CallProcPtr( const char *variable, const char *lpszParms,ProcPointer *pProcPointer);
+bool Opcode_CallProc(const char *Parameter,UserProc *pUserProc,DWORD dwFlags,const char *ObjectName,int RefType);
+bool Opcode_CallDllProc( const char *lpszParms, DllProc *pDllProc );
+
+//Compile_ProcOp.cpp
+void CompileLocal();
+
+//Compile_Func.cpp
+int GetFunctionFromName(char *FuncName);
+bool Opcode_CallFunc( const char *Parameter, const int FuncNum, Type &resultType, bool isCallOn = true );
+
+//OperatorProc.cpp
+void FreeTempObject(int reg,const CClass *pobj_c);
+int CallOperatorProc(int idCalc, const Type &baseType, int *type_stack,LONG_PTR *index_stack,BOOL *bUseHeap,int &sp);
+void CallCastOperatorProc(Type &calcType,BOOL bCalcUseHeap,const Type &toType);
+void CallIndexerGetterProc(const CClass *pobj_Class,char *ObjectName,char *Parameter,Type &resultType);
+
+//Compile_Statement.cpp
+void OpcodeOthers( const char *Command );
+void OpcodeIf(char *Parameter);
+void OpcodeGoto(char *Parameter);
+void OpcodeWhile(char *Parameter);
+void OpcodeFor(char *Parameter);
+void OpcodeDo(char *Parameter);
+void OpcodeContinue(void);
+void OpcodeExitSub(void);
+void OpcodeSelect(const char *lpszParms);
+void OpcodeCase(char *Parameter);
+void OpcodeGosub(char *Parameter);
+void OpcodeReturn(char *Parameter);
+void OpcodeSetPtrData(char *Parameter,int type);
+
+
+
+
+////////////////////////////////
+// IA-32機械語生成に利用する関数郡
+////////////////////////////////
+
+//Mod（モード）
+#define MOD_BASE		(char)0x00
+#define MOD_DISP32		(char)0xFF
+#define MOD_BASE_DISP8	(char)0x40
+#define MOD_BASE_DISP32	(char)0x80
+#define MOD_REG				(char)0xC0
+
+#define USE_OFFSET 1
+#define NON_OFFSET 0
+
+//op32_main.cpp
+BOOL IsSafeReg(int reg);
+void op_mov_RV			(int reg,int offset);
+void op_mov_RV			(int op_size,int reg,int offset);
+void op_mov_RR			(int reg1,int reg2);
+void op_mov_RM			(int op_size,int reg,int base_reg,int offset,char mod);
+void op_mov_RM_ex		(int op_size,int reg,int base_reg1,int base_reg2,int offset,BOOL bUseOffset);
+void op_mov_MR			(int op_size,int reg,int base_reg,int offset,char mod);
+void op_mov_MR_ex		(int op_size,int reg,int base_reg1,int base_reg2,int offset,BOOL bUseOffset);
+void op_movsx_R32R16	(int reg32,int reg16);
+void op_movsx_R32R8		(int reg32,int reg8);
+void op_movsx_R16R8		(int reg16,int reg8);
+void op_inc				(int reg);
+void op_dec				(int reg);
+void op_add_RV8			(int reg,char cValue);
+void op_add_RM			(int op_size,int reg,int base_reg,int offset,char mod);
+void op_adc_RV8			(int reg,char cValue);
+void op_sub_RV8			(int reg,char cValue);
+void op_sbb_RV8			(int reg,char cValue);
+void op_sbb_RR			( int reg1, int reg2 );
+void op_imul_RR			(int reg1,int reg2);
+void op_imul_RV			(int reg,int i32data);
+void op_and_RV			(int reg,int value);
+void op_or_RR			( int op_size, int reg1, int reg2 );
+void op_neg				( int reg );
+void op_cdq				();
+
+void op_rep_movs		(int op_size);
+
+void op_push(int reg);
+void op_push_V(long data);
+void op_pop(int reg = REG_NON);
+void op_add_esp(int num);
+void op_sub_esp(int num);
+void op_cmp_RR( int reg1, int reg2 );
+void op_cmp_value(int op_size,int reg,char byte_data);
+void op_setne( int reg );
+void op_test(int reg1,int reg2);
+void op_fld_ptr_esp(int type);
+void op_fld_basereg			(int type,int base_reg);
+void op_fld_base_offset		(int type,int base_reg,int offset);
+void op_fld_base_offset_ex	(int type,int base_reg1,int base_reg2,int offset,BOOL bUseOffset);
+void op_fstp_basereg		(int type,int base_reg);
+void op_fstp_base_offset	(int type,int base_reg,int offset);
+void op_fstp_base_offset_ex	(int type,int base_reg1,int base_reg2,int offset,BOOL bUseOffset);
+void op_fstp_push			( Type &type );
+void op_fistp_ptr_esp		( int typeSize );
+void op_zero_reg(int reg);
+void fpu_cast();
+void fpu_cast_end();
+
+void op_call(UserProc *pUserProc);
+void op_ret();
Index: /trunk/abdev/BasicCompiler32/OperatorProc.cpp
===================================================================
--- /trunk/abdev/BasicCompiler32/OperatorProc.cpp	(revision 148)
+++ /trunk/abdev/BasicCompiler32/OperatorProc.cpp	(revision 148)
@@ -0,0 +1,259 @@
+#include "../BasicCompiler_Common/common.h"
+#include "Opcode.h"
+
+void FreeTempObject(int reg,const CClass *pobj_c){
+	if(!IsSafeReg(reg)) SetError(300,NULL,cp);
+
+	const CMethod *method = pobj_c->GetDestructorMethod();
+	if( method ){
+		//push reg
+		op_push(reg);
+
+		//call DestructorProcAddr
+		op_call( method->pUserProc );
+	}
+
+	//push reg
+	op_push(reg);
+
+	//call free
+	extern UserProc *pSub_free;
+	op_call(pSub_free);
+}
+
+int CallOperatorProc(int idCalc, const Type &baseType, int *type_stack,LONG_PTR *index_stack,BOOL *bUseHeap,int &sp){
+	//オーバーロードされたオペレータ関数を呼び出す
+	CClass *pobj_c;
+	pobj_c=(CClass *)index_stack[sp-2];
+
+	std::vector<UserProc *> subs;
+	pobj_c->GetMethods().Enum( idCalc, subs );
+	if( subs.size() == 0 ){
+		return 0;
+	}
+
+
+	//項の数
+	BOOL bTwoTerm=1;
+	if(idCalc==CALC_AS) bTwoTerm=0;
+
+
+	/////////////////////////////////////////////
+	// オーバーロード解決用のパラメータを設定
+	/////////////////////////////////////////////
+
+	Parameters params;
+
+	if(bTwoTerm){
+		params.push_back( new Parameter( "", Type( type_stack[sp-1], index_stack[sp-1] ) ) );
+	}
+
+	//オーバーロードを解決
+	char temporary[255];
+	if(idCalc==CALC_EQUAL) lstrcpy(temporary,"==");
+	else GetCalcName(idCalc,temporary);
+	UserProc *pUserProc = OverloadSolution( temporary, subs, params, baseType );
+
+	if(!pUserProc){
+		if(bTwoTerm){
+			delete params[0];
+		}
+		return -1;
+	}
+	else{
+		//オーバーロードされていないが、パラメータ個数が一致しないとき
+		if(params.size()!=pUserProc->Params().size()){
+			if(bTwoTerm){
+				delete params[0];
+			}
+			return -1;
+		}
+	}
+
+	for(int i=0;i<(int)params.size();i++){
+		CheckDifferentType(
+			pUserProc->Params()[i]->GetBasicType(),
+			pUserProc->Params()[i]->GetIndex(),
+			params[i]->GetBasicType(),
+			params[i]->GetIndex(),
+			"",
+			i);
+	}
+
+	if(bTwoTerm){
+		delete params[0];
+	}
+
+	int right_side_size = GetTypeSize(type_stack[sp-1],index_stack[sp-1]);
+
+	if(bTwoTerm){
+		if( pUserProc->RealParams()[1]->IsStruct() &&pUserProc->RealParams()[1]->IsRef() == false ){
+			//一時オブジェクトはメソッド内で破棄される
+			bUseHeap[sp-1]=0;
+		}
+	}
+
+
+	if( pUserProc->ReturnType().IsStruct() ){
+		//////////////////////////////////////////////////////
+		// 戻り値に構造体インスタンスを持つ場合
+		// ※ByRef _System_ReturnValue パラメータ用領域を取得
+		//////////////////////////////////////////////////////
+
+		int object_size = pUserProc->ReturnType().GetClass().GetSize();
+
+		//push object_size
+		op_push_V(object_size);
+
+		//call calloc
+		extern UserProc *pSub_calloc;
+		op_call(pSub_calloc);
+
+		//mov ebx,eax
+		op_mov_RR(REG_EBX,REG_EAX);
+	}
+
+
+	//2つの項を取り出す
+	if(bTwoTerm){
+		if(right_side_size==sizeof(_int64)){
+			//pop eax
+			op_pop(REG_EAX);
+
+			//pop edx
+			op_pop(REG_EDX);
+		}
+		else{
+			//pop eax
+			op_pop(REG_EAX);
+		}
+	}
+
+	//pop ecx
+	op_pop(REG_ECX);
+
+
+	//ヒープ解放用に退避
+	if(bUseHeap[sp-1]){
+		//mov esi,eax
+		op_mov_RR(REG_ESI,REG_EAX);
+	}
+	if(bUseHeap[sp-2]){
+		//mov edi,ecx
+		op_mov_RR(REG_EDI,REG_ECX);
+	}
+
+
+
+	if(bTwoTerm){
+		if(right_side_size==sizeof(_int64)){
+			//push edx
+			op_push(REG_EDX);
+
+			//push eax
+			op_push(REG_EAX);
+		}
+		else{
+			//push eax
+			op_push(REG_EAX);
+		}
+
+		if( pUserProc->RealParams()[1]->IsRef() ){
+			//一時参照を作成
+
+			//mov eax,esp
+			op_mov_RR( REG_EAX, REG_ESP );
+
+			//push eax
+			op_push( REG_EAX );
+		}
+	}
+
+	if( pUserProc->ReturnType().IsStruct() ){
+		//push ebx
+		op_push(REG_EBX);
+	}
+
+	//push ecx
+	op_push(REG_ECX);
+
+	//call operator_proc
+	op_call(pUserProc);
+
+	if(bTwoTerm){
+		if( pUserProc->RealParams()[1]->IsRef() ){
+			//一時参照を破棄
+			op_pop( REG_NON );
+		}
+	}
+
+	if( !pUserProc->ReturnType().IsNull() ){
+		//スタックへプッシュ
+		PushReturnValue(pUserProc->ReturnType().GetBasicType());
+	}
+
+	if(bUseHeap[sp-1]){
+		FreeTempObject(REG_ESI,(CClass *)index_stack[sp-1]);
+	}
+	if(bUseHeap[sp-2]){
+		FreeTempObject(REG_EDI,(CClass *)index_stack[sp-2]);
+	}
+
+	sp--;
+	type_stack[sp-1]=pUserProc->ReturnType().GetBasicType();
+	index_stack[sp-1]=pUserProc->ReturnType().GetIndex();
+
+	if( pUserProc->ReturnType().IsStruct() ){
+		//構造体が戻ったときはヒープ領域にインスタンスが格納されている
+		//※後にfreeする必要あり
+		bUseHeap[sp-1]=1;
+	}
+	else bUseHeap[sp-1]=0;
+
+	return 1;
+}
+
+void CallCastOperatorProc(Type &calcType,BOOL bCalcUseHeap,const Type &toType){
+	int type_stack[10];
+	LONG_PTR index_stack[10];
+	BOOL array_bUseHeap[10];
+	int sp=2;
+
+	if(bCalcUseHeap){
+		//未解放のインスタンスが存在する旨を示す警告
+		SetError(-105,NULL,cp);
+	}
+
+	//左辺
+	type_stack[0]=calcType.GetBasicType();
+	index_stack[0]=calcType.GetIndex();
+	array_bUseHeap[0]=0;
+	type_stack[1]=toType.GetBasicType();
+	index_stack[1]=toType.GetIndex();
+	array_bUseHeap[1]=0;
+
+	int iRet = CallOperatorProc(CALC_AS,toType,type_stack,index_stack,array_bUseHeap,sp);
+
+	if(iRet==1){
+		//成功したとき
+		calcType.SetType( type_stack[0], index_stack[0] );
+		return;
+	}
+	else if(iRet==-1){
+		//エラーが発行されたとき
+		return;
+	}
+
+	//エラーを発行
+	SetError(-1,"キャスト演算子がオーバーロードされていません。",cp);
+}
+void CallIndexerGetterProc(const CClass *pobj_Class,char *ObjectName,char *Parameter,Type &resultType){
+	std::vector<UserProc *> subs;
+	pobj_Class->GetMethods().Enum( CALC_ARRAY_GET, subs );
+	if( subs.size() == 0 ){
+		return;
+	}
+
+	Opcode_CallProc(Parameter,subs[0],0,ObjectName,DEF_OBJECT);
+	resultType = subs[0]->ReturnType();
+}
Index: /trunk/abdev/BasicCompiler32/commandvalue.h
===================================================================
--- /trunk/abdev/BasicCompiler32/commandvalue.h	(revision 148)
+++ /trunk/abdev/BasicCompiler32/commandvalue.h	(revision 148)
@@ -0,0 +1,100 @@
+/* 命令語定数 */
+
+//条件、分岐、繰り返し
+#define COM_DO		0x1021
+/* 0x22は「"」なので使用不可 */
+#define COM_GOTO	0x1023
+#define COM_GOSUB	0x1024
+#define COM_LOOP	0x1026
+#define COM_RETURN	0x1027
+/* 0x28は「(」なので使用不可 */
+/* 0x29は「)」なので使用不可 */
+#define COM_FOR		0x1031
+#define COM_NEXT	0x1032
+#define COM_WHILE	0x1036
+#define COM_WEND	0x1037
+
+//データ操作
+#define COM_DIM		0x1062
+#define COM_LET		0x1066
+#define COM_DELETE	0x1068
+#define COM_SWEEPINGDELETE	0x1069
+
+//その他
+#define COM_DEBUG		0x1073
+
+//ポインタ
+#define COM_SETDOUBLE		0x10C1
+#define COM_SETSINGLE		0x10C2
+#define COM_SETQWORD		0x10C3
+#define COM_SETDWORD		0x10C4
+#define COM_SETWORD			0x10C5
+#define COM_SETBYTE			0x10C6
+
+
+
+///////////////////////////////////
+// 以下はProjectEditorで使用される
+
+//入出力コマンド
+#define COM_PRINT		0x1150
+#define COM_INPUT		0x1151
+#define COM_OPEN		0x1152
+#define COM_CLOSE		0x1153
+#define COM_FIELD		0x1154
+#define COM_WRITE		0x1155
+
+//条件、分岐、繰り返し
+#define COM_IF			0x1160
+#define COM_SELECT		0x1161
+
+//ファイル操作
+#define COM_CHDIR		0x1170
+#define COM_KILL		0x1171
+#define COM_MKDIR		0x1172
+#define COM_GET			0x1173
+#define COM_PUT			0x1174
+
+//グラフィックス
+#define COM_CIRCLE		0x1180
+#define COM_LINE		0x1181
+#define COM_PAINT		0x1182
+#define COM_PSET		0x1183
+
+//データ操作
+#define COM_CONST		0x1190
+#define COM_TYPEDEF		0x1191
+
+//クラス関連
+#define COM_CLASS		0x1195
+#define COM_PRIVATE		0x1196
+#define COM_PUBLIC		0x1197
+#define COM_INHERITS	0x1198
+#define COM_PROTECTED	0x1199
+#define COM_INTERFACE	0x119A
+
+//その他
+#define COM_BEEP		0x11A0
+#define COM_CLS			0x11A1
+#define COM_COLOR		0x11A2
+#define COM_DECLARE		0x11A4
+#define COM_DEF			0x11A5
+#define COM_END			0x11A6
+#define COM_FUNCTION	0x11A7
+#define COM_LOCATE		0x11A8
+#define COM_RANDOMIZE	0x11A9
+#define COM_REM			0x11AA
+#define COM_SLEEP		0x11AB
+#define COM_SUB			0x11AC
+#define COM_TYPE		0x11AD
+#define COM_VIRTUAL		0x11AE
+#define COM_OVERRIDE	0x11AF
+#define COM_WITH		0x11B0
+#define COM_ENUM		0x11B1
+#define COM_ABSTRACT	0x11B2
+#define COM_NAMESPACE	0x11B3
+
+//ウィンドウ制御
+#define COM_DELWND		0x11C0
+#define COM_MSGBOX		0x11C1
+#define COM_WINDOW		0x11C2
Index: /trunk/abdev/BasicCompiler32/increment.cpp
===================================================================
--- /trunk/abdev/BasicCompiler32/increment.cpp	(revision 148)
+++ /trunk/abdev/BasicCompiler32/increment.cpp	(revision 148)
@@ -0,0 +1,201 @@
+#include "../BasicCompiler_Common/common.h"
+#include "Opcode.h"
+
+void IncDec(int idCalc, const char *lpszLeft, const char *lpszRight){
+
+	///////////////////////////
+	// 変数アドレスを取得
+	///////////////////////////
+
+	RELATIVE_VAR VarRelativeVar;
+	Type varType;
+	if(!GetVarOffsetReadWrite(
+		lpszLeft,
+		&VarRelativeVar,
+		varType)) return;
+
+	if(IsUse_ecx(&VarRelativeVar)){
+		//push ecx
+		op_push(REG_ECX);
+	}
+
+
+	///////////////////////////////////
+	// レジスタへ変数の内容をコピー
+	///////////////////////////////////
+
+	if( varType.IsReal() ){
+		//実数
+		SetReg_RealVariable(varType.GetBasicType(),&VarRelativeVar);
+	}
+	else{
+		//整数
+		SetReg_WholeVariable(varType.GetBasicType(),&VarRelativeVar,REG_EAX);
+	}
+
+	
+	if(varType.IsWhole()&&lstrcmp(lpszRight,"1")==0&&
+		(idCalc==CALC_ADDITION||idCalc==CALC_SUBTRACTION)){
+		////////////////////////////////////////////
+		// 整数型のインクリメント・デクリメント
+		////////////////////////////////////////////
+
+		if( varType.Is64() ){
+			if(idCalc==CALC_ADDITION){
+				//64ビット インクリメント
+
+				//add eax,1
+				op_add_RV8(REG_EAX,1);
+
+				//adc edx,0
+				op_adc_RV8(REG_EDX,0);
+			}
+			else if(idCalc==CALC_SUBTRACTION){
+				//64ビット デクリメント
+
+				//sub eax,1
+				op_sub_RV8(REG_EAX,1);
+
+				//sbb edx,0
+				op_sbb_RV8(REG_EDX,0);
+			}
+		}
+		else{
+			if(idCalc==CALC_ADDITION){
+				//インクリメント
+				op_inc(REG_EAX);
+			}
+			else if(idCalc==CALC_SUBTRACTION){
+				//デクリメント
+				op_dec(REG_EAX);
+			}
+		}
+	}
+	else{
+		//変数オフセットを一時退避
+		//push ecx
+		op_push(REG_ECX);
+
+		if( varType.IsDouble() ){
+			//sub esp,8
+			op_sub_esp(8);
+
+			//fstp qword ptr[esp]
+			op_fstp_basereg(varType.GetBasicType(),REG_ESP);
+		}
+		else if( varType.IsSingle() ){
+			//sub esp,4
+			op_sub_esp(4);
+
+			//fstp dword ptr[esp]
+			op_fstp_basereg(varType.GetBasicType(),REG_ESP);
+		}
+		else if( varType.Is64() ){
+			//push edx
+			op_push(REG_EDX);
+
+			//push eax
+			op_push(REG_EAX);
+		}
+		else{
+			//push eax
+			op_push(REG_EAX);
+		}
+
+		Type calcType;
+		if( !NumOpe(lpszRight,varType,calcType) ){
+			return;
+		}
+
+		if( varType.IsDouble() )		ChangeTypeToDouble(calcType.GetBasicType());
+		else if( varType.IsSingle() )	ChangeTypeToSingle(calcType.GetBasicType());
+		else ChangeTypeToWhole(calcType.GetBasicType(),varType.GetBasicType());
+
+		int type_stack[255],sp;
+		LONG_PTR index_stack[255];
+		type_stack[0]=varType.GetBasicType();
+		type_stack[1]=varType.GetBasicType();
+		index_stack[0]=varType.GetIndex();
+		index_stack[1]=varType.GetIndex();
+		sp=2;
+
+		switch(idCalc){
+			case CALC_XOR:
+				Calc_Xor(type_stack,index_stack,&sp);
+				break;
+			case CALC_OR:
+				Calc_Or(type_stack,index_stack,&sp);
+				break;
+			case CALC_AND:
+				Calc_And(type_stack,index_stack,&sp);
+				break;
+			case CALC_SHL:
+				Calc_SHL(type_stack,&sp);
+				break;
+			case CALC_SHR:
+				Calc_SHR(type_stack,&sp);
+				break;
+			case CALC_ADDITION:
+			case CALC_SUBTRACTION:
+			case CALC_PRODUCT:
+				CalcTwoTerm_Arithmetic(idCalc,type_stack,index_stack,&sp);
+				break;
+			case CALC_MOD:
+				Calc_Mod(type_stack,&sp);
+				break;
+			case CALC_QUOTIENT:
+				Calc_Divide(type_stack,&sp,varType.GetBasicType());
+				break;
+			case CALC_INTQUOTIENT:
+				Calc_IntDivide(type_stack,index_stack,&sp);
+				break;
+			case CALC_POWER:
+				Calc_Power(type_stack,&sp);
+				break;
+		}
+
+
+		if( varType.IsDouble() ){
+			//fld qword ptr[esp]
+			op_fld_basereg(varType.GetBasicType(),REG_ESP);
+
+			//add esp,8
+			op_add_esp(8);
+		}
+		else if( varType.IsSingle() ){
+			//fld dword ptr[esp]
+			op_fld_basereg(varType.GetBasicType(),REG_ESP);
+
+			//add esp,4
+			op_add_esp(4);
+		}
+		else if( varType.Is64() ){
+			//pop eax
+			op_pop(REG_EAX);
+
+			//pop edx
+			op_pop(REG_EDX);
+		}
+		else{
+			//pop eax
+			op_pop(REG_EAX);
+		}
+
+
+		//変数オフセットを復元
+		//pop ecx
+		op_pop(REG_ECX);
+	}
+
+
+	/////////////////////////////////////////////////
+	// レジスタの内容を変数にコピー
+	/////////////////////////////////////////////////
+
+	if(IsUse_ecx(&VarRelativeVar)){
+		//pop ecx
+		op_pop(REG_ECX);
+	}
+
+	SetVariableFromEax(varType.GetBasicType(),varType.GetBasicType(),&VarRelativeVar);
+}
Index: /trunk/abdev/BasicCompiler32/manifest.xml
===================================================================
--- /trunk/abdev/BasicCompiler32/manifest.xml	(revision 148)
+++ /trunk/abdev/BasicCompiler32/manifest.xml	(revision 148)
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
+<assemblyIdentity
+version="1.0.0.0"
+processorArchitecture="x86"
+name="Microsoft.Winweb.BasicCompiler.exe"
+type="win32"
+/>
+<description>Description</description>
+<dependency>
+<dependentAssembly>
+<assemblyIdentity
+type="win32"
+name="Microsoft.Windows.Common-Controls"
+version="6.0.0.0"
+processorArchitecture="x86"
+publicKeyToken="6595b64144ccf1df"
+language="*"
+/>
+</dependentAssembly>
+</dependency>
+</assembly>
Index: /trunk/abdev/BasicCompiler32/op32_main.cpp
===================================================================
--- /trunk/abdev/BasicCompiler32/op32_main.cpp	(revision 148)
+++ /trunk/abdev/BasicCompiler32/op32_main.cpp	(revision 148)
@@ -0,0 +1,990 @@
+#include "../BasicCompiler_Common/common.h"
+#include "Opcode.h"
+
+
+
+BOOL IsSafeReg(int reg){
+	if(reg==REG_EBX||reg==REG_ESI||reg==REG_EDI) return 1;
+	return 0;
+}
+
+
+
+/////////////////////////////////////////////////
+// ModR/Mバイト、SIBバイト、ディスプレースメント
+/////////////////////////////////////////////////
+
+//スケール
+#define SCALE_NON	(char)0x00
+#define SCALE_2		(char)0x40
+#define SCALE_4		(char)0x80
+#define SCALE_8		(char)0xC0
+
+//インデックスなし
+#define INDEX_NON	0x04
+
+void set_mod_rm_sib_disp(char mod,int reg,int scale,int index_reg,int base_reg,int disp){
+	if(mod==MOD_DISP32){
+		//ModR/Mバイト
+		OpBuffer[obp++]=(char)(      REGISTER_OPERAND(reg)<<3 | REGISTER_OPERAND(0x04));
+
+		base_reg=0x05;
+		index_reg=INDEX_NON;
+	}
+	else{
+		//ModR/Mバイト
+		OpBuffer[obp++]=(char)(mod | REGISTER_OPERAND(reg)<<3 | REGISTER_OPERAND(base_reg));
+	}
+
+
+	//レジスタモードの場合は、ここで終了
+	if(mod==MOD_REG) return;
+
+
+	if(REGISTER_OPERAND(base_reg)==0x04||mod==MOD_DISP32){
+		//////////////////////
+		// SIBバイトを使う
+		//////////////////////
+
+		OpBuffer[obp++]=(char)(scale| REGISTER_OPERAND(index_reg)<<3 | REGISTER_OPERAND(base_reg));
+	}
+
+	//ディスプレースメントを必要としない場合は、ここで終了
+	if(mod==MOD_BASE) return;
+
+
+	//////////////////////////
+	// ディスプレースメント
+	//////////////////////////
+
+	if(mod==MOD_BASE_DISP8) OpBuffer[obp++]=(char)disp;
+	else{
+		*((long *)(OpBuffer+obp))=disp;
+		obp+=sizeof(long);
+	}
+}
+
+
+
+void __op_format(char op_prefix,char opcode,int reg){
+	//命令プリフィックス
+	if(op_prefix) OpBuffer[obp++]=op_prefix;
+
+	//オペコード、レジスタ
+	OpBuffer[obp++]=(char)(opcode|REGISTER_OPERAND(reg));
+}
+void __op_format(char op_prefix,char opcode1,char opcode2,int reg,int base_reg,int offset,char mod){
+	//命令プリフィックス
+	if(op_prefix) OpBuffer[obp++]=op_prefix;
+
+	//オペコード
+	OpBuffer[obp++]=opcode1;
+	if(opcode2) OpBuffer[obp++]=opcode2;
+
+	//ModR/M, SIB, disp
+	set_mod_rm_sib_disp(mod,reg,SCALE_NON,INDEX_NON,base_reg,offset);
+}
+
+
+
+///////////////////
+// mov関連
+///////////////////
+
+void op_mov_RV(int reg,int offset){
+	//mov reg,value
+
+	//オペコード、レジスタ
+	OpBuffer[obp++]=(char)(0xB8|REGISTER_OPERAND(reg));
+
+	//DISP32
+	*((long *)(OpBuffer+obp))=offset;
+	obp+=sizeof(long);
+}
+void op_mov_RV(int op_size,int reg,int offset){
+	if(op_size==PTR_SIZE) op_mov_RV(reg,offset);
+	else SetError(300,NULL,cp);
+}
+void op_mov_RR(int reg1,int reg2){
+	//mov reg1,reg2
+
+	if(reg1==reg2) return;
+
+	//1000 1011 11xx xbbb
+	OpBuffer[obp++]=(char)0x8B;
+	OpBuffer[obp++]=(char)(0xC0| REGISTER_OPERAND(reg1)<<3 | REGISTER_OPERAND(reg2));
+}
+void op_mov_RM(int op_size,int reg,int base_reg,int offset,char mod){
+	//mov reg32,dword ptr[base_reg+offset]
+	//mov reg16,word ptr[base_reg+offset]
+	//mov reg8,byte ptr[base_reg+offset]
+
+	//16ビット演算の命令プリフィックス
+	char op_prefix=0;
+	if(op_size==sizeof(short)) op_prefix=(char)0x66;
+
+	//オペコード
+	char opcode;
+	if(op_size==sizeof(char)) opcode=(char)0x8A;
+	else opcode=(char)0x8B;
+
+	__op_format(op_prefix,opcode,0,reg,base_reg,offset,mod);
+}
+void op_mov_RM_ex(int op_size,int reg,int base_reg1,int base_reg2,int offset,BOOL bUseOffset){
+	//mov reg32,dword ptr[base_reg1+base_reg2+offset]
+	//mov reg16,word ptr[base_reg1+base_reg2+offset]
+	//mov reg8,byte ptr[base_reg1+base_reg2+offset]
+
+	if(base_reg1==REG_ESP){
+		//SIBバイトのindex部にespは指定できない
+		base_reg1=base_reg2;
+		base_reg2=REG_ESP;
+	}
+
+	//16ビット演算のプリフィックス
+	if(op_size==sizeof(short)) OpBuffer[obp++]=(char)0x66;
+
+	//オペコード
+	if(op_size==sizeof(char)) OpBuffer[obp++]=(char)0x8A;
+	else OpBuffer[obp++]=(char)0x8B;
+
+	if(bUseOffset){
+		///////////////////////////
+		// オフセット値を使う
+		///////////////////////////
+
+		//レジスタ
+		OpBuffer[obp++]=(char)(0x84| REGISTER_OPERAND(reg)<<3);
+
+		//ベースレジスタ
+		OpBuffer[obp++]=(char)(REGISTER_OPERAND(base_reg1)<<3 | REGISTER_OPERAND(base_reg2));
+
+		//オフセット値
+		*((long *)(OpBuffer+obp))=offset;
+		obp+=sizeof(long);
+	}
+	else{
+		///////////////////////////
+		// オフセット値を使わない
+		///////////////////////////
+
+		//レジスタ
+		OpBuffer[obp++]=(char)(0x04| REGISTER_OPERAND(reg)<<3);
+
+		//ベースレジスタ
+		OpBuffer[obp++]=(char)(REGISTER_OPERAND(base_reg1)<<3 | REGISTER_OPERAND(base_reg2));
+	}
+}
+void op_mov_MR(int op_size,int reg,int base_reg,int offset,char mod){
+	//mov dword ptr[base_reg+offset],reg32
+	//mov word ptr[base_reg+offset],reg16
+	//mov byte ptr[base_reg+offset],reg8
+
+	//16ビット演算の命令プリフィックス
+	char op_prefix=0;
+	if(op_size==sizeof(short)) op_prefix=(char)0x66;
+
+	//オペコード
+	char opcode;
+	if(op_size==sizeof(char)) opcode=(char)0x88;
+	else opcode=(char)0x89;
+
+	__op_format(op_prefix,opcode,0,reg,base_reg,offset,mod);
+}
+void op_mov_MR_ex(int op_size,int reg,int base_reg1,int base_reg2,int offset,BOOL bUseOffset){
+	//mov dword ptr[base_reg1+base_reg2+offset],reg32
+	//mov word ptr[base_reg1+base_reg2+offset],reg16
+	//mov byte ptr[base_reg1+base_reg2+offset],reg8
+
+	if(base_reg1==REG_ESP){
+		//SIBバイトのindex部にrspは指定できない
+		base_reg1=base_reg2;
+		base_reg2=REG_ESP;
+	}
+
+	//16ビット演算のプリフィックス
+	if(op_size==sizeof(short)) OpBuffer[obp++]=(char)0x66;
+
+	//オペコード
+	if(op_size==sizeof(char)) OpBuffer[obp++]=(char)0x88;
+	else OpBuffer[obp++]=(char)0x89;
+
+	if(bUseOffset==USE_OFFSET){
+		//////////////////////////
+		//オフセット値を使う
+		//////////////////////////
+
+		//レジスタ
+		OpBuffer[obp++]=(char)(0x84| REGISTER_OPERAND(reg)<<3);
+
+		//ベースレジスタ
+		OpBuffer[obp++]=(char)(REGISTER_OPERAND(base_reg1)<<3 | REGISTER_OPERAND(base_reg2));
+
+		//オフセット値
+		*((long *)(OpBuffer+obp))=offset;
+		obp+=sizeof(long);
+	}
+	else{
+		//////////////////////////
+		//オフセット値を使わない
+		//////////////////////////
+
+		//レジスタ
+		OpBuffer[obp++]=(char)(0x04| REGISTER_OPERAND(reg)<<3);
+
+		//ベースレジスタ
+		OpBuffer[obp++]=(char)(REGISTER_OPERAND(base_reg1)<<3 | REGISTER_OPERAND(base_reg2));
+	}
+}
+
+
+
+
+////////////////////////////////
+// movsx関連
+////////////////////////////////
+
+void op_movsx_R32R16(int reg32,int reg16){
+	//movsx reg32,reg16
+
+	//16ビット演算の命令プリフィックス
+	char op_prefix=0;
+
+	//オペコード
+	char opcode=(char)0x0F;
+	char opcode2=(char)0xBF;
+
+	__op_format(op_prefix,opcode,opcode2,reg32,reg16,0,MOD_REG);
+}
+void op_movsx_R32R8(int reg32,int reg8){
+	//movsx reg32,reg8
+
+	//16ビット演算の命令プリフィックス
+	char op_prefix=0;
+
+	//オペコード
+	char opcode=(char)0x0F;
+	char opcode2=(char)0xBE;
+
+	__op_format(op_prefix,opcode,opcode2,reg32,reg8,0,MOD_REG);
+}
+void op_movsx_R16R8(int reg16,int reg8){
+	//movsx reg16,reg8
+
+	//16ビット演算の命令プリフィックス
+	char op_prefix=(char)0x66;
+
+	//オペコード
+	char opcode=(char)0x0F;
+	char opcode2=(char)0xBE;
+
+	__op_format(op_prefix,opcode,opcode2,reg16,reg8,0,MOD_REG);
+}
+
+
+
+//////////////////////////////////
+// インクリメント・デクリメント
+//////////////////////////////////
+
+void op_inc(int reg){
+	//inc reg
+
+	//16ビット演算の命令プリフィックス
+	char op_prefix=0;
+
+	//オペコード
+	char opcode=(char)0xFF;
+
+	__op_format(op_prefix,opcode,0,0,reg,0,MOD_REG);
+}
+void op_dec(int reg){
+	op_inc(reg);
+	OpBuffer[obp-1]=OpBuffer[obp-1]|0x08;
+}
+
+
+
+/////////////////////
+// add関連
+/////////////////////
+
+void op_add_RV8(int reg,char cValue){
+	//add reg,value8
+
+	OpBuffer[obp++]=(char)0x83;
+	OpBuffer[obp++]=(char)(0xC0|REGISTER_OPERAND(reg));
+	OpBuffer[obp++]=cValue;
+}
+void op_add_RM(int op_size,int reg,int base_reg,int offset,char mod){
+	//add reg32,dword ptr[base_reg+offset]
+	//add reg16,word ptr[base_reg+offset]
+	//add reg8,byte ptr[base_reg+offset]
+
+	//16ビット演算の命令プリフィックス
+	char op_prefix=0;
+	if(op_size==sizeof(short)) op_prefix=(char)0x66;
+
+	//オペコード
+	char opcode;
+	if(op_size==sizeof(char)) opcode=(char)0x02;
+	else opcode=(char)0x03;
+
+	__op_format(op_prefix,opcode,0,reg,base_reg,offset,mod);
+}
+void op_adc_RV8(int reg,char cValue){
+	//adc reg,value8
+
+	OpBuffer[obp++]=(char)0x83;
+	OpBuffer[obp++]=(char)(0xD0|REGISTER_OPERAND(reg));
+	OpBuffer[obp++]=cValue;
+}
+
+
+/////////////////////
+// sub関連
+/////////////////////
+
+void op_sub_RV8(int reg,char cValue){
+	//sub reg,value8
+
+	OpBuffer[obp++]=(char)0x83;
+	OpBuffer[obp++]=(char)(0xE8|REGISTER_OPERAND(reg));
+	OpBuffer[obp++]=cValue;
+}
+void op_sbb_RV8(int reg,char cValue){
+	//sbb reg,value8
+
+	OpBuffer[obp++]=(char)0x83;
+	OpBuffer[obp++]=(char)(0xD8|REGISTER_OPERAND(reg));
+	OpBuffer[obp++]=cValue;
+}
+void op_sbb_RR( int reg1, int reg2 ){
+	//sbb reg1,reg2
+
+	//オペコード
+	OpBuffer[obp++]=(char)0x1B;
+
+	//レジスタ
+	OpBuffer[obp++]=(char)(0xC0| REGISTER_OPERAND(reg1)<<3 | REGISTER_OPERAND(reg2));
+}
+
+
+
+////////////////////////
+// imul関連
+////////////////////////
+
+void op_imul_RR(int reg1,int reg2){
+	//imul reg1,reg2
+
+	//オペコード
+	OpBuffer[obp++]=(char)0x0F;
+	OpBuffer[obp++]=(char)0xAF;
+
+	//レジスタ
+	OpBuffer[obp++]=(char)(0xC0| REGISTER_OPERAND(reg1)<<3 | REGISTER_OPERAND(reg2));
+}
+
+void op_imul_RV(int reg,int i32data){
+	//imul reg,i32data
+
+	if(-128<=i32data&&i32data<=127){
+		//オペコード
+		OpBuffer[obp++]=(char)0x6B;
+
+		//レジスタ
+		OpBuffer[obp++]=(char)(0xC0| REGISTER_OPERAND(reg)<<3 | REGISTER_OPERAND(reg));
+
+		//値
+		OpBuffer[obp++]=(char)i32data;
+	}
+	else{
+		//オペコード
+		OpBuffer[obp++]=(char)0x69;
+
+		//レジスタ
+		OpBuffer[obp++]=(char)(0xC0| REGISTER_OPERAND(reg)<<3 | REGISTER_OPERAND(reg));
+
+		//値
+		*((long *)(OpBuffer+obp))=i32data;
+		obp+=sizeof(long);
+	}
+}
+
+
+
+//////////////////////
+// and関連
+//////////////////////
+
+void op_and_RV(int reg,int value){
+	//and reg,value
+
+	if(reg==REG_RAX){
+		//eaxのみ特殊
+
+		// [8bit rex] 0010 0101 [32bit offset]
+		OpBuffer[obp++]=(char)0x25;
+		*((long *)(OpBuffer+obp))=value;
+		obp+=sizeof(long);
+	}
+	else{
+		//16ビット演算の命令プリフィックス
+		char op_prefix=0;
+
+		//オペコード
+		char opcode=(char)0x81;
+
+		__op_format(op_prefix,opcode,0,0,reg,value,MOD_REG);
+	}
+}
+
+void op_or_RR( int op_size, int reg1, int reg2 ){
+	//16ビット演算のプリフィックス
+	if(op_size==sizeof(short)) OpBuffer[obp++]=(char)0x66;
+
+	//オペコード
+	if(op_size==sizeof(char)) OpBuffer[obp++]=(char)0x0A;
+	else OpBuffer[obp++]=(char)0x0B;
+
+	//レジスタ
+	OpBuffer[obp++]=(char)(0xC0| REGISTER_OPERAND(reg1)<<3 | REGISTER_OPERAND(reg2));
+}
+
+
+
+void op_neg( int reg ){
+	//neg reg
+
+	//オペコード
+	OpBuffer[obp++]=(char)0xF7;
+
+	//レジスタ
+	OpBuffer[obp++]=(char)(0xD8| REGISTER_OPERAND(reg));
+}
+
+
+
+///////////////////////
+// 64ビット関連
+///////////////////////
+
+void op_cdq(){
+	//cdq
+	OpBuffer[obp++]=(char)0x99;
+}
+
+
+
+/////////////////////
+// ストリング関係
+/////////////////////
+
+void op_rep_movs(int op_size){
+	if(op_size==sizeof(BYTE)){
+		//rep movs byte ptr[edi],byte ptr[esi]
+		OpBuffer[obp++]=(char)0xF3;
+		OpBuffer[obp++]=(char)0xA4;
+	}
+	else if(op_size==sizeof(short)){
+		//rep movs word ptr[edi],word ptr[esi]
+		OpBuffer[obp++]=(char)0xF3;
+		OpBuffer[obp++]=(char)0x66;
+		OpBuffer[obp++]=(char)0xA5;
+	}
+	else if(op_size==sizeof(long)){
+		//rep movs dword ptr[edi],dword ptr[esi]
+		OpBuffer[obp++]=(char)0xF3;
+		OpBuffer[obp++]=(char)0xA5;
+	}
+}
+
+
+
+
+//////////////////////////
+// スタック関連
+//////////////////////////
+
+void op_push(int reg){
+	//push reg
+
+	if( reg == REG_NON ){
+		op_sub_esp( PTR_SIZE );
+		return;
+	}
+
+	//オペコード、レジスタ
+	__op_format(0,(char)0x50,reg);
+}
+void op_push_V(long data){
+	//スタックにリテラル値をプッシュ
+	if(-128<=data&&data<=127){
+		//push 8ビット値
+		OpBuffer[obp++]=(char)0x6A;
+		OpBuffer[obp++]=(char)data;
+	}
+	else{
+		//push 32ビット値
+		OpBuffer[obp++]=(char)0x68;
+		*((long *)(OpBuffer+obp))=data;
+		obp+=sizeof(long);
+	}
+}
+void op_pop(int reg){
+	//pop reg
+
+	if( reg == REG_NON ){
+		op_add_esp( PTR_SIZE );
+		return;
+	}
+
+	//オペコード、レジスタ
+	__op_format(0,(char)0x58,reg);
+}
+void op_add_esp(int num){
+	//スタックポインタの加算（pop方向）
+
+	//add esp,num
+	if(0xFFFFFF80&num){
+		OpBuffer[obp++]=(char)0x81;
+		OpBuffer[obp++]=(char)0xC4;
+		*((long *)(OpBuffer+obp))=num;
+		obp+=sizeof(long);
+	}
+	else{
+		//「128 > num > -127」の場合
+		OpBuffer[obp++]=(char)0x83;
+		OpBuffer[obp++]=(char)0xC4;
+		OpBuffer[obp++]=(char)num;
+	}
+}
+void op_sub_esp(int num){
+	//スタックポインタの減算（push方向）
+
+	//sub esp,num
+	if(0xFFFFFF80&num){
+		OpBuffer[obp++]=(char)0x81;
+		OpBuffer[obp++]=(char)0xEC;
+		*((long *)(OpBuffer+obp))=num;
+		obp+=sizeof(long);
+	}
+	else{
+		//「128 > num > -127」の場合
+		OpBuffer[obp++]=(char)0x83;
+		OpBuffer[obp++]=(char)0xEC;
+		OpBuffer[obp++]=(char)num;
+	}
+}
+
+
+
+/////////////////////
+// cmp関連
+/////////////////////
+void op_cmp_RR( int reg1, int reg2 ){
+	//オペコード
+	OpBuffer[obp++]=(char)0x3B;
+
+	//レジスタ
+	OpBuffer[obp++]=(char)(0xC0| REGISTER_OPERAND(reg1)<<3 | REGISTER_OPERAND(reg2));
+}
+void op_cmp_value(int op_size,int reg,char byte_data){
+	//cmp reg,byte_data
+
+	if(op_size==sizeof(char)&&reg==REG_EAX){
+		//alレジスタの場合は特殊
+		OpBuffer[obp++]=(char)0x3C;
+
+		//8ビット値
+		OpBuffer[obp++]=byte_data;
+
+		return;
+	}
+
+	//16ビット演算のプリフィックス
+	if(op_size==sizeof(short)) OpBuffer[obp++]=(char)0x66;
+
+	//オペコード
+	if(op_size==sizeof(char)) OpBuffer[obp++]=(char)0x80;
+	else OpBuffer[obp++]=(char)0x83;
+
+	//レジスタ
+	OpBuffer[obp++]=(char)(0xF8| REGISTER_OPERAND(reg));
+
+	//8ビット値
+	OpBuffer[obp++]=byte_data;
+}
+void op_setne( int reg ){
+	//オペコード
+	OpBuffer[obp++]=(char)0x0F;
+	OpBuffer[obp++]=(char)0x95;
+
+	//レジスタ
+	OpBuffer[obp++]=(char)( 0xC0 | REGISTER_OPERAND(reg) );
+}
+
+
+
+////////////////////
+// test関連
+////////////////////
+
+void op_test(int reg1,int reg2){
+	//test reg1,reg2
+
+	//1000 0101 11rr rbbb
+	OpBuffer[obp++]=(char)0x85;
+	OpBuffer[obp++]=(char)(0xC0| REGISTER_OPERAND(reg1)<<3 | REGISTER_OPERAND(reg2));
+}
+
+
+
+//////////////////////////////
+// 浮動小数点関連
+//////////////////////////////
+
+void op_fld_ptr_esp(int type){
+	//スタックポインタが示すバッファのデータを浮動小数点レジスタへロード
+
+	if(type==DEF_DOUBLE){
+		//fld qword ptr[esp]
+		OpBuffer[obp++]=(char)0xDD;
+		OpBuffer[obp++]=(char)0x04;
+		OpBuffer[obp++]=(char)0x24;
+	}
+	else if(type==DEF_SINGLE){
+		//fld dword ptr[esp]
+		OpBuffer[obp++]=(char)0xD9;
+		OpBuffer[obp++]=(char)0x04;
+		OpBuffer[obp++]=(char)0x24;
+	}
+	else if(type==DEF_INT64){
+		//fild qword ptr[esp]
+		OpBuffer[obp++]=(char)0xDF;
+		OpBuffer[obp++]=(char)0x2C;
+		OpBuffer[obp++]=(char)0x24;
+	}
+	else if(type==DEF_LONG){
+		//fild dword ptr[esp]
+		OpBuffer[obp++]=(char)0xDB;
+		OpBuffer[obp++]=(char)0x04;
+		OpBuffer[obp++]=(char)0x24;
+	}
+}
+void op_fld_basereg(int type,int base_reg){
+	//fld ptr[reg]
+
+	//オペコード
+	if(type==DEF_DOUBLE)		OpBuffer[obp++]=(char)0xDD;
+	else if(type==DEF_SINGLE)	OpBuffer[obp++]=(char)0xD9;
+	else SetError(300,NULL,cp);
+
+	if(base_reg==REG_ESP){
+		OpBuffer[obp++]=(char)0x04;
+		OpBuffer[obp++]=(char)0x24;
+	}
+	else if(base_reg==REG_EBP){
+		OpBuffer[obp++]=(char)0x45;
+		OpBuffer[obp++]=(char)0x00;
+	}
+	else{
+		OpBuffer[obp++]=(char)REGISTER_OPERAND(base_reg);
+	}
+}
+void op_fld_base_offset(int type,int base_reg,int offset){
+	//fld ptr[reg+offset]
+
+	//オペコード
+	if(type==DEF_DOUBLE)		OpBuffer[obp++]=(char)0xDD;
+	else if(type==DEF_SINGLE)	OpBuffer[obp++]=(char)0xD9;
+	else SetError(300,NULL,cp);
+
+	//オペコード、レジスタ
+	if(base_reg==REG_ESP){
+		OpBuffer[obp++]=(char)0x84;
+		OpBuffer[obp++]=(char)0x24;
+	}
+	else{
+		OpBuffer[obp++]=(char)(0x80|REGISTER_OPERAND(base_reg));
+	}
+
+	//オフセット値
+	*((long *)(OpBuffer+obp))=offset;
+	obp+=sizeof(long);
+}
+void op_fld_base_offset_ex(int type,int base_reg1,int base_reg2,int offset,BOOL bUseOffset){
+	//fld ptr[base_reg1+base_reg2+offset]
+
+	if(base_reg1==REG_ESP){
+		//SIBバイトのindex部にespは指定できない
+		base_reg1=base_reg2;
+		base_reg2=REG_ESP;
+	}
+
+	//オペコード
+	if(type==DEF_DOUBLE)		OpBuffer[obp++]=(char)0xDD;
+	else if(type==DEF_SINGLE)	OpBuffer[obp++]=(char)0xD9;
+	else SetError(300,NULL,cp);
+
+	int reg=0;
+	if(bUseOffset){
+		///////////////////////////
+		// オフセット値を使う
+		///////////////////////////
+
+		//レジスタ
+		OpBuffer[obp++]=(char)(0x84| REGISTER_OPERAND(reg)<<3);
+
+		//ベースレジスタ
+		OpBuffer[obp++]=(char)(REGISTER_OPERAND(base_reg1)<<3 | REGISTER_OPERAND(base_reg2));
+
+		//オフセット値
+		*((long *)(OpBuffer+obp))=offset;
+		obp+=sizeof(long);
+	}
+	else{
+		///////////////////////////
+		// オフセット値を使わない
+		///////////////////////////
+
+		//レジスタ
+		OpBuffer[obp++]=(char)(0x04| REGISTER_OPERAND(reg)<<3);
+
+		//ベースレジスタ
+		OpBuffer[obp++]=(char)(REGISTER_OPERAND(base_reg1)<<3 | REGISTER_OPERAND(base_reg2));
+	}
+}
+void op_fstp_basereg(int type,int base_reg){
+	//fstp ptr[reg]
+
+	//オペコード
+	if(type==DEF_DOUBLE)		OpBuffer[obp++]=(char)0xDD;
+	else if(type==DEF_SINGLE)	OpBuffer[obp++]=(char)0xD9;
+	else SetError(300,NULL,cp);
+
+	if(base_reg==REG_ESP){
+		OpBuffer[obp++]=(char)0x1C;
+		OpBuffer[obp++]=(char)0x24;
+	}
+	else if(base_reg==REG_EBP){
+		OpBuffer[obp++]=(char)0x5D;
+		OpBuffer[obp++]=(char)0x00;
+	}
+	else{
+		OpBuffer[obp++]=(char)(0x18|REGISTER_OPERAND(base_reg));
+	}
+}
+void op_fstp_base_offset(int type,int base_reg,int offset){
+	//fstp ptr[reg+offset]
+
+	//オペコード
+	if(type==DEF_DOUBLE)		OpBuffer[obp++]=(char)0xDD;
+	else if(type==DEF_SINGLE)	OpBuffer[obp++]=(char)0xD9;
+	else SetError(300,NULL,cp);
+
+	//オペコード、レジスタ
+	if(base_reg==REG_ESP){
+		OpBuffer[obp++]=(char)0x9C;
+		OpBuffer[obp++]=(char)0x24;
+	}
+	else{
+		OpBuffer[obp++]=(char)(0x98|REGISTER_OPERAND(base_reg));
+	}
+
+	//オフセット値
+	*((long *)(OpBuffer+obp))=offset;
+	obp+=sizeof(long);
+}
+void op_fstp_base_offset_ex(int type,int base_reg1,int base_reg2,int offset,BOOL bUseOffset){
+	//fstp ptr[base_reg1+base_reg2+offset]
+
+	if(base_reg1==REG_ESP){
+		//SIBバイトのindex部にespは指定できない
+		base_reg1=base_reg2;
+		base_reg2=REG_ESP;
+	}
+
+	//オペコード
+	if(type==DEF_DOUBLE)		OpBuffer[obp++]=(char)0xDD;
+	else if(type==DEF_SINGLE)	OpBuffer[obp++]=(char)0xD9;
+	else SetError(300,NULL,cp);
+
+	int reg=0;
+	if(bUseOffset){
+		///////////////////////////
+		// オフセット値を使う
+		///////////////////////////
+
+		//レジスタ
+		OpBuffer[obp++]=(char)(0x9C| REGISTER_OPERAND(reg)<<3);
+
+		//ベースレジスタ
+		OpBuffer[obp++]=(char)(REGISTER_OPERAND(base_reg1)<<3 | REGISTER_OPERAND(base_reg2));
+
+		//オフセット値
+		*((long *)(OpBuffer+obp))=offset;
+		obp+=sizeof(long);
+	}
+	else{
+		///////////////////////////
+		// オフセット値を使わない
+		///////////////////////////
+
+		//レジスタ
+		OpBuffer[obp++]=(char)(0x1C| REGISTER_OPERAND(reg)<<3);
+
+		//ベースレジスタ
+		OpBuffer[obp++]=(char)(REGISTER_OPERAND(base_reg1)<<3 | REGISTER_OPERAND(base_reg2));
+	}
+}
+void op_fistp_ptr_esp( int typeSize ){
+	if( typeSize == sizeof(_int64) ){
+		//64bit
+
+		//fistp qword ptr[esp]
+		fpu_cast();
+		OpBuffer[obp++]=(char)0xDF;
+		OpBuffer[obp++]=(char)0x3C;
+		OpBuffer[obp++]=(char)0x24;
+		fpu_cast_end();
+	}
+	else if( typeSize == sizeof(long) ){
+		//32bit
+
+		//fistp dword ptr[esp]
+		fpu_cast();
+		OpBuffer[obp++]=(char)0xDB;
+		OpBuffer[obp++]=(char)0x1C;
+		OpBuffer[obp++]=(char)0x24;
+		fpu_cast_end();
+	}
+	else{
+		SetError();
+	}
+}
+void op_fstp_push( Type &type ){
+	//sub esp,size
+	op_sub_esp( type.GetBasicSize() );
+
+	op_fstp_basereg( type.GetBasicType(), REG_ESP );
+}
+
+
+
+//////////////////////////////
+// レジスタ関連
+//////////////////////////////
+
+void op_zero_reg(int reg){
+	//レジスタに0をセット
+
+	switch(reg){
+		case REG_EAX:
+			//xor eax,eax
+			OpBuffer[obp++]=(char)0x33;
+			OpBuffer[obp++]=(char)0xC0;
+			break;
+		case REG_EBX:
+			//xor ebx,ebx
+			OpBuffer[obp++]=(char)0x33;
+			OpBuffer[obp++]=(char)0xDB;
+			break;
+		case REG_ECX:
+			//xor ecx,ecx
+			OpBuffer[obp++]=(char)0x33;
+			OpBuffer[obp++]=(char)0xC9;
+			break;
+		case REG_EDX:
+			//xor edx,edx
+			OpBuffer[obp++]=(char)0x33;
+			OpBuffer[obp++]=(char)0xD2;
+			break;
+		case REG_EBP:
+			//xor ebp,ebp
+			OpBuffer[obp++]=(char)0x33;
+			OpBuffer[obp++]=(char)0xED;
+			break;
+	}
+}
+
+void fpu_cast(){
+	///////////////////////
+	// FPUの切り捨て設定
+	///////////////////////
+
+	//sub esp,16
+	op_sub_esp(16);
+
+	//mov dword ptr[esp+4],eax
+	OpBuffer[obp++]=(char)0x89;
+	OpBuffer[obp++]=(char)0x44;
+	OpBuffer[obp++]=(char)0x24;
+	OpBuffer[obp++]=(char)0x04;
+
+	//fnstcw word ptr[esp]
+	OpBuffer[obp++]=(char)0xD9;
+	OpBuffer[obp++]=(char)0x3C;
+	OpBuffer[obp++]=(char)0x24;
+
+	//mov ax,word ptr[esp]
+	OpBuffer[obp++]=(char)0x66;
+	OpBuffer[obp++]=(char)0x8B;
+	OpBuffer[obp++]=(char)0x04;
+	OpBuffer[obp++]=(char)0x24;
+
+	//or ah,0Ch
+	OpBuffer[obp++]=(char)0x80;
+	OpBuffer[obp++]=(char)0xCC;
+	OpBuffer[obp++]=(char)0x0C;
+
+	//mov word ptr[esp+2],ax
+	OpBuffer[obp++]=(char)0x66;
+	OpBuffer[obp++]=(char)0x89;
+	OpBuffer[obp++]=(char)0x44;
+	OpBuffer[obp++]=(char)0x24;
+	OpBuffer[obp++]=(char)0x02;
+
+	//fldcw word ptr[esp+2]
+	OpBuffer[obp++]=(char)0xD9;
+	OpBuffer[obp++]=(char)0x6C;
+	OpBuffer[obp++]=(char)0x24;
+	OpBuffer[obp++]=(char)0x02;
+
+	//mov eax,dword ptr[esp+4]
+	OpBuffer[obp++]=(char)0x8B;
+	OpBuffer[obp++]=(char)0x44;
+	OpBuffer[obp++]=(char)0x24;
+	OpBuffer[obp++]=(char)0x04;
+
+	//add esp,16
+	op_add_esp(16);
+}
+void fpu_cast_end(){
+	//sub esp,16
+	op_sub_esp(16);
+
+	//fldcw word ptr[esp]
+	OpBuffer[obp++]=(char)0xD9;
+	OpBuffer[obp++]=(char)0x2C;
+	OpBuffer[obp++]=(char)0x24;
+
+	//add esp,16
+	op_add_esp(16);
+}
+
+
+/////////////////////////////
+// 関数呼び出し
+/////////////////////////////
+
+void op_call(UserProc *pUserProc){
+	OpBuffer[obp++]=(char)0xE8;
+	pobj_SubAddrSchedule->add(pUserProc,1);
+	pUserProc->Using();
+	obp+=sizeof(long);
+}
+void op_ret(){
+	OpBuffer[obp++]=(char)0xC3;
+}
Index: /trunk/abdev/BasicCompiler32/resource.h
===================================================================
--- /trunk/abdev/BasicCompiler32/resource.h	(revision 148)
+++ /trunk/abdev/BasicCompiler32/resource.h	(revision 148)
@@ -0,0 +1,56 @@
+//{{NO_DEPENDENCIES}}
+// Microsoft Developer Studio generated include file.
+// Used by BasicCompiler.rc
+//
+#define IDD_MAIN                        101
+#define IDD_VARLIST                     103
+#define IDI_MAIN                        108
+#define IDI_VARSTRUCT                   109
+#define IDI_VARDATA                     110
+#define IDI_VARSTR                      111
+#define IDI_VARARRAY                    112
+#define IDI_VARPTRSTRUCT                113
+#define IDD_CLIPMAIN                    114
+#define IDD_DEBUGGER                    115
+#define IDR_DEBUGGERTOOLBAR             117
+#define IDD_DEBUGGER_TOOLBARBASE        120
+#define IDR_DEBUGGER_VARLIST_MENU       122
+#define IDR_DEBUGGERTOOLBAR_DISABLED    125
+#define IDC_EXEPATH                     1000
+#define IDC_PROGRESS                    1001
+#define IDC_ERRORLIST                   1002
+#define IDC_MESSAGE                     1003
+#define IDC_DEBUGLIST                   1005
+#define IDC_SHOWERROR                   1006
+#define IDC_SHOWDEBUG                   1007
+#define IDC_THREADCOMBO                 1014
+#define IDC_VARTREE                     1015
+#define IDC_GLOBAL                      1016
+#define IDC_LOCAL                       1017
+#define IDC_PROCCOMBO                   1018
+#define IDC_HIDESYSVAR                  1019
+#define IDC_STEPIN                      1021
+#define IDC_STEPOVER                    1022
+#define IDC_ESP                         1023
+#define IDC_DUMMYCANCEL                 1024
+#define IDC_TAB1                        1025
+#define IDC_VARPOS                      1029
+#define IDC_WATCHLIST                   1033
+#define IDC_STATIC_VERSION              1034
+#define IDC_DEBUG_START                 40003
+#define IDC_DEBUG_STEPOVER              40004
+#define IDC_DEBUG_STEPIN                40005
+#define IDM_SHOW_DEFAULTSYSTEM_VAR      40007
+#define IDM_SHOW_RAD_VAR                40008
+#define IDM_SHOW_GUID_VAR               40009
+
+// Next default values for new objects
+// 
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE        126
+#define _APS_NEXT_COMMAND_VALUE         40010
+#define _APS_NEXT_CONTROL_VALUE         1035
+#define _APS_NEXT_SYMED_VALUE           101
+#endif
+#endif
