Difference between A-code stylesSorry, this section is still under construction!Contents
Introduction to A-code stylesThe notion of A-code styles came relatively late, when I decided to teach myself C by re-implementing the A-code engine using the translate/compile architecture, in place of Platt's original munge/interpret one. I wanted the new implementation to support both Platt's Adv550 and my own Adv660 (a merger of Luckett's and Pike's Adv440 with Adv550). Because there were some incompatibilities between A-code of Adv550 and that of Adv660 (most notably text switch components being counted from 1 or from 0 respectively), it became necessary for a game's code to signal how it is to be treated. Logically enough, Platt's A-code was designated as Style 1. Remembering the many changes my form of Platt's munger/executive underwent before Adv660 was made generally available on the Net, I arbitrarily assigned Style 10 to the final version of Adv660. (Luckily it was not Style 2, because years later it was convenient to assign Style 2 to the re-discovered Goetz's Adv580.) Thus the STYLE major directive, to fix the style of an A-code game. As things stand, style numbers are assigned as follows:
Taking Platt's A-code as the base, let's look at changes brought in by different styles, bearing in mind that only the style 1 to style 10 transition is of historical significance. From Style 1 to Style 2The style of Goetz's Adv580 A-code differs very little from Style 1.
From Style 1 to Style 10
Text switch modification and generalisation:
Major directive changes:
Minor directive changes:
Added DOALL and FLUSH for handling GET/DROP ALL.
Player interface From Style 10 to Style 11/12Since enhancements that came in under style 12 are also retrospectively available in style 11, it makes sense to lump 11 and 12 ogether for the purposes of compaing the to style 10. The change from 11 to 12 was dictated by a major surgery on the acdc A-code to C translator to make it operate in two passes instead of one. The pupose was to allow game entities to be referred to by game code before the relevant entity declarations. This is particularlly handy in debugging via "wizard mode" code optionally included in game source via the INCLUDE? major directive. See a separate document on debugging A-code games. (New major directives: ARRAY, STATE, CONSTANT, FLAGS.) (ITOBJ takes flag and state supplementary arguments.) (Yet more new minor directives, ANYOF and KEYWORD deprecated.) (Argument ellipsis IFAT, IFIS, IFLOC) (In-line texts.) (CGI mode.) (Library mode.) (Local variables, and procedure arguments.) (Context and undo mechanisms.) (Compound commands, typo correction, output word scanning.) (Internationalisation.) (Ellipsis for FLAG, UNFLAG.) (Adds Style 2 CIF and CENDIF.) |