Talk:Halt and catch fire
A bit limited ?
Is this task to be taken literally - halt the CPU - and thus only be applicable to the handful of assembly languages with samples already provided ?
Or does it mean "crash the program" by e.g. dividing by zero or asserting a false condition or raising an unhandled exception or calling exit or...
Whilst reading about the fictitios HCF instruction was entertaining, do we want to encourage people to crash their CPUs ?
--Tigerofdarkness (talk) 21:02, 12 September 2021 (UTC)
- I didn't see that the task was to halt the CPU, but to crash the (computer) program. -- Gerard Schildberger (talk) 21:09, 12 September 2021 (UTC)
- Thanks Gerard. What does your impressively minimal REXX program do ? --Tigerofdarkness (talk) 17:24, 15 September 2021 (UTC)
- It "crashes" the REXX interpreter, the messages can vary from REXX to REXX, but for Regina REXX, the output shown to my terminal (a Windows DOS "boxed" screen) is:
─────────────────────────────────────────────────────────────────────────────09/15/2021 13:21:27 c:\►regina haltfire Error 35 running "c:\haltfire.rex", line 1: Invalid expression Error 35.1: Invalid expression detected at "=" ─────────────────────────────────────────────────────────────────────────────09/15/2021 13:21:29 c:\►
--- where the 1st two lines (actually, it is one DOS prompt line that is wrapped into two lines) and --- lines 3 and 4 are the actual (two) error messages from Regina REXX, --- followed by the DOS prompt (again, it looks like two lines, but it is a single long DOS prompt that wraps. --- A different REXX interpreter should/may produce similar error messages(s).
- I could've chosen some other character, but a lone equal sign seemed (to me) a very succinct way to "crash" a REXX interpreter without use some other "special" character. -- Gerard Schildberger (talk) 18:37, 15 September 2021 (UTC)