Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Generate a 'Guru Meditation Error' on an Amiga

Tags:

amiga

Can anyone post some source code that, when compiled (if necessary) and run, will produce a 'Guru Meditation Error' on an Amiga.

Assembler, C or ARexx will do.

Thanks.

like image 836
Steve Ives Avatar asked Oct 24 '25 23:10

Steve Ives


2 Answers

Try the Alert() function of the exec.library: http://amigadev.elowar.com/read/ADCD_2.1/Includes_and_Autodocs_3._guide/node01E3.html

For instance (in C):

#include <exec/execbase.h>
#include <exec/alerts.h>

#include <clib/exec_protos.h>

void main(void) {
    Alert(ACPU_InstErr); /* or use 0x80000004 if you don't have alerts.h */

    /* might not return if it was a dead end (non-recoverable) alert */
}
like image 190
blubberdiblub Avatar answered Oct 26 '25 22:10

blubberdiblub


A good old division by zero can do the job.

#include <stdio.h>
void main() {
  printf("%d", 1/0);
};
like image 24
FredericK Avatar answered Oct 26 '25 23:10

FredericK



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!