diff -c inform63-sv/asm.c inform63-tmp/asm.c *** inform63-sv/asm.c 2006-11-04 19:50:30.000000000 -0500 --- inform63-tmp/asm.c 2007-02-04 20:51:14.000000000 -0500 *************** *** 41,46 **** --- 41,48 ---- int uses_unicode_features; /* Makes use of Glulx Unicode (3.0) features? */ + int uses_memheap_features; /* Makes use of Glulx mem/heap (3.1) + features? */ dbgl debug_line_ref; /* Source code ref of current statement */ *************** *** 300,305 **** --- 302,308 ---- /* Glulx: (bit flags for Glulx VM features) */ #define GOP_Unicode 1 /* uses_unicode_features */ + #define GOP_MemHeap 2 /* uses_memheap_features */ /* Codes for the number of operands */ *************** *** 562,567 **** --- 565,574 ---- { (uchar *) "callfii", 0x0162, St, 0, 4 }, { (uchar *) "callfiii", 0x0163, St, 0, 5 }, { (uchar *) "streamunichar", 0x73, 0, GOP_Unicode, 1 }, + { (uchar *) "mzero", 0x170, 0, GOP_MemHeap, 2 }, + { (uchar *) "mcopy", 0x171, 0, GOP_MemHeap, 3 }, + { (uchar *) "malloc", 0x178, St, GOP_MemHeap, 2 }, + { (uchar *) "mfree", 0x179, 0, GOP_MemHeap, 1 }, }; static opcodeg custom_opcode_g; *************** *** 989,994 **** --- 996,1004 ---- if (opco.op_rules & GOP_Unicode) { uses_unicode_features = TRUE; } + if (opco.op_rules & GOP_MemHeap) { + uses_memheap_features = TRUE; + } no_operands_given = AI->operand_count; *************** *** 2903,2908 **** --- 2913,2919 ---- for (i=0;i<16;i++) flags2_requirements[i]=0; uses_unicode_features = FALSE; + uses_memheap_features = FALSE; sequence_point_follows = TRUE; label_moved_error_already_given = FALSE; diff -c inform63-sv/files.c inform63-tmp/files.c *** inform63-sv/files.c 2006-11-04 19:50:30.000000000 -0500 --- inform63-tmp/files.c 2007-02-04 20:47:05.000000000 -0500 *************** *** 507,512 **** --- 507,515 ---- if (no_unicode_chars != 0 || (uses_unicode_features)) { VersionNum = 0x00030000; } + if (uses_memheap_features) { + VersionNum = 0x00030100; + } /* And check if the user has requested a specific version. */ if (requested_glulx_version) { diff -c inform63-sv/header.h inform63-tmp/header.h *** inform63-sv/header.h 2006-11-04 19:50:30.000000000 -0500 --- inform63-tmp/header.h 2007-02-04 21:28:34.000000000 -0500 *************** *** 1118,1123 **** --- 1118,1127 ---- #define callfii_gc 78 #define callfiii_gc 79 #define streamunichar_gc 80 + #define mzero_gc 81 + #define mcopy_gc 82 + #define malloc_gc 83 + #define mfree_gc 84 #define SYMBOL_TT 0 /* value = index in symbol table */ #define NUMBER_TT 1 /* value = the number */ *************** *** 1994,2000 **** extern int32 no_instructions; extern int sequence_point_follows; ! extern int uses_unicode_features; extern dbgl debug_line_ref; extern int execution_never_reaches_here; extern int *variable_usage; --- 1998,2004 ---- extern int32 no_instructions; extern int sequence_point_follows; ! extern int uses_unicode_features, uses_memheap_features; extern dbgl debug_line_ref; extern int execution_never_reaches_here; extern int *variable_usage; diff -c inform63-sv/lexer.c inform63-tmp/lexer.c *** inform63-sv/lexer.c 2006-11-04 19:50:30.000000000 -0500 --- inform63-tmp/lexer.c 2007-02-04 21:27:35.000000000 -0500 *************** *** 265,270 **** --- 265,271 ---- "linearsearch", "binarysearch", "linkedsearch", "callf", "callfi", "callfii", "callfiii", "streamunichar", + "mzero", "mcopy", "malloc", "mfree", "" };