1. Source Code Question ?
- Posted by Bernie Ryan <xotron at bluef??g.com> Jun 13, 2008
- 759 views
- Last edited Jun 14, 2008
Bernie My files in archive: WMOTOR, XMOTOR, W32ENGIN, MIXEDLIB, EU_ENGIN, WIN32ERU, WIN32API Can be downloaded here: http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=bernie+ryan
2. Re: Source Code Question ?
- Posted by Bernie Ryan <xotron at bl?efrog?com> Jun 13, 2008
- 756 views
- Last edited Jun 14, 2008
Whoops ! In file be_machine.e : This piece of code does not make sense it is always going to be included ? I also think it should have a simple user message like: " Your program is using an illegal poke or peek in a reserved memory location ! " because the average user does not know what a machine-level exception is. ------------------------------- #ifdef ERUNTIME void Machine_Handler(int sig_no) /* illegal instruction, segmentation violation */ { RTFatal("A machine-level exception occurred during execution of your program"); } #else void Machine_Handler(int sig_no) /* illegal instruction, segmentation violation */ { RTFatal("A machine-level exception occurred during execution of this statement"); } #endif ----------------------------------------------------- Bernie My files in archive: WMOTOR, XMOTOR, W32ENGIN, MIXEDLIB, EU_ENGIN, WIN32ERU, WIN32API Can be downloaded here: http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=bernie+ryan
3. Re: Source Code Question ?
- Posted by Kat <KAT12 at ?oo?ahs.net> Jun 13, 2008
- 761 views
- Last edited Jun 14, 2008
Bernie Ryan wrote: > > > Bernie > > My files in archive: > WMOTOR, XMOTOR, W32ENGIN, MIXEDLIB, EU_ENGIN, WIN32ERU, WIN32API > > Can be downloaded here: > <a > href="http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=bernie+ryan">http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=bernie+ryan</a>
4. Re: Source Code Question ?
- Posted by Bernie Ryan <xotron at bl??frog.com> Jun 13, 2008
- 743 views
- Last edited Jun 14, 2008
Bernie Ryan wrote: > > Whoops ! > > In file be_machine.e : > > This piece of code does not make sense it is always going to be included ? > > I also think it should have a simple user message like: > > " Your program is using an illegal poke or peek in a reserved > memory location ! " > > because the average user does not know what a machine-level exception is. > > ------------------------------- > > #ifdef ERUNTIME > void Machine_Handler(int sig_no) > /* illegal instruction, segmentation violation */ > { > RTFatal("A machine-level exception occurred during execution of your > program"); > } > #else > void Machine_Handler(int sig_no) > /* illegal instruction, segmentation violation */ > { > RTFatal("A machine-level exception occurred during execution of this > statement"); > } > #endif > > ----------------------------------------------------- > > That should be be_machine.c Bernie My files in archive: WMOTOR, XMOTOR, W32ENGIN, MIXEDLIB, EU_ENGIN, WIN32ERU, WIN32API Can be downloaded here: http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=bernie+ryan
5. Re: Source Code Question ?
- Posted by Matt Lewis <matthewwalkerlewis at g?ail.co?> Jun 14, 2008
- 753 views
Bernie Ryan wrote: > > Whoops ! > > In file be_machine.e : > > This piece of code does not make sense it is always going to be included ? > > I also think it should have a simple user message like: > > " Your program is using an illegal poke or peek in a reserved > memory location ! " > > because the average user does not know what a machine-level exception is. > > ------------------------------- > > #ifdef ERUNTIME > void Machine_Handler(int sig_no) > /* illegal instruction, segmentation violation */ > { > RTFatal("A machine-level exception occurred during execution of your > program"); > } > #else > void Machine_Handler(int sig_no) > /* illegal instruction, segmentation violation */ > { > RTFatal("A machine-level exception occurred during execution of this > statement"); > } > #endif When ERUNTIME is defined, it means that the backend library for translating is being built. In the translator, all sorts of crazy stuff can cause a machine-level exception that would normally be caught by the interpreter, like an index out of bounds. The translator doesn't do this sort of checking. You're assumed to have thoroughly debugged your program before you translate. And there's no way to tell which statement has caused this error. In the interpreter, however, we can tell which statement was last executed, so the message is a bit different. Matt