|
Not unless Outlook provides an interface allowing you to do so.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Hi!
So if place try/catch block in Main() function
try{
Application.Init ();
MainWindow win = new MainWindow ();
win.Show ();
Application.Run ();
}
catch(Exception baseExc){...}
and then throw exception in button click event, this exception will not be catched! Any ideas how to do it?
|
|
|
|
|
the real question is what exactly are you trying to achieve with throwing an exception in a button click event??
|
|
|
|
|
If you're trying to write code to handle any unhandled exception cleanly, then there's an event you can connect up in your init code, which will fire for any unhandled exception in your app.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Yes, I know. But I couldn't find it. All send to Application.ThreadException but it is for WinForms. It's also not AppDomain.CurrentDomain.UnhandledException. But I find it - GLib.ExceptionManager.UnhandledException.
|
|
|
|
|
4yb@ka wrote: Any ideas how to do it?
Not this way.
As Christian has said there is an event you can subscribe for unhanded exceptions. Very cunningly they call it, UnhandledException. However, if you are trying to catch an exception from a button click it should be handled at the lowest possible level, not at the application level.
only two letters away from being an asset
|
|
|
|
|
Definitely I would handle it within the click event itself, that way it will definately catch the exception, as mark said you should always try to catch it at the lowest possible level, but never at the application level.
|
|
|
|
|
It's not for handle expected exceptions. It's need for log unhandled exceptions.
|
|
|
|
|
can anybody help me on how to get started with making a simulation software?
I want to make a 8085 simulator.
please tell me the following points
1.IS C# fully capable of doing it
2.what else do i need?
|
|
|
|
|
Hi
1. yes
2. some 10,000 lines of code; all the 8085 documentation you can get
Are you sure it is 8085 you want? that's a very old (and simple) CPU
Do you need logic simulation only? or has it to be cycle accurate too?
What kind of I/O will you need to handle? (CPU and memory is easy, I/O depends on functionality).
The hardest part is getting the condition flags (zero, overflow, ...) correct for each instruction.
Is performance relevant? Any idea what speed you want? Depending on previous answers, your slow-down will be
1000 or more.
And how do you plan to test your code?
Make sure you have sufficient programming experience and know the language well before you attempt this!
Luc Pattyn
Have a look at my entry for the lean-and-mean competition; please provide comments, feedback, discussion, and don’t forget to vote for it! Thank you.
Local announcement (Antwerp region): Lange Wapper? Neen!
|
|
|
|
|
First of all Thank you very much! Your idea is helpful.
I've decided to do 8085 CPU because it is relatively simple.
If possible I will try to make it fully functional.
The user must be able to execute step by step and see the registers and active memory contents.
Performance is greatly relevant, and the speed also has to be good.
Can you please tell me Something about how to test the code?
Can I find helpful books and sites for this project?
thank you
|
|
|
|
|
Hi,
Dagmawi alemayehu wrote: I will try to make it fully functional
- all instructions?
- instruction timing?
- cycle accurate?
- what input/output devices?
- how is code entered?
Dagmawi alemayehu wrote: how to test the code?
- good architectural design
- test with actual programs (e.g. C-code + cross-compiler)
Dagmawi alemayehu wrote: helpful books and sites?
- don't know, except for manufacturers documentation
- I did dozens of simulators, running my own operating systems and applications
Luc Pattyn
Have a look at my entry for the lean-and-mean competition; please provide comments, feedback, discussion, and don’t forget to vote for it! Thank you.
Local announcement (Antwerp region): Lange Wapper? Neen!
|
|
|
|
|
How you doing?
thank you very much once again.
You wrote an excellent article for the lean-and-mean competition;
I'm comp Engg student,I'm trying to do my final year project, that simulator is going to be my project.
I hope I would get more knowledge on it.
If you have time,Can you please give me some more information.
I'm designing the interface on C# windows application.I want to start from the instruction execution part by allowing the user to write the code and run it just like emu8086.
Can you help?
hope to hear from you soon.
|
|
|
|
|
Thanks.
I don't know emu8086, and I don't think it handles 8085.
Why do you choose 8085, it is terribly old; why not choose a microprocessor that is still in use?
I would consider one of the Microchip PICs for instance; say a 16F84.
Whatever you choose, make sure you have the development tools for it.
FYI: I've done 6502, all kinds of 6800 and 68000, some PICs, 8048, x86, NIOS2 and more.
The NIOS2 one was done in pure C# and ran one million instructions per second; it executed my own operating system and some multithreaded test applications.
Dagmawi alemayehu wrote: Can you help?
I give advice and answer specific questions. Generally I don't provide code.
Make sure you have answers to the questions I asked you before you commit.
Good luck with your project.
Luc Pattyn
Have a look at my entry for the lean-and-mean competition; please provide comments, feedback, discussion, and don’t forget to vote for it! Thank you.
Local announcement (Antwerp region): Lange Wapper? Neen!
|
|
|
|
|
thanks.
Since you first tell me about 8085 or 8086 matter I read alot and come into a conclusion that to begin working on 8086.
Now I've divided the project into phases.
my first phase is dealing with Execution of instructions. for this I need The user to write codes on multiline textbox and try to execuit the code by pressing run.
the problem startes here,I can't access Individual lines of code perfectly. Does it works this way?
|
|
|
|
|
Dagmawi alemayehu wrote: The user to write codes
Assembly language?
|
|
|
|
|
yea, I mean the assembly code
|
|
|
|
|
Normally a simulator is not involved in creating code, it should get its code from a file, that is why I warned you you would need the development tools, so they help you in creating some kind of EXE file which your simulator then can load in simulated memory for execution.
If you expect your user to enter some code in a textbox, it won't be much of a program, only a few lines, and you will never be able to prove your simulator works correctly as you won't test all instructions by entering them by hand, will you?
Luc Pattyn
Have a look at my entry for the lean-and-mean competition; please provide comments, feedback, discussion, and don’t forget to vote for it! Thank you.
Local announcement (Antwerp region): Lange Wapper? Neen!
|
|
|
|
|
thank u again.
Tell me about development tools,please.
1.what kind, where to get them and for example they include?
I don't know if I'm making u busy or not, but I really apreciate your help.
|
|
|
|
|
For microprocessor software development you need cross-development tools, they usually include a cross-compiler, optionally a cross-assembler, and a linker. There are free tools for a lot of them, typically from the chip manufacturer.
FYI: if you want to simulate all functionality of 8086, it will be very hard to do so. With all the protection modes, the memory management unit, etc. The only "advantage" it has is you could use standard tools to develop the EXE files, but then your simulator needs to load an EXE file according to the PEF format, which is a challenge as well.
Luc Pattyn
Have a look at my entry for the lean-and-mean competition; please provide comments, feedback, discussion, and don’t forget to vote for it! Thank you.
Local announcement (Antwerp region): Lange Wapper? Neen!
|
|
|
|
|
hey
how you doin?
I was just reading alot about cross-compilers.
For .NET Framework we have a tool called .NET CLR(Common language Runtime) using this we can create our own compiler,of course many other things are added.
up to this point I understand that I'm goin to create my own compiler for my custom assembly language, meaning the language that my user will type on my simulator interface, and integrate these with other functions of the simulator. (check me if this idea is right)
if the above idea is correct, I'm going to continue to the next step in the case study. I've planned to finish all the case study and project requirments,objective and scope before the actual work begins.
N.B
I have changed my username to Djtech01 (don't be confused)
|
|
|
|
|
Djtech01 wrote: I'm goin to create my own compiler
Not sure that is wise. Here is why.
You could define your own microprocessor, and create a "cross"-compiler, a linker, a simulator, a profiler, whatever tool you want, and focus them all on one and the same fictitious architecture. That would be fine; it probably would serve some academic purpose only.
Or you are aiming at a real-world microprocessor, and want to create software that works with it. In that case I recommend you take existing implementations, and then replace them one at a time with your own. Assume you create a compiler and a simulator, and you misunderstand some detail of the CPU, now both your compiler and your simulator would be wrong, but one would compensate for the other. So maybe it all would look fine, until you port yout code to the real CPU and it suddenly fails to work.
So my suggestion remains: choose a modern and popular CPU that comes with free PC-based development tools; at best also buy a little demo board so you can create, download and run some real code on the real chip. Then start your own software effort, probably a simulator first, then maybe a cross-assembler, and finally, if still necessary, your own cross-compiler.
Luc Pattyn
Have a look at my entry for the lean-and-mean competition; please provide comments, feedback, discussion, and don’t forget to vote for it! Thank you.
Local announcement (Antwerp region): Lange Wapper? Neen!
|
|
|
|
|
thank you
I'm aiming at real-world microprocessor and want to create software that work with it
So I wannt to work on my pc's cpu as a target machine (to simplify things)
I'm I right?
|
|
|
|
|
Djtech01 wrote: I'm I right?
No.
x86 isn't a simple processor; it has several operating modes, most of which you will not be able to reach when running under Windows.
You MUST make a fundamental choice:
1. target a fictitious CPU
2. target a small subset of a real CPU; that could be x86 in user mode only.
3. target a (simple but) real CPU in all its aspects
As I said I would go for 3, and start with an all-official solution: prototype board, available compiler, etc. And then create a simulator.
I will no longer repeat my point of view, this thread is now closed to me. Good luck.
Luc Pattyn
Have a look at my entry for the lean-and-mean competition; please provide comments, feedback, discussion, and don’t forget to vote for it! Thank you.
Local announcement (Antwerp region): Lange Wapper? Neen!
|
|
|
|
|
|