OpenCores
URL https://opencores.org/ocsvn/thor/thor/trunk

Subversion Repositories thor

[/] [thor/] [trunk/] [software/] [emuThor/] [source/] [frmStack.h] - Blame information for rev 46

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 32 robfinch
#pragma once
2
#include "stdafx.h"
3
 
4
extern clsSystem system1;
5
 
6
namespace emuThor {
7
 
8
        using namespace System;
9
        using namespace System::ComponentModel;
10
        using namespace System::Collections;
11
        using namespace System::Windows::Forms;
12
        using namespace System::Data;
13
        using namespace System::Drawing;
14
        using namespace System::Threading;
15
 
16
        /// <summary>
17
        /// Summary for frmStack
18
        /// </summary>
19
        public ref class frmStack : public System::Windows::Forms::Form
20
        {
21
        public:
22
                Mutex^ mut;
23
                frmStack(Mutex^ m)
24
                {
25
                        mut = m;
26
                        InitializeComponent();
27
                        //
28
                        //TODO: Add the constructor code here
29
                        //
30 35 robfinch
                        UpdateForm();
31 32 robfinch
                }
32
 
33
        protected:
34
                /// <summary>
35
                /// Clean up any resources being used.
36
                /// </summary>
37
                ~frmStack()
38
                {
39
                        if (components)
40
                        {
41
                                delete components;
42
                        }
43
                }
44
        private: System::Windows::Forms::TextBox^  textBox1;
45
        private: System::Windows::Forms::TextBox^  textBox2;
46
        private: System::Windows::Forms::Label^  label1;
47
        private: System::Windows::Forms::Label^  label2;
48
        protected:
49
 
50
        private:
51
                /// <summary>
52
                /// Required designer variable.
53
                /// </summary>
54
                System::ComponentModel::Container ^components;
55
 
56
#pragma region Windows Form Designer generated code
57
                /// <summary>
58
                /// Required method for Designer support - do not modify
59
                /// the contents of this method with the code editor.
60
                /// </summary>
61
                void InitializeComponent(void)
62
                {
63
                        this->textBox1 = (gcnew System::Windows::Forms::TextBox());
64
                        this->textBox2 = (gcnew System::Windows::Forms::TextBox());
65
                        this->label1 = (gcnew System::Windows::Forms::Label());
66
                        this->label2 = (gcnew System::Windows::Forms::Label());
67
                        this->SuspendLayout();
68
                        // 
69
                        // textBox1
70
                        // 
71 35 robfinch
                        this->textBox1->Location = System::Drawing::Point(12, 72);
72 32 robfinch
                        this->textBox1->Multiline = true;
73
                        this->textBox1->Name = L"textBox1";
74
                        this->textBox1->ScrollBars = System::Windows::Forms::ScrollBars::Vertical;
75 35 robfinch
                        this->textBox1->Size = System::Drawing::Size(228, 432);
76 32 robfinch
                        this->textBox1->TabIndex = 0;
77
                        // 
78
                        // textBox2
79
                        // 
80 35 robfinch
                        this->textBox2->Location = System::Drawing::Point(254, 72);
81 32 robfinch
                        this->textBox2->Multiline = true;
82
                        this->textBox2->Name = L"textBox2";
83
                        this->textBox2->ScrollBars = System::Windows::Forms::ScrollBars::Vertical;
84 35 robfinch
                        this->textBox2->Size = System::Drawing::Size(228, 432);
85 32 robfinch
                        this->textBox2->TabIndex = 1;
86
                        // 
87
                        // label1
88
                        // 
89
                        this->label1->AutoSize = true;
90 35 robfinch
                        this->label1->Location = System::Drawing::Point(9, 56);
91 32 robfinch
                        this->label1->Name = L"label1";
92
                        this->label1->Size = System::Drawing::Size(61, 13);
93
                        this->label1->TabIndex = 2;
94
                        this->label1->Text = L"Stack View";
95
                        // 
96
                        // label2
97
                        // 
98
                        this->label2->AutoSize = true;
99 35 robfinch
                        this->label2->Location = System::Drawing::Point(251, 56);
100 32 robfinch
                        this->label2->Name = L"label2";
101
                        this->label2->Size = System::Drawing::Size(93, 13);
102
                        this->label2->TabIndex = 3;
103
                        this->label2->Text = L"Base Pointer View";
104
                        // 
105
                        // frmStack
106
                        // 
107
                        this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
108
                        this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
109 35 robfinch
                        this->ClientSize = System::Drawing::Size(506, 516);
110 32 robfinch
                        this->Controls->Add(this->label2);
111
                        this->Controls->Add(this->label1);
112
                        this->Controls->Add(this->textBox2);
113
                        this->Controls->Add(this->textBox1);
114
                        this->FormBorderStyle = System::Windows::Forms::FormBorderStyle::FixedSingle;
115
                        this->Name = L"frmStack";
116
                        this->Text = L"emuThor - Stack View";
117 35 robfinch
                        this->FormClosing += gcnew System::Windows::Forms::FormClosingEventHandler(this, &frmStack::frmStack_FormClosing);
118 32 robfinch
                        this->ResumeLayout(false);
119
                        this->PerformLayout();
120
 
121
                }
122
#pragma endregion
123 35 robfinch
        private: System::Void frmStack_FormClosing(System::Object^  sender, System::Windows::Forms::FormClosingEventArgs^  e) {
124
                         if (e->CloseReason==CloseReason::UserClosing)
125
                                 e->Cancel = true;
126
                         }
127
        public: void UpdateForm() {
128
                                int xx;
129
                                char buf[4000];
130
                                buf[0] = '\0';
131
                                mut->WaitOne();
132
                                for (xx = -128; xx < 128; xx+=8) {
133
                                        sprintf(&buf[strlen(buf)], "%c %08I64X: %016I64X\r\n", xx==0 ? '>' : ' ',
134
                                                system1.cpu2.GetGP(27)+xx, system1.Read(system1.cpu2.GetGP(27)+xx));
135
                                }
136
                                textBox1->Text = gcnew String(buf);
137
                                buf[0] = '\0';
138
                                for (xx = -128; xx < 128; xx+=8) {
139
                                        sprintf(&buf[strlen(buf)], "%c %08I64X: %016I64X\r\n", xx==0 ? '>' : ' ',
140
                                                system1.cpu2.GetGP(26)+xx, system1.Read(system1.cpu2.GetGP(26)+xx));
141
                                }
142
                                mut->ReleaseMutex();
143
                                textBox2->Text = gcnew String(buf);
144
                        }
145
};
146 32 robfinch
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.