*1 ((QAPLT2 for Algol library issue 6, 4/11/12) (This Elliott SIR subroutine was written by Terry Froggatt, after refurbishing a brace of Benson-Lehner plotters in 2012. It is a direct replacement for the library tape version, but substantially smaller, and with several minor corrections) [QAPLT2 QPLOT WAY CENCHA] QAPLT2 BASE=100 LINK >1 X1SAVE >1 Y1SAVE >1 ANEXT >1 ALAST >1 SHIFT >1 (-1) 4 +62 (Replace unimplemented character by Caret) CHAR 6 +63 (Guard against garbage in upper bits) 5 ANEXT 0 ANEXT /4 ADRES 5 ANEXT /4 ADRES+1 5 ALAST 2 ANEXT 7 CHAR-1 0 QPLOT (The manual states "the parameter word is) /4 1 (an even integer" but this is not checked) 7 SIZEOK (=0 same as before or preset default) 9 ;+5 (<0 for Centered, >0 for Linear) 5 PARAM 14 8191 (Linear SCALER will be Abs size * 0.2) 5 CENTRE 8 ;+4 2 +0 (Centered SCALER will be Abs size * 0.4) 3 PARAM (Interrupt before this will not alter Q) 3 CENTRE (Interrupt before this will not alter Q) 12 +52429 (52428.8 = 0.4 * 2^17) 5 SCALER SIZEOK 4 QPLOT 5 LINK 4 QPLOT+5 5 X1SAVE 4 QPLOT+6 5 Y1SAVE 4 +1 (Move to Start with pen up) 5 PARAM1 NXLINE 4 -9 (Use upper half-word first) (+1) 5 SHIFT 0 ANEXT /4 0 0 SHIFT /14 9 (14 0 then 14 9) 5 QPLOT+4 14 8178 (Get X from upper 4 bits of half-word) 11 SCALSR (X supposedly in range -7 to +7) 8 SCALSR+1 1 X1SAVE 5 QPLOT+3 4 QPLOT+4 14 4 14 8179 (Get Y from lower 5 bits of half-word) 2 -16 7 FLAG (Y = -16 used as flag value) 2 -16 11 SCALSR (Y supposedly in range -9 to +9) 8 SCALSR+1 1 Y1SAVE 5 QPLOT+4 11 QPLOT 8 QPLOT+1 PARAM1 >1 4 +1 (Generally draw next with pen down) FLAG 1 +1 (If flagged draw next with pen up) 5 PARAM1 4 SHIFT 2 -9 7 NXLINE+1 (Use lower half-word last) 10 ANEXT 4 ALAST 2 ANEXT 9 NXLINE 4 Y1SAVE 5 QPLOT+4 4 X1SAVE 1 PARAM 5 QPLOT+3 11 QPLOT 8 QPLOT+1 +1 (Move to Finish with pen up) 0 LINK /8 2 PARAM +20 CENTRE +10 SCALER +4 (PARAM/5) SCALSR >1 (Link also used as workspace) 0 SCALSR 12 SCALER (Same SCALER for both axes) 14 15 5 SCALSR 14 1 6 +1 1 SCALSR (Operand*SCALER/4, rounded) 1 CENTRE (Same CENTRE for both axes) /8 1 (This table gives the polygon vertices for drawing each character. They are packed two per word, using the most significant first, with X in the upper 4 bits and Y in the lower 5 bits of each half. The pen is raised to move to the first vertex, and lowered to draw lines to the other vertices, except that half-word &020 raises the pen between the vertices it separates, then it is finally raised. An &020 is also used to pad the final half-word where necessary) SPACE &020020 EXCLAM DITTO (Tilde or Ditto) HASH (Sterling sign or 1/2) DOLLAR PERCEN AMPERS ACUTE &643151 (Acute accent or Apostrophe) ORB &167070 &734676 &642704 &050151 (Open round bracket) CRB &667770 &134176 &142104 &750651 (Close round bracket) ASTERI &675143 &000643 &175000 &600200 &000004 &034020 PLUS &031007 &000440 &340020 COMMA MINUS &440340 POINT &030071 &070031 &030020 SLASH &567251 CHAR0 &474667 &167374 &344151 &651444 &474020 CHAR1 &605011 &027627 &227020 CHAR2 &446651 &151346 &341467 &367020 CHAR3 &451351 &003375 &372167 &667472 CHAR4 &167151 &476376 CHAR5 &472667 &167372 &376141 &441451 &251020 CHAR6 &751475 &471667 &167371 &375140 &640475 CHAR7 &451351 &467020 CHAR8 &167371 &375140 &640443 &446651 &151346 &343140 &640475 &471667 &167020 CHAR9 &343140 &640443 &447651 &151347 &343227 COLON SEMICO LESSTH &371440 &347020 EQUALS &473373 &020445 &345020 MORETH &471340 &447020 DROP10 &567540 &020040 &200277 &270227 &067030 &037040 (Suffix 10 or Question mark) GRAVE &651143 (Grave accent or AT symbol) CHARA &527011 &235635 &235327 CHARB &467451 &151347 &343140 &440140 &375371 &167467 CHARC &371167 &667472 &446651 &151347 CHARD &467451 &151346 &372167 &467020 CHARE &367467 &440200 &440451 &351020 CHARF &467442 &202442 &451351 CHARG &346151 &651446 &472667 &167371 &375235 &375367 CHARH &467451 &440340 &351367 CHARI &627227 &027011 &611211 CHARJ &472627 &027172 &151751 &351020 CHARK &527511 &500311 &500327 CHARL &511527 &327020 CHARM &467451 &000351 &367020 CHARN &467451 &367351 CHARO &472667 &167372 &346151 &651446 &472020 CHARP &440140 &343345 &151451 &467020 CHARQ &270167 &667471 &447651 &151347 &371270 &072367 CHARR &467451 &151345 &343140 &440140 &367020 CHARS &471667 &167371 &375140 &640443 &447651 &151347 CHART &027011 &451351 CHARU &451471 &667167 &371351 CHARV &451027 &351020 CHARW &451527 &000327 &351020 CHARX &467351 &000451 &367020 CHARY &027000 &451000 &351020 CHARZ &451351 &467367 OSB &167667 &651151 (Open square bracket) BSLASH &551267 (Sterling sign or Reverse /) CSB &667167 &151651 (Close square bracket) CARET &534006 &334020 (Up-arrow or Caret) BACK (Back-arrow or Underline) END (This table contains 65 addresses, giving the starts & ends of the 64 characters within the vertex table. For unimplemented characters, the start & end lables label the same location. It follows the vertices table to minimise forward references) ADRES 0 SPACE 0 EXCLAM 0 DITTO 0 HASH 0 DOLLAR 0 PERCEN 0 AMPERS 0 ACUTE 0 ORB 0 CRB 0 ASTERI 0 PLUS 0 COMMA 0 MINUS 0 POINT 0 SLASH 0 CHAR0 0 CHAR1 0 CHAR2 0 CHAR3 0 CHAR4 0 CHAR5 0 CHAR6 0 CHAR7 0 CHAR8 0 CHAR9 0 COLON 0 SEMICO 0 LESSTH 0 EQUALS 0 MORETH 0 DROP10 0 GRAVE 0 CHARA 0 CHARB 0 CHARC 0 CHARD 0 CHARE 0 CHARF 0 CHARG 0 CHARH 0 CHARI 0 CHARJ 0 CHARK 0 CHARL 0 CHARM 0 CHARN 0 CHARO 0 CHARP 0 CHARQ 0 CHARR 0 CHARS 0 CHART 0 CHARU 0 CHARV 0 CHARW 0 CHARX 0 CHARY 0 CHARZ 0 OSB 0 BSLASH 0 CSB 0 CARET 0 BACK 0 END (Algol Interface) WAY /14 2 >1 4 ENTRYA 5 BASE+155 0 BASE+38 /4 6 9 ;+3 7 ;+2 8 ;+2 4 +1 (If parameter < 1, replace by 1) 12 +5 3 CHSIZE 0 WAY+1 /8 1 ENTRYA 0 ;+1 11 QPLOT 8 CHAR CHSIZE +10 0 BASE+130 /8 1 CENCHA /14 1 >1 4 +11 (Cross) 11 QPLOT 8 CHAR -15 0 CENCHA+1 /8 1 %