Inform - Support - Patches

About Patches  


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

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; But in V>=5, Inform complains about a syntax error. The only thing Inform will accept is:

  @not local1;
  @not local1 local2;

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 },


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

Last updated 17 April 2013. This web site has not been fully supported since April 2008. Information may be out of date. This page was originally managed by Roger Firth.