home *** CD-ROM | disk | FTP | other *** search
/ RISC DISC 1 / RISC_DISC_1.iso / pd_share / games / inform / compiler / source / h / header
Encoding:
Text File  |  1994-10-14  |  46.6 KB  |  1,121 lines

  1. /* ------------------------------------------------------------------------- */
  2. /*   Header file for Inform:  Infocom game ("Z-code") compiler               */
  3. /*   (should be #included in the others)                                     */
  4. /*                                                                           */
  5. /*   Inform 5   revision 5.4                                                 */
  6. /*                                                                           */
  7. /*   This header file and the others making up the Inform source code are    */
  8. /*   copyright (c) Graham Nelson 1993, 1994                                  */
  9. /*                                                                           */
  10. /*   Manuals for this language are available from the if-archive at          */
  11. /*   ftp.gmd.de.                                                             */
  12. /*   For notes on how this program may legally be used, see the Designer's   */
  13. /*   Manual introduction.  (Any recreational use is fine, and so is some     */
  14. /*   commercial use.)  There is also a Technical Manual which may be of      */
  15. /*   interest to porters and hackers but probably not Inform programmers.    */
  16. /* ------------------------------------------------------------------------- */
  17.  
  18. #define RELEASE_STRING "Release 5.4 (October 14th 1994)"
  19. #define RELEASE_NUMBER 1404
  20.  
  21. /* ------------------------------------------------------------------------- */
  22. /*   Our machine for today is...                                             */
  23. /*                                                                           */
  24. /*   [ Inform should compile (possibly with warnings) and work safely        */
  25. /*     if you just:                                                          */
  26. /*                                                                           */
  27. /*     #define AMIGA       -  for the Commodore Amiga under SAS/C            */
  28. /*     #define ARCHIMEDES  -  for the Acorn Archimedes under Norcroft C      */
  29. /*     #define ATARIST     -  for the Atari ST                               */
  30. /*     #define LINUX       -  for Linux under gcc (essentially as Unix)      */
  31. /*     #define MACINTOSH   -  for the Apple Macintosh under Think C          */
  32. /*     #define OS2         -  for OS/2 32-bit mode under IBM's C Set++       */
  33. /*     #define PC          -  for 386+ IBM PCs, eg. Microsoft Visual C/C++   */
  34. /*     #define PC_QUICKC   -  for small IBM PCs under QuickC                 */
  35. /*     #define UNIX        -  for Unix under gcc (or big IBM PC under djgpp) */
  36. /*     #define VAX         -  for VAX mainframes under Digital's VAX C       */
  37. /*                                                                           */
  38. /*     See the notes below.  Executables may already be available by ftp.]   */
  39. /*                                                                           */
  40. /*   (If no machine is defined, then cautious #defines will be made.)        */
  41. /* ------------------------------------------------------------------------- */
  42.  
  43. #define GRAHAM
  44.  
  45. /* ------------------------------------------------------------------------- */
  46. /*   The other #definable options (some of them set by the above) are:       */
  47. /*                                                                           */
  48. /*   USE_TEMPORARY_FILES - use scratch files for workspace, not memory       */
  49. /*   PROMPT_INPUT        - prompt input (don't use Unix-style command line)  */
  50. /*   TIME_UNAVAILABLE    - don't use ANSI time routines to work out today's  */
  51. /*                         date                                              */
  52. /*   US_POINTERS         - make some of the checksum routine pointers        */
  53. /*                         unsigned char *'s, not char *'s: this should be   */
  54. /*                         used if your compiler does un-ANSI things with    */
  55. /*                         casts between these types                         */
  56. /* ------------------------------------------------------------------------- */
  57. /*   Hello, Porter!                                                          */
  58. /*   For notes on making a new port of Inform, see the Technical Manual.     */
  59. /* ------------------------------------------------------------------------- */
  60. /*   ARCHIMEDES "port" (the original)                                        */
  61. /*     ...incorporates three Archimedes-only #define'able options:           */
  62. /*                                                                           */
  63. /*   ARC_PROFILING       - do clumsy profiling                               */
  64. /*   ARC_THROWBACK       - compile to be useful under the DDE as well as the */
  65. /*                         command line, including throwback of errors into  */
  66. /*                         !SrcEdit (code donated by Robin Watts)            */
  67. /*   GRAHAM              - for Graham's machine only                         */
  68. /*                                                                           */
  69. /*   (link with ansilib only, not RISC_OSlib)                                */
  70. /* ------------------------------------------------------------------------- */
  71. /*   UNIX port (by Dilip Sequeira):  A "vanilla" makefile for gcc is:        */
  72. /*                                                                           */
  73. /*     OBJECTS = files.o asm.o inputs.o symbols.o zcode.o tables.o inform.o  */
  74. /*               express.o                                                   */
  75. /*     CC = gcc                                                              */
  76. /*     CFLAGS = -O2 -finline-functions -fomit-frame-pointer                  */
  77. /*                                                                           */
  78. /*     inform: $(OBJECTS)                                                    */
  79. /*      $(CC) -o inform $(OBJECTS)                                           */
  80. /*                                                                           */
  81. /*     $(OBJECTS): header.h Makefile                                         */
  82. /*                                                                           */
  83. /*   (making an executable of size about 100K on a SparcStation II).         */
  84. /*   The temporary files option is not on by default, but if it is used,     */
  85. /*     file names are used which contain the process ID.                     */
  86. /* ------------------------------------------------------------------------- */
  87. /*   AMIGA port (by Christopher A. Wichura)                                  */
  88. /*                                                                           */
  89. /*     (Because of the way this compiler handles unsigned char *'s the       */
  90. /*        #define AMIGA option forces #define US_POINTERS.)                  */
  91. /*                                                                           */
  92. /*     "I am compiling with SAS/C v6.51.  To support building a GST file     */
  93. /*     (essentially a pre-compiled header file), I had to add the file       */
  94. /*     amiheadermaker.c, which I have also included.  Finally, I am also     */
  95. /*     including a copy of the SCOPTIONS file."                              */
  96. /*                                                                           */
  97. /*      --- BEGIN smakefile ---                                              */
  98. /*      # smake file for Inform, the Infocom compiler                        */
  99. /*      # created 1/24/94 by Christopher A. Wichura (caw@miroc.chi.il.us)    */
  100. /*                                                                           */
  101. /*      PROGNAME = Inform                                                    */
  102. /*                                                                           */
  103. /*      CFLAGS = nostkchk strmerge parms=reg utillib optimize                */
  104. /*      LFLAGS = smallcode smalldata stripdebug                              */
  105. /*                                                                           */
  106. /*      HDR = $(PROGNAME).gst                                                */
  107. /*                                                                           */
  108. /*      OBJS = asm.o files.o inform.o inputs.o symbols.o tables.o zcode.o    */
  109. /*             express.o                                                     */
  110. /*      LIBS = LIB:sc.lib LIB:debug.lib LIB:amiga.lib                        */
  111. /*                                                                           */
  112. /*      .c.o                                                                 */
  113. /*       sc $(CFLAGS) gst=$(HDR) $*                                          */
  114. /*                                                                           */
  115. /*      $(PROGNAME): $(OBJS)                                                 */
  116. /*       slink with lib:utillib.with <WITH < (withfile.lnk)                  */
  117. /*      FROM LIB:cres.o $(OBJS)                                              */
  118. /*      TO $(PROGNAME)                                                       */
  119. /*      LIB $(LIBS)                                                          */
  120. /*      $(LFLAGS)                                                            */
  121. /*      MAP $(PROGNAME).map fhlsx plain                                      */
  122. /*      <                                                                    */
  123. /*                                                                           */
  124. /*      # clean target                                                       */
  125. /*      clean:                                                               */
  126. /*       delete \#?.o $(PROGNAME).gst $(PROGNAME).map                        */
  127. /*                                                                           */
  128. /*      # dependancies of various modules                                    */
  129. /*      $(HDR): header.h                                                     */
  130. /*       sc $(CFLAGS) noobjname makegst=$(HDR) amiheadermaker.c              */
  131. /*                                                                           */
  132. /*      asm.o: asm.c $(HDR)                                                  */
  133. /*                                                                           */
  134. /*      files.o: files.c $(HDR)                                              */
  135. /*                                                                           */
  136. /*      inform.o: inform.c $(HDR)                                            */
  137. /*                                                                           */
  138. /*      express.o: express.c $(HDR)                                          */
  139. /*                                                                           */
  140. /*      inputs.o: inputs.c $(HDR)                                            */
  141. /*                                                                           */
  142. /*      symbols.o: symbols.c $(HDR)                                          */
  143. /*                                                                           */
  144. /*      tables.o: tables.c $(HDR)                                            */
  145. /*                                                                           */
  146. /*      zcode.o: zcode.c $(HDR)                                              */
  147. /*                                                                           */
  148. /*      --- END smakefile ---                                                */
  149. /*                                                                           */
  150. /*      --- BEGIN amiheadermaker.c ---                                       */
  151. /*      // file used to build the Amiga GST file.                            */
  152. /*      #include "header.h"                                                  */
  153. /*                                                                           */
  154. /*      --- END amiheadermaker.c ---                                         */
  155. /*                                                                           */
  156. /*      --- BEGIN SCOPTIONS                                                  */
  157. /*      MemorySize=HUGE                                                      */
  158. /*      IncludeDir=SINCLUDE:                                                 */
  159. /*      OptimizerComplexity=15                                               */
  160. /*      OptimizerDepth=5                                                     */
  161. /*      OptimizerRecurDepth=15                                               */
  162. /*      OptimizerSchedule                                                    */
  163. /*      OptimizerInLocal                                                     */
  164. /*      Verbose                                                              */
  165. /*      --- END SCOPTIONS                                                    */
  166. /*                                                                           */
  167. /* ------------------------------------------------------------------------- */
  168. /*   Microsoft Visual C/C++ port (for the PC) (by Toby Nelson)               */
  169. /*                                                                           */
  170. /*  "The following makefile is for the "Microsoft Visual C++ V1.00"          */
  171. /*  development environment, of which the important bit is the "Microsoft    */
  172. /*  C/C++ Optimizing Compiler Version 8.00". It may well work for previous   */
  173. /*  versions of the compiler too.                                            */
  174. /*                                                                           */
  175. /*        CFLAGS = /nologo /Ox /W0 /AL                                       */
  176. /*        goal: inform.exe                                                   */
  177. /*                                                                           */
  178. /*        .obj: .c                                                           */
  179. /*        cl *.c                                                             */
  180. /*                                                                           */
  181. /*        inform.exe: asm.obj files.obj inform.obj inputs.obj symbols.obj \  */
  182. /*            tables.obj zcode.obj express.obj                               */
  183. /*        link /STACK:16384 asm files inform inputs symbols tables \         */
  184. /*            zcode express, inform.exe,,llibce.lib,,                        */
  185. /*                                                                           */
  186. /*  (NB: The compiler options used here are:                                 */
  187. /*                                                                           */
  188. /*        /nologo = no copyright message,                                    */
  189. /*        /Ox = optimize for speed,                                          */
  190. /*        /W0 = turn off all compiler warnings, and                          */
  191. /*        /AL = compile for the large memory model.)"                        */
  192. /*                                                                           */
  193. /* ------------------------------------------------------------------------- */
  194. /*   Quick C port (for the PC) (by Bob Newell): Makefile...                  */
  195. /*                                                                           */
  196. /*        CFLAGS =   /DPC_QUICKC /AL  /DLAMER                                */
  197. /*        CC = qcl                                                           */
  198. /*                                                                           */
  199. /*        inform.exe:  asm.obj files.obj inform.obj inputs.obj symbols.obj \ */
  200. /*            tables.obj zcode.obj express.obj                               */
  201. /*            qlink /STACK:16384 asm.obj files.obj inform.obj inputs.obj \   */
  202. /*             symbols.obj tables.obj zcode.obj express.obj, inform.exe,, \  */
  203. /*             llibce.lib,,                                                  */
  204. /* ------------------------------------------------------------------------- */
  205. /*   Atari ST port (by Charles Briscoe-Smith): Makefile...                   */
  206. /*                                                                           */
  207. /*        OBJS = files.o asm.o inputs.o symbols.o zcode.o tables.o inform.o  */
  208. /*               express.o                                                   */
  209. /*                                                                           */
  210. /*        CC = gcc                                                           */
  211. /*                                                                           */
  212. /*        # I didn't use the optimisation flags, because of memory shortage. */
  213. /*        # If you have enough memory, try uncommenting the "CFLAGS=" line.  */
  214. /*                                                                           */
  215. /*        #CFLAGS = -O2 -finline-functions -fomit-frame-pointer              */
  216. /*                                                                           */
  217. /*        inform.ttp : $(OBJS)                                               */
  218. /*              $(CC) $(CFLAGS) -o inform.ttp $(OBJS)                        */
  219. /*                                                                           */
  220. /*        $(OBJS): header.h                                                  */
  221. /*                                                                           */
  222. /*   This port contains a TOSFS option: if defined, then temporary files are */
  223. /*   named in DOS style, and if not then in Unix style (in any case, this    */
  224. /*   only matters if USE_TEMPORARY_FILES is set).                            */
  225. /* ------------------------------------------------------------------------- */
  226. /*   OS/2 port (by John W. Kennedy):                                         */
  227. /*                                                                           */
  228. /*   "The program compiles and runs correctly as-is... I found it convenient */
  229. /*   to create a dummy h.version file, to prevent problems with makemake.    */
  230. /*   Since the file is not actually used, the contents don't matter...       */
  231. /*   ...it can be assumed that later this year it [Inform] will port         */
  232. /*   successfully to WorkPlace OS on the PowerPC, as well."                  */
  233. /* ------------------------------------------------------------------------- */
  234. /*   Makefile for Linux (by Spedge, aka Dark Mage)                           */
  235. /*                                                                           */
  236. /*    CC      = gcc                                                          */
  237. /*    CFLAGS  = -Dlinux                                                      */
  238. /*    LDFLAGS =                                                              */
  239. /*    LIBS    =                                                              */
  240. /*                                                                           */
  241. /*    PROG    = inform                                                       */
  242. /*    SUBDIRS = data                                                         */
  243. /*    BINDIR  = /usr/local/games/infocom                                     */
  244. /*    DATADIR = /usr/local/games/infocom/data                                */
  245. /*    MANDIR  = /usr/local/man/man1                                          */
  246. /*    INSTALL = install                                                      */
  247. /*    RM      = rm                                                           */
  248. /*    CD      = cd                                                           */
  249. /*    CP      = cp                                                           */
  250. /*                                                                           */
  251. /*    INC     = header.h                                                     */
  252. /*    OBJS    = inform.o asm.o inputs.o files.o symbols.o tables.o zcode.o   */
  253. /*              express.o                                                    */
  254. /*                                                                           */
  255. /*    all: $(PROG)                                                           */
  256. /*                                                                           */
  257. /*    inform : $(OBJS)                                                       */
  258. /*            $(CC) -o $(PROG) $(LDFLAGS) $(OBJS) $(LIBS)                    */
  259. /*                                                                           */
  260. /*    $(OBJS) : $(INC)                                                       */
  261. /*                                                                           */
  262. /*    install: $(PROG)                                                       */
  263. /*            $(INSTALL) $(PROG) $(BINDIR)                                   */
  264. /*      @for d in $(SUBDIRS); do (cd $$d && $(MAKE) install) || exit; done   */
  265. /*                                                                           */
  266. /*    install.man:                                                           */
  267. /*            $(CP) $(PROG).1 $(MANDIR)                                      */
  268. /*                                                                           */
  269. /*    clean :                                                                */
  270. /*            $(RM) -f *.o $(PROG)                                           */
  271. /*                                                                           */
  272. /* ------------------------------------------------------------------------- */
  273. /*   Apple Macintosh port (by Robert Pelak):                                 */
  274. /*                                                                           */
  275. /*     "As for my compiler, I used THINK C 5.0.  Actually, this is an old    */
  276. /*      compiler, as they are up to version 7.0 now.  I've tested the        */
  277. /*      program primarily in a System 6.0.8 environment, but I've also done  */
  278. /*      some testing on a friend's computer who has upgraded to System 7.1.  */
  279. /*      I did not use any special options, just the console routines that    */
  280. /*      THINK C will automatically invoke when it encounters a reference to  */
  281. /*      stdout, and no windows have been set up."                            */
  282. /* ------------------------------------------------------------------------- */
  283. /*                                                                           */
  284. /*   The modification history and source code map have been moved to the     */
  285. /*   Technical Manual.                                                       */
  286. /*                                                                           */
  287. /* ------------------------------------------------------------------------- */
  288.  
  289. #define ALLOCATE_BIG_ARRAYS
  290.  
  291. #define LARGE_SIZE   1
  292. #define SMALL_SIZE   2
  293.  
  294. /* ------------------------------------------------------------------------- */
  295. /*   By setting up the prefixes and extensions in the definitions below, you */
  296. /*   should be able to get something sensible for your filing system.        */
  297. /*   In the last resort, the clumsy "z3" or "z5" prefixes below are chosen   */
  298. /*   to cause least offense to different filing systems.                     */
  299. /*   Note that if both Code_Prefix and Code_Extension are empty, then Inform */
  300. /*   may overwrite its source code with the object code... so don't allow    */
  301. /*   this.                                                                   */
  302. /*   (For Unix and PCs the extension is ".z3" or ".z5" rather than ".zip"    */
  303. /*   to avoid looking like the file compression trailer...)                  */
  304. /*                                                                           */
  305. /* ------------------------------------------------------------------------- */
  306.  
  307. #ifdef GRAHAM
  308. #define ARCHIMEDES
  309. #define DEFAULT_MEMORY_SIZE LARGE_SIZE
  310. #define ARC_THROWBACK
  311. #endif
  312.  
  313. #define VNUMBER RELEASE_NUMBER
  314.  
  315. #ifdef ARCHIMEDES
  316. #define MACHINE_STRING   "Archimedes"
  317. #define Source_Prefix    "Zcode."
  318. #define Source_Extension ""
  319. #define Include_Prefix   "Zcode.h."
  320. #define Code_Prefix      "Zgames."
  321. #define Code_Extension   ""
  322. #define Transcript_Name  "Game_Text"
  323. #define Debugging_Name   "Game_Debug"
  324. #define USE_TEMPORARY_FILES
  325. #define Temp1_Name temporary_name(1)
  326. #define Temp2_Name temporary_name(2)
  327. #ifdef ARC_PROFILING
  328.      extern int _fmapstore(char *);
  329. #endif
  330. #endif
  331.  
  332. #ifdef UNIX
  333. #define MACHINE_STRING   "Unix"
  334. #define Source_Prefix    ""
  335. #define Source_Extension ".inf"
  336. #define Include_Extension ".h"
  337. #define Code_Prefix      ""
  338. #define Code_Extension   ".z3"
  339. #define V5Code_Extension ".z5"
  340. #define Transcript_Name "game.txt"
  341. #define Debugging_Name  "game.dbg"
  342. extern char Temp1_Name[], Temp2_Name[];
  343. #define Temp1_Hdr "/tmp/InformTemp1"
  344. #define Temp2_Hdr "/tmp/InformTemp2"
  345. #define DEFAULT_MEMORY_SIZE LARGE_SIZE
  346. #define US_POINTERS
  347. #endif
  348.  
  349. #ifdef LINUX
  350. #define MACHINE_STRING   "Linux"
  351. #define Source_Prefix    ""
  352. #define Source_Extension ".inf"
  353. #define Include_Extension ".h"
  354. #define Code_Prefix      ""
  355. #define Code_Extension   ".z3"
  356. #define V5Code_Extension ".z5"
  357. #define Transcript_Name "game.txt"
  358. #define Debugging_Name  "game.dbg"
  359. extern char *Temp1_Name, *Temp2_Name;
  360. #define Temp1_Hdr "/tmp/InformTemp1"
  361. #define Temp2_Hdr "/tmp/InformTemp2"
  362. #define DEFAULT_MEMORY_SIZE LARGE_SIZE
  363. #endif
  364.  
  365. #ifdef PC_QUICKC
  366. #define PC
  367. #endif
  368.  
  369. #ifdef PC
  370. #define MACHINE_STRING   "PC"
  371. #define Source_Prefix    ""
  372. #define Source_Extension ".inf"
  373. #define Include_Extension ".h"
  374. #define Code_Prefix      ""
  375. #define Code_Extension   ".z3"
  376. #define V5Code_Extension ".z5"
  377. #define Temp1_Name "Inftmp1.tmp"
  378. #define Temp2_Name "Inftmp2.tmp"
  379. #define Transcript_Name "game.txt"
  380. #define Debugging_Name  "game.dbg"
  381. #define USE_TEMPORARY_FILES
  382. #define US_POINTERS
  383. #endif
  384.  
  385. #ifdef VAX
  386. #define PROMPT_INPUT
  387. #define TIME_UNAVAILABLE
  388. #define MACHINE_STRING   "VAX"
  389. #define Source_Prefix    ""
  390. #define Source_Extension ".inf"
  391. #define Include_Extension ".h"
  392. #define Code_Prefix      ""
  393. #define Code_Extension   ".zip"
  394. #define Transcript_Name "game.txt"
  395. #define Debugging_Name  "game.dbg"
  396. #define Temp1_Name "Inftmp1.tmp"
  397. #define Temp2_Name "Inftmp2.tmp"
  398. #endif
  399.  
  400. #ifdef AMIGA
  401. #define MACHINE_STRING   "Amiga"
  402. #define Source_Prefix    ""
  403. #define Source_Extension ".inf"
  404. #define Include_Extension ".h"
  405. #define Code_Prefix      ""
  406. #define Code_Extension   ".z3"
  407. #define V5Code_Extension ".z5"
  408. #define Transcript_Name "game.txt"
  409. #define Debugging_Name  "game.dbg"
  410. extern char Temp1_Name[], Temp2_Name[];
  411. #define Temp1_Hdr "T:InformTemp1"
  412. #define Temp2_Hdr "T:InformTemp2"
  413. #define __USE_SYSBASE
  414. #include <proto/exec.h>
  415. #define US_POINTERS
  416. #define DEFAULT_MEMORY_SIZE LARGE_SIZE
  417. #endif
  418.  
  419. #ifdef ATARIST
  420. #define MACHINE_STRING   "Atari ST"
  421. #define Source_Prefix    ""
  422. #define Source_Extension ".inf"
  423. #define Include_Extension ".h"
  424. #define Code_Prefix      ""
  425. #define Code_Extension   ".z3"
  426. #define V5Code_Extension ".z5"
  427. #define Transcript_Name "game.txt"
  428. #define Debugging_Name  "game.dbg"
  429. #ifdef TOSFS
  430. #define Temp1_Name "Inftmp1.tmp"
  431. #define Temp2_Name "Inftmp2.tmp"
  432. #else
  433. char Temp1_Name[50], Temp2_Name[50];
  434. #define Temp1_Hdr "/tmp/InformTemp1"
  435. #define Temp2_Hdr "/tmp/InformTemp2"
  436. #endif
  437. #endif /* ATARIST */
  438.  
  439. #ifdef OS2
  440. #define MACHINE_STRING   "OS/2"
  441. #define Source_Prefix    ""
  442. #define Source_Extension ".inf"
  443. #define Include_Extension ".h"
  444. #define Code_Prefix      ""
  445. #define Code_Extension   ".z3"
  446. #define V5Code_Extension ".z5"
  447. #define Temp1_Name "Inftemp1"
  448. #define Temp2_Name "Inftemp2"
  449. #define Transcript_Name "game.txt"
  450. #define Debugging_Name  "game.dbg"
  451. #endif
  452.  
  453. #ifdef MACINTOSH
  454. #define MACHINE_STRING   "Macintosh"
  455. #define Source_Prefix    ""
  456. #define Source_Extension ".inf"
  457. #define Include_Extension ".h"
  458. #define Code_Prefix      ""
  459. #define Code_Extension   ".z3"
  460. #define V5Code_Extension ".z5"
  461. #define Temp1_Name "Inftemp1"
  462. #define Temp2_Name "Inftemp2"
  463. #define Transcript_Name "game.text"
  464. #define Debugging_Name  "game.debug"
  465. #define PROMPT_INPUT
  466. #endif
  467.  
  468. /* Default settings: */
  469.  
  470. #ifndef Source_Prefix
  471. #define Source_Prefix    ""
  472. #define Source_Extension ""
  473. #define Code_Prefix      "z3"
  474. #define V5Code_Prefix    "z5"
  475. #define Code_Extension   ""
  476. #define Temp1_Name "Inftemp1"
  477. #define Temp2_Name "Inftemp2"
  478. #endif
  479.  
  480. #ifndef Include_Prefix
  481. #define Include_Prefix Source_Prefix
  482. #endif
  483. #ifndef Include_Extension
  484. #define Include_Extension Source_Extension
  485. #endif
  486.  
  487. #ifndef V5Code_Prefix
  488. #define V5Code_Prefix Code_Prefix
  489. #endif
  490. #ifndef V5Code_Extension
  491. #define V5Code_Extension Code_Extension
  492. #endif
  493.  
  494. #ifndef Transcript_Name
  495. #define Transcript_Name "thetext"
  496. #endif
  497.  
  498. #ifndef Debugging_Name
  499. #define Debugging_Name "debuginf"
  500. #endif
  501.  
  502. #ifndef DEFAULT_MEMORY_SIZE
  503. #define DEFAULT_MEMORY_SIZE SMALL_SIZE
  504. #endif
  505.  
  506. /* ------------------------------------------------------------------------- */
  507. /*   Inclusions and some macro definitions...                                */
  508. /*   (At this point in earlier releases, there were many #define's for       */
  509. /*    memory limits and sizes of arrays: see "files" for the new code.)      */
  510. /* ------------------------------------------------------------------------- */
  511.  
  512. #include <stdio.h>
  513. #include <stdlib.h>
  514. #include <ctype.h>
  515. #include <string.h>
  516. #include <time.h>
  517. #include <limits.h>
  518.  
  519. #define  MAX_ERRORS 100
  520. #define  MAX_BLOCK_NESTING 32
  521. #define  MAX_EXPRESSION_BRACKETS 32
  522. #define  MAX_ARITY 5
  523. #define  MAX_IFDEF_DEPTH 32
  524. #define  MAX_IDENTIFIER_LENGTH 32
  525. #define  MAX_ABBREV_LENGTH 64
  526. #define  MAX_INCLUSION_DEPTH 4
  527.  
  528. /* ------------------------------------------------------------------------- */
  529. /*   Twisting the C compiler's arm to get a convenient 32-bit integer type   */
  530. /*   Warning: chars are presumed unsigned in this code, which I think is     */
  531. /*   ANSI std; but they were presumed signed by K&R, so confusion reigns.    */
  532. /*   Anyway a compiler ought to be able to cast either way as needed.        */
  533. /*   Subtracting pointers is in a macro here for convenience: if even 32 bit */
  534. /*   ints won't reliably hold pointers on your machine, rewrite properly     */
  535. /*   using ptrdiff_t                                                         */
  536. /* ------------------------------------------------------------------------- */
  537.  
  538. #ifndef VAX
  539. #if   SCHAR_MAX >= 0x7FFFFFFFL && SCHAR_MIN <= -0x7FFFFFFFL
  540.       typedef signed char       int32; 
  541.       typedef unsigned char     uint32; 
  542. #elif SHRT_MAX >= 0x7FFFFFFFL  && SHRT_MIN <= -0x7FFFFFFFL
  543.       typedef signed short int  int32;
  544.       typedef unsigned short int uint32;
  545. #elif INT_MAX >= 0x7FFFFFFFL   && INT_MIN <= -0x7FFFFFFFL
  546.       typedef signed int        int32;
  547.       typedef unsigned int      uint32;
  548. #elif LONG_MAX >= 0x7FFFFFFFL  && LONG_MIN <= -0x7FFFFFFFL
  549.       typedef signed long int   int32;
  550.       typedef unsigned long int uint32;
  551. #else
  552.       #error No type large enough to support 32-bit integers.
  553. #endif
  554. #else
  555.       typedef int int32;
  556.       typedef unsigned int uint32;
  557. #endif
  558.  
  559. #ifdef PC_QUICKC
  560.     void _huge * halloc(long, size_t);
  561.     void hfree(void *);
  562. #define subtract_pointers(p1,p2) (long)((char _huge *)p1-(char _huge *)p2)
  563. #else
  564. #define subtract_pointers(p1,p2) (((int32) p1)-((int32) p2))
  565. #endif
  566.  
  567. #ifdef US_POINTERS
  568.     typedef unsigned char zip;
  569. #else
  570.     typedef char zip;
  571. #endif
  572.  
  573. extern int BUFFER_LENGTH;
  574. extern int MAX_QTEXT_SIZE;
  575. extern int MAX_SYMBOLS;
  576. extern int MAX_BANK_SIZE;
  577. extern int SYMBOLS_CHUNK_SIZE;
  578. extern int BANK_CHUNK_SIZE;
  579. extern int HASH_TAB_SIZE;
  580.  
  581. extern int MAX_OBJECTS;
  582.  
  583. extern int MAX_ACTIONS;
  584. extern int MAX_ADJECTIVES;
  585. extern int MAX_DICT_ENTRIES;
  586. extern int MAX_STATIC_DATA;
  587.  
  588. extern int MAX_TOKENS;
  589. extern int MAX_OLDEPTH;
  590. extern int MAX_ROUTINES;
  591. extern int MAX_GCONSTANTS;
  592.  
  593. extern int MAX_PROP_TABLE_SIZE;
  594.  
  595. extern int MAX_FORWARD_REFS;
  596.  
  597. extern int STACK_SIZE;
  598. extern int STACK_LONG_SLOTS;
  599. extern int STACK_SHORT_LENGTH;
  600.  
  601. extern int MAX_ABBREVS;
  602.  
  603. extern int MAX_EXPRESSION_NODES;
  604. extern int MAX_VERBS;
  605.  
  606. extern int32 MAX_STATIC_STRINGS;
  607. extern int32 MAX_ZCODE_SIZE;
  608.  
  609. extern int MAX_LOW_STRINGS;
  610.  
  611. extern int32 MAX_TRANSCRIPT_SIZE;
  612.  
  613. extern int MAX_CLASSES;
  614. extern int MAX_CLASS_TABLE_SIZE;
  615.  
  616. /* ------------------------------------------------------------------------- */
  617. /*   If your compiler doesn't recognise \t, and you use ASCII, you could     */
  618. /*   define T_C as (char) 9; failing that, it _must_ be defined as a space   */
  619. /*   and is _not_ allowed to be 0 or any recognisable character.             */
  620. /* ------------------------------------------------------------------------- */
  621.  
  622. #define TAB_CHARACTER '\t'
  623.  
  624. /* ------------------------------------------------------------------------- */
  625. /*  This hideous line is here only for checking on my machine that Inform    */
  626. /*  runs properly when int is 16-bit                                         */
  627. /* ------------------------------------------------------------------------- */
  628.  
  629. /* #define int short int */
  630.  
  631. /* ------------------------------------------------------------------------- */
  632. /*   Structure definitions (there are a few others local to files)           */
  633. /* ------------------------------------------------------------------------- */
  634.  
  635. typedef struct sourcefile
  636. {   FILE *handle;
  637.     char filename[64];
  638.     int  source_line;
  639.     int  sys_flag;
  640.     int  file_no;
  641.     int32 chars_read;
  642.     int32 line_start;
  643. } Sourcefile;
  644.  
  645. typedef struct opcode
  646. {   char *name;
  647.     int code;
  648.     int32 offset;
  649.     int type1, type2, no;
  650. } opcode;
  651.  
  652. typedef struct operand_t
  653. {   int32 value; int type;
  654. } operand_t;
  655.  
  656. typedef struct verbl {
  657.     unsigned char e[8];
  658. } verbl;
  659.  
  660. #define MAX_LINES_PER_VERB 16
  661.  
  662. typedef struct verbt {
  663.     int lines;
  664.     verbl l[MAX_LINES_PER_VERB];
  665. } verbt;
  666.  
  667. typedef struct prop {
  668.     unsigned char l, num, p[64];
  669. } prop;
  670.  
  671. typedef struct propt {
  672.     char l;
  673.     prop pp[32];
  674. } propt;
  675.  
  676. typedef struct fpropt {
  677.     unsigned char atts[6];
  678.     char l;
  679.     prop pp[32];
  680. } fpropt;
  681.  
  682. typedef struct objectt {
  683.     unsigned char atts[6];
  684.     int parent, next, child;
  685.     int propsize;
  686. } objectt;
  687.  
  688. typedef struct dict_word {
  689.     unsigned char b[6];
  690. } dict_word;
  691.  
  692. /* ------------------------------------------------------------------------- */
  693. /*   Opcode type definitions                                                 */
  694. /* ------------------------------------------------------------------------- */
  695.  
  696. #define NONE    0
  697. #define STORE   1
  698. #define BRANCH  2
  699. #define CALL    3
  700. #define JUMP    4
  701. #define RETURN  5
  702. #define NCALL   6
  703. #define PCHAR   7
  704. #define VATTR   8
  705. #define ILLEGAL 9
  706. #define INDIR  10
  707.  
  708. #define VAR     1
  709. #define TEXT    2
  710. #define OBJECT  3
  711.  
  712. #define VARI   -1
  713. #define ZERO    0
  714. #define ONE     1
  715. #define TWO     2
  716. #define EXTD    3
  717.  
  718. #define INVALID 100
  719.  
  720. /* ------------------------------------------------------------------------- */
  721. /*   Inform code definitions                                                 */
  722. /* ------------------------------------------------------------------------- */
  723.  
  724. #define ABBREVIATE_CODE  0
  725. #define ATTRIBUTE_CODE   1
  726. #define CONSTANT_CODE    2
  727. #define DICTIONARY_CODE  3
  728. #define END_CODE         4
  729. #define INCLUDE_CODE     5
  730. #define GLOBAL_CODE      6
  731. #define OBJECT_CODE      7
  732. #define PROPERTY_CODE    8
  733. #define RELEASE_CODE     9
  734. #define SWITCHES_CODE    10
  735. #define STATUSLINE_CODE  11
  736. #define VERB_CODE        12
  737. #define TRACE_CODE       13
  738. #define NOTRACE_CODE     14
  739. #define ETRACE_CODE      15
  740. #define NOETRACE_CODE    16
  741. #define BTRACE_CODE      17
  742. #define NOBTRACE_CODE    18
  743. #define LTRACE_CODE      19
  744. #define NOLTRACE_CODE    20
  745. #define ATRACE_CODE      21
  746. #define NOATRACE_CODE    22
  747. #define LISTSYMBOLS_CODE 23
  748. #define LISTOBJECTS_CODE 24
  749. #define LISTVERBS_CODE   25
  750. #define LISTDICT_CODE    26
  751. #define OPENBLOCK_CODE   27
  752. #define CLOSEBLOCK_CODE  28
  753. #define SERIAL_CODE      29
  754. #define DEFAULT_CODE     30
  755. #define STUB_CODE        31
  756. #define VERSION_CODE     32
  757. #define IFV3_CODE        33
  758. #define IFV5_CODE        34
  759. #define IFDEF_CODE       35
  760. #define IFNDEF_CODE      36
  761. #define ENDIF_CODE       37
  762. #define IFNOT_CODE       38
  763. #define LOWSTRING_CODE   39
  764. #define CLASS_CODE       40
  765. #define FAKE_ACTION_CODE 41
  766. #define NEARBY_CODE      42
  767. #define SYSTEM_CODE      43
  768. #define REPLACE_CODE     44
  769. #define EXTEND_CODE      45
  770.  
  771. #define PRINT_ADDR_CODE  0
  772. #define PRINT_CHAR_CODE  1
  773. #define PRINT_PADDR_CODE 2
  774. #define PRINT_OBJ_CODE   3 
  775. #define PRINT_NUM_CODE   4
  776. #define REMOVE_CODE      5
  777. #define RETURN_CODE      6
  778. #define DO_CODE          7
  779. #define FOR_CODE         8
  780. #define IF_CODE          9
  781. #define OBJECTLOOP_CODE  10
  782. #define UNTIL_CODE       11
  783. #define WHILE_CODE       12
  784. #define BREAK_CODE       13
  785. #define ELSE_CODE        14
  786. #define GIVE_CODE        15
  787. #define INVERSION_CODE   16
  788. #define MOVE_CODE        17
  789. #define PUT_CODE         18
  790. #define WRITE_CODE       19
  791. #define STRING_CODE      20
  792. #define FONT_CODE        21
  793. #define READ_CODE        22
  794. #define STYLE_CODE       23
  795. #define RESTORE_CODE     24
  796. #define SAVE_CODE        25
  797. #define PRINT_CODE       26
  798. #define SPACES_CODE      27
  799. #define PRINT_RET_CODE   28
  800. #define BOX_CODE         29
  801.  
  802. #define ASSIGNMENT_CODE  100
  803. #define FUNCTION_CODE    101
  804.  
  805. #define ARROW_SEP        0
  806. #define DARROW_SEP       1
  807. #define DEC_SEP          2
  808. #define MINUS_SEP        3
  809. #define INC_SEP          4
  810. #define PLUS_SEP         5
  811. #define TIMES_SEP        6
  812. #define DIVIDE_SEP       7
  813. #define REMAINDER_SEP    8
  814. #define LOGOR_SEP        9
  815. #define ARTOR_SEP       10
  816. #define LOGAND_SEP      11
  817. #define ARTAND_SEP      12
  818. #define CONDEQUALS_SEP  13
  819. #define SETEQUALS_SEP   14
  820. #define NOTEQUAL_SEP    15
  821. #define GE_SEP          16
  822. #define GREATER_SEP     17
  823. #define LE_SEP          18
  824. #define LESS_SEP        19
  825. #define OPENB_SEP       20
  826. #define CLOSEB_SEP      21
  827. #define COMMA_SEP       22
  828. #define PROPADD_SEP     23
  829. #define PROPNUM_SEP     24
  830. #define PROPERTY_SEP    25
  831. #define COLON_SEP       26
  832.  
  833. /* ------------------------------------------------------------------------- */
  834. /*   Useful macros                                                           */
  835. /* ------------------------------------------------------------------------- */
  836.  
  837. #define On_(x)   if (strcmp(b,x)==0)
  838. #define OnS_(x)  if (strcmp(sub_buffer,x)==0)
  839. #define IfPass2  if (pass_number==2)
  840.  
  841. #define InV3     if (version_number==3)
  842. #define InV5     if (version_number==5)
  843.  
  844. /* ------------------------------------------------------------------------- */
  845. /*   Extern definitions for "inform"                                         */
  846. /* ------------------------------------------------------------------------- */
  847.  
  848. #ifdef ALLOCATE_BIG_ARRAYS
  849.     extern int  *abbrev_values;
  850.     extern int  *abbrev_quality;
  851.     extern int  *abbrev_freqs;
  852. #else
  853.     extern int  abbrev_values[];
  854.     extern int  abbrev_quality[];
  855.     extern int  abbrev_freqs[];
  856. #endif
  857.  
  858. extern int
  859.     version_number,      override_version,
  860.     no_abbrevs,          no_routines,      no_symbols,
  861.     no_errors,           no_warnings,      endofpass_flag,
  862.     no_dummy_labels,
  863.     pass_number,         brace_sp,         no_locals,
  864.     process_filename_flag,                 actual_version;
  865. extern int32 scale_factor;
  866. extern int
  867.     statistics_mode,     offsets_mode,     tracing_mode,
  868.     ignoreswitches_mode, bothpasses_mode,  hash_mode,
  869.     percentages_mode,    trace_mode,       ltrace_mode,
  870.     etrace_mode,         listing_mode,     concise_mode,
  871.     nowarnings_mode,     frequencies_mode, ignoring_mode,
  872.     double_spaced,       economy_mode,     memout_mode,
  873.     transcript_mode,     optimise_mode,    store_the_text,
  874.     abbrev_mode,         memory_map_mode,  withdebug_mode,
  875.     listobjects_mode,    printprops_mode,  debugging_file;
  876. extern zip
  877.     *zcode,      *zcode_p,     *utf_zcode_p,
  878.     *symbols_p,  *symbols_top,
  879.     *strings,    *strings_p,
  880.     *low_strings, *low_strings_p,
  881.     *dictionary, *dict_p,
  882.     *output_p,   *abbreviations_at;
  883.  
  884.     extern char *all_text, *all_text_p;
  885.  
  886. #ifdef ALLOCATE_BIG_ARRAYS
  887.     extern char *buffer, *sub_buffer, *parse_buffer, *rewrite;
  888. #else
  889.     extern char buffer[], sub_buffer[], parse_buffer[], rewrite[];
  890. #endif
  891.  
  892. extern int32 Write_Code_At, Write_Strings_At;
  893.  
  894. extern int32
  895.     code_offset,
  896.     actions_offset,
  897.     preactions_offset,
  898.     dictionary_offset,
  899.     adjectives_offset,
  900.     variables_offset,
  901.     strings_offset;
  902.  
  903. extern int32 Out_Size;
  904.  
  905. extern void make_lower_case(char *str);
  906. extern void switches(char *, int);
  907.  
  908. extern int call_for_br_flag;
  909. extern void compile_box_routine(void);
  910.  
  911. /* ------------------------------------------------------------------------- */
  912. /*   Extern definitions for Archimedes DDE throwback (see above)             */
  913. /* ------------------------------------------------------------------------- */
  914.  
  915. #ifdef ARC_THROWBACK
  916. extern void throwback(int severity, char * error);
  917. extern void throwback_start(void);
  918. extern void throwback_end(void);
  919. extern int throwbackflag;
  920. #endif
  921.  
  922. /* ------------------------------------------------------------------------- */
  923. /*   Extern definitions for "express"                                        */
  924. /* ------------------------------------------------------------------------- */
  925.  
  926. extern int  next_token, void_context, condition_context,
  927.             assign_context, lines_compiled;
  928. extern char condition_label[];
  929.  
  930. extern void express_allocate_arrays(void);
  931. extern void express_free_arrays(void);
  932. extern int expression(int fromword);
  933. extern void assignment(int from, int flag);
  934.  
  935. /* ------------------------------------------------------------------------- */
  936. /*   Extern definitions for "zcode"                                          */
  937. /* ------------------------------------------------------------------------- */
  938.  
  939. extern int  almade_flag;
  940. extern int32 total_chars_trans, total_bytes_trans, trans_length;
  941. extern const char *alphabet[];
  942. extern int  chars_lookup[];
  943.  
  944. extern int  translate_to_ascii(char c);
  945. extern void make_lookup(void);
  946. extern void make_abbrevs_lookup(void);
  947. extern char *translate_text(char *p, char *s_text);
  948. extern opcode opcs(int32 i);
  949. extern void stockup_symbols(void);
  950. extern void optimise_abbreviations(void);
  951.  
  952. /* ------------------------------------------------------------------------- */
  953. /*   Extern definitions for "files"                                          */
  954. /* ------------------------------------------------------------------------- */
  955.  
  956. extern int  override_error_line, total_files_read, input_file;
  957. extern int32 malloced_bytes;
  958. extern char Code_Name[];
  959. extern FILE *Temp1_fp, *Temp2_fp;
  960. extern int  debug_pass;
  961. extern int  total_sl_count;
  962.  
  963. extern char *my_malloc(int32 size, char *whatfor);
  964. extern void *my_calloc(int32 size, int32 howmany, char *whatfor);
  965. extern void my_free(void *pointer, char *whatitwas);
  966. extern void fatalerror(char *s);
  967. extern void memoryerror(char *s, int size);
  968. extern void open_temporary_files(void);
  969. extern void check_temp_files(void);
  970. extern void remove_temp_files(void);
  971. extern void open_debug_file(void);
  972. extern void write_debug_byte(int i);
  973. extern void keep_chars_read(void);
  974. extern void write_chars_read(void);
  975. extern void make_debug_linenum(void);
  976. extern void keep_debug_linenum(void);
  977. extern void write_debug_linenum(void);
  978. extern void write_kept_linenum(void);
  979. extern void keep_routine_linenum(void);
  980. extern void write_routine_linenum(void);
  981. extern void keep_re_linenum(void);
  982. extern void write_re_linenum(void);
  983. extern void write_debug_address(int32 i);
  984. extern void write_present_linenum(void);
  985. extern void write_debug_string(char *s);
  986. extern void close_debug_file(void);
  987. extern void print_error_line(void);
  988. extern int  file_end(int32 marker);
  989. extern int  file_char(int32 marker);
  990. extern void add_to_checksum(void *address);
  991. extern int  current_source_line(void);
  992. extern void load_sourcefile(char *story_name);
  993. extern void close_all_source(void);
  994. extern void advance_line(void);
  995. extern void output_file(void);
  996. extern void declare_systemfile(void);
  997. extern int  is_systemfile(void);
  998.  
  999. extern void set_memory_sizes(int size_flag);
  1000. extern void memory_command(char *command);
  1001.  
  1002. #ifdef ARCHIMEDES
  1003. extern char tname_pre[];
  1004. #endif
  1005.  
  1006. /* ------------------------------------------------------------------------- */
  1007. /*   Extern definitions for "symbols"                                        */
  1008. /* ------------------------------------------------------------------------- */
  1009.  
  1010. extern int routine_starts_line, used_local_variable[];
  1011. extern char *local_varname[];
  1012.  
  1013. #ifndef ALLOCATE_BIG_ARRAYS
  1014.   extern int32 svals[];
  1015. #ifdef VAX
  1016.     extern char stypes[];
  1017. #else
  1018.     extern signed char stypes[];
  1019. #endif
  1020. #else
  1021.   extern int32 *svals;
  1022. #ifdef VAX
  1023.     extern char *stypes;
  1024. #else
  1025.     extern signed char *stypes;
  1026. #endif
  1027. #endif
  1028.  
  1029. extern void symbols_allocate_arrays(void);
  1030. extern void symbols_free_arrays(void);
  1031. extern void init_symbol_banks(void);
  1032. extern void prim_new_symbol(char *p, int32 value, int type, int bank);
  1033. extern void new_symbol(char *p, int32 value, int type);
  1034. extern int prim_find_symbol(char *q, int bank);
  1035. extern int find_symbol(char *q);
  1036. extern int local_find_symbol(char *q);
  1037. extern void new_symbol(char *p, int32 value, int type);
  1038. extern void list_symbols(void);
  1039.  
  1040. /* ------------------------------------------------------------------------- */
  1041. /*   Extern definitions for "inputs"                                         */
  1042. /* ------------------------------------------------------------------------- */
  1043.  
  1044. extern char *tokens;
  1045. extern char *forerrors_buff;
  1046. extern int  forerrors_line;
  1047. extern int  total_source_line, internal_line;
  1048. extern int32 marker_in_file;
  1049.  
  1050. extern void inputs_allocate_arrays(void);
  1051. extern void inputs_free_arrays(void);
  1052. extern void input_begin_pass(void);
  1053. extern void dequote_text(char *b1);
  1054. extern void word(char *b1, int32 w);
  1055. extern int word_token(int w);
  1056. extern void textword(char *b1, int w);
  1057. extern void no_such_label(char *lname);
  1058. extern void warning(char *s);
  1059. extern void warning_named(char *s1, char *s2);
  1060. extern void error(char *s);
  1061. extern void error_named(char *s1, char *s2);
  1062. extern void stack_create(void);
  1063. extern void stack_line(char *p);
  1064. extern int  get_next_line(void);
  1065. extern void tokenise_line(void);
  1066. extern void make_s_grid(void);
  1067.  
  1068. /* ------------------------------------------------------------------------- */
  1069. /*   Extern definitions for "tables"                                         */
  1070. /* ------------------------------------------------------------------------- */
  1071.  
  1072. extern int no_attributes, no_properties, no_globals, max_no_objects,
  1073.            no_fake_actions;
  1074. extern int dict_entries;
  1075. extern int release_number, statusline_flag;
  1076. extern int time_set;
  1077. extern int resobj_flag;
  1078. extern char time_given[];
  1079. extern int globals_size, properties_size;
  1080. extern int32 prop_defaults[];
  1081. extern int prop_longflag[];
  1082. extern int prop_additive[];
  1083. extern char *properties_table;
  1084.  
  1085. extern void tables_allocate_arrays(void);
  1086. extern void tables_free_arrays(void);
  1087. extern void tables_begin_pass(void);
  1088. extern int  dictionary_find(char *dword, int scope);
  1089. extern int  dictionary_add(char *dword, int x, int y, int z);
  1090. extern int  find_action(int32 addr);
  1091. extern void make_global(char *b);
  1092. extern void fix_gconstants(char *globs);
  1093. extern void make_object(char *b, int flag);
  1094. extern void make_class(char *b);
  1095. extern void resume_object(char *b, int j);
  1096. extern void finish_object(void);
  1097. extern void make_verb(char *b);
  1098. extern void extend_verb(char *b);
  1099. extern void list_object_tree(void);
  1100. extern void list_verb_table(void);
  1101. extern void show_dictionary(void);
  1102. extern void construct_storyfile(void);
  1103.  
  1104. /* ------------------------------------------------------------------------- */
  1105. /*   Extern definitions for "asm"                                            */
  1106. /* ------------------------------------------------------------------------- */
  1107.  
  1108. extern int  no_stubbed;
  1109. extern int  in_routine_flag;
  1110. extern int  ignoring_routine;
  1111. extern int  a_from_one;
  1112. extern int  line_done_flag;
  1113.  
  1114. extern void asm_allocate_arrays(void);
  1115. extern void asm_free_arrays(void);
  1116. extern int32 constant_value(char *b);
  1117. extern void args_begin_pass(void);
  1118. extern int  assemble_opcode(char *b, int32 offset, opcode opco);
  1119. extern void assemble_label(int32 offset, char *b);
  1120. extern void assemble_directive(char *b, int32 offset, int32 code);
  1121.