Inform - Support - Patches

About Patches  

Compiler  
Library  

DM4 Errata  

Issue C62105

Assembly of @not generates bad code
Submitted by: David Given     Appeared in: Compiler 6.21 or before     Fixed in: Compiler 6.30
Problem

The @not opcode has moved from V4 to V5. It was moved from a 1op to a vop instruction to make room for @call_1n (if I've read the zspec correctly). Unfortunately, Inform's assembler only got partly updated. (The expression code generator works fine.) So if you're compiling for V<=4, this:

  @not local1 -> local2;

...works. But in V>=5, Inform complains about a syntax error. The only thing Inform will accept is:

  @not local1;
  @not local1 local2;
  etc.

Unfortunately these generate duff code, to such an extent that txd locks up.

Solution (by Kevin Bracey)

Change line 331 of asm.c from

  /* 3 */ { (uchar *) "not",  5, 0, -1, 0x38,   0,  0, 0, VAR },

to

  /* 3 */ { (uchar *) "not",  5, 0, -1, 0x38,  St,  0, 0, VAR },


Last updated 17 April 2013. This site is no longer supported; information may be out of date.
Maintained as a historical archive by the Interactive Fiction Technology Foundation. Copyright 1993-2018 IFTF, CC-BY-SA unless otherwise noted.
This page was originally managed by Roger Firth.