【问题标题】:Generate a 'Guru Meditation Error' on an Amiga在 Amiga 上生成“大师冥想错误”
【发布时间】:2016-02-27 03:28:48
【问题描述】:

任何人都可以发布一些源代码,这些源代码在编译(如果需要)和运行时会在 Amiga 上产生“Guru Meditation Error”。

汇编程序、C 或 ARexx 都可以。

谢谢。

【问题讨论】:

标签: amiga


【解决方案1】:

试试exec.libraryAlert()函数:http://amigadev.elowar.com/read/ADCD_2.1/Includes_and_Autodocs_3._guide/node01E3.html

例如(在 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 */
}

【讨论】:

    【解决方案2】:

    一个好的旧除零可以完成这项工作。

    #include <stdio.h>
    void main() {
      printf("%d", 1/0);
    };
    

    【讨论】:

    • 谢谢大家 - 这是对“代码高尔夫”上关于生成奇怪/有趣错误的一些内容的回应。我认为“大师冥想”会很重要......
    猜你喜欢
    • 2012-03-03
    • 1970-01-01
    • 2015-01-20
    • 1970-01-01
    • 2012-05-03
    • 2015-06-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多