home *** CD-ROM | disk | FTP | other *** search
/ Gold Fish 3 / goldfish_volume_3.bin / files / text / tex / pastex / source / driver / util / amiga / setchar00.asm < prev    next >
Encoding:
Assembly Source File  |  1993-06-06  |  23.5 KB  |  531 lines

  1.               SECTION      TEXT,CODE
  2. __code:
  3. @SetChar:
  4. ;    1:#ifndef SLOW
  5. ;    2:
  6. ;    3:#include "defines.h"
  7. ;    4:
  8. ;    5:#include <stdio.h>
  9. ;    6:
  10. ;    7:#ifdef AMIGA
  11. ;    8:# ifdef DISPLAY
  12. ;    9:#  include <intuition/intuition.h>
  13. ;   10:   extern struct RastPort      myRastPort;
  14. ;   11:# endif
  15. ;   12:#endif
  16. ;   13:
  17. ;   14:#ifdef AZTEC_C
  18. ;   15:#  include "functions.h"
  19. ;   16:#endif
  20. ;   17:
  21. ;   18:
  22. ;   19:#include "globals.h"
  23. ;   20:#include "bitmap.h"
  24. ;   21:#include "commands.h"
  25. ;   22:#include "flmt.h"
  26. ;   23:#include "new_font.h"
  27. ;   24:
  28. ;   25:#include "globals.i"
  29. ;   26:#include "fast_cp.i"
  30. ;   27:#include "dvihand.i"
  31. ;   28:#include "unpack.i"
  32. ;   29:#include "new_font.i"        /* fuer Load_really() */
  33. ;   30:
  34. ;   31:#ifdef DISPLAY
  35. ;   32:#  include <clib/graphics_protos.h>
  36. ;   33:#endif
  37. ;   34:
  38. ;   35:
  39. ;   36:#define PixRound(x,conv)    (long)(((x) + ((conv) >> 1)) / (conv))
  40. ;   37:
  41. ;   38:#define BITSPERLONG    32
  42. ;   39:#define BITSPERWORD    16
  43. ;   40:#define WORD_WIDTH    16
  44. ;   41:
  45. ;   42:extern long  hconv, vconv;            /* converts DVI units to pixels       */
  46. ;   43:extern long  h;                       /* current horizontal position        */
  47. ;   44:extern long  hh;                      /* current h on device                */
  48. ;   45:extern long  v;                       /* current vertical position          */
  49. ;   46:extern long  vv;                      /* current v on device                */
  50. ;   47:
  51. ;   48:
  52. ;   49:
  53. ;   50:extern int        DeBug;
  54. ;   51:extern struct bitmap    map;
  55. ;   52:extern long        upper_limit;
  56. ;   53:extern long        lower_limit;
  57. ;   54:
  58. ;   55:/* extern struct font_entry *cfontptr; */
  59. ;   56:
  60. ;   57:extern struct Font *cfontptr;
  61. ;   58:
  62. ;   59:
  63. ;   60:
  64. ;   61:
  65. ;   62:/*-->SetChar*/
  66. ;   63:/**********************************************************************/
  67. ;   64:/*****************************  SetChar  ******************************/
  68. ;   65:/**********************************************************************/
  69. ;   66:
  70. ;   67:#if !defined(USE_ASM_SETCHAR) || !defined(DISPLAY)
  71. ;   68:
  72. ;   69:void SetChar(long pc, int command)
  73. ;   70:{
  74.               SUB.W          #$1c,A7                  ;9efc 001c 
  75.               MOVEM.L        D2-D7/A2-A3/A5-A6,-(A7)
  76. ___SetChar__1:
  77. ;   71:  struct Char            *ptr;
  78. ;   72:
  79. ;   73:  register unsigned long     reg;
  80. ;   74:  unsigned short        *char_adr;
  81. ;   75:  unsigned short        *start_adr, *adr;
  82. ;   76:  long                nr_sh, length_row;
  83. ;   77:  long                c, l;
  84. ;   78:
  85. ;   79:  long            x, y;        /* upper left corner (pixels)           */
  86. ;   80:  long            cp_h, w;     /* height / width of character (pixels) */
  87. ;   81:  /* long        *p; */          /* pointer to bitmap */
  88. ;   82:  unsigned short    *p;          /* pointer to bitmap */
  89. ;   83:  struct Chars        *cd;
  90. ;   84:
  91. ;   85:  long            words, lmin, lmax;
  92. ;   86:
  93. ;   87:
  94. ;   88:  cd = &(cfontptr->common->ch[pc]);
  95.               MOVE.L         D0,D7                    ;2e00 
  96.               MOVE.L         D7,D2                    ;2407 
  97.               ASL.L          #$2,D2                   ;e582 
  98.               ADD.L          D7,D2                    ;d487 
  99.               ADD.L          D2,D2                    ;d482 
  100.               MOVE.L         _cfontptr(A4),A1          ;226c 0000 
  101.               MOVE.L         $414(A1),A0              ;2069 0414 
  102.               ADD.L          D2,A0                    ;d1c2 
  103.               LEA            $24(A0),A5               ;4be8 0024 
  104. ;   89:
  105. ;   90:  if (cd->packed_data == -1) {
  106.               MOVE.L         A5,A0                    ;204d 
  107.               MOVE.L         D0,$38(A7)               ;2f40 0038 
  108.               MOVE.L         D1,$3c(A7)               ;2f41 003c 
  109.               MOVE.L         A0,$34(A7)               ;2f48 0034 
  110.               MOVE.L         #$ff,D0                  ;70ff        (hes)
  111.               CMP.L          $2(A5),D0                ;b0ad 0002 
  112.               BNE.B          ___SetChar__9            ;6652 
  113. ___SetChar__2:
  114. ;   91:    /* character not in font:
  115. ;   92:     * add tfm width to h and set hh = PixRound(h)
  116. ;   93:     */
  117. ;   94:    if (command <= SET4) {        /* SET command (or PUT command) ? */
  118.               MOVEQ.L        #$7c,D0                  ;707c 
  119.               NOT.B          D0                       ;4600 
  120.               CMP.L          D0,D1                    ;b280 
  121.               BGT.W          ___SetChar__44           ;6e00 021e 
  122. ___SetChar__3:
  123. ;   95:    if (!cfontptr->ctfmw_valid ) {
  124.               MOVEQ.L        #$0,D1                   ;7200 
  125.               NOT.B          D1                       ;4601 
  126.               AND.L          D1,D7                    ;ce81 
  127.               ASL.L          #$2,D7                   ;e587 
  128.               TST.B          $418(A1)                 ;4a29 0418 
  129.               BNE.B          ___SetChar__5            ;6614 
  130. ___SetChar__4:
  131. ;   96:       h += scalewidth(cfontptr->common->fnt_group->tfmw[(int)pc&255],
  132.               MOVE.L         $414(A1),A6              ;2c69 0414 
  133.               MOVE.L         (A6),A0                  ;2056 
  134. ;   97:                   cfontptr->space_faktor);
  135.               MOVE.L         $0(A0,D7.L),D0           ;2030 7800 
  136.               MOVE.L         $8(A1),D1                ;2229 0008 
  137.               JSR            @scalewidth(PC)          ;4eba 0000 
  138.               BRA.B          ___SetChar__6            ;6006 
  139. ___SetChar__5:
  140. ;   98:        }
  141. ;   99:    else {
  142. ;  100:      h += cfontptr->ctfmw[(int)pc&255];
  143.               ADD.L          D7,A1                    ;d3c7 
  144.               MOVE.L         $14(A1),D0               ;2029 0014 
  145. ___SetChar__6:
  146.               ADD.L          D0,_h(A4)                 ;d1ac 0000 
  147. ___SetChar__7:
  148. ;  101:    }
  149. ;  102:    hh = PixRound(h, hconv);
  150.               MOVE.L         _hconv(A4),D1             ;222c 0000 
  151.               ASR.L          #$1,D1                   ;e281 
  152.               MOVE.L         _h(A4),D0                 ;202c 0000 
  153.               ADD.L          D1,D0                    ;d081 
  154.               MOVE.L         _hconv(A4),D1             ;222c 0000 
  155.               JSR            __CXD33(PC)               ;4eba 0000 
  156.               MOVE.L         D0,_hh(A4)                ;2940 0000 
  157. ___SetChar__8:
  158. ;  103:    }
  159. ;  104:    return ;  /* kein Shift */
  160.               BRA.W          ___SetChar__44           ;6000 01d6 
  161. ___SetChar__9:
  162. ;  105:  }
  163. ;  106:
  164. ;  107:  if ((ptr = cd->unpacked) == NULL) {
  165.               MOVE.L         $6(A5),A3                ;266d 0006 
  166.               MOVE.L         A3,D0                    ;200b 
  167.               BNE.B          ___SetChar__15           ;6634 
  168. ___SetChar__10:
  169. ;  108:    if (cfontptr->common->fnt_status == FNT_DEFINED ||
  170.               MOVE.L         _cfontptr(A4),A1          ;226c 0000 
  171.               MOVE.L         $414(A1),A0              ;2069 0414 
  172.               MOVEQ.L        #$3,D0                   ;7003 
  173.               CMP.B          $a26(A0),D0              ;b028 0a26 
  174.               BEQ.B          ___SetChar__12           ;6708 
  175. ___SetChar__11:
  176. ;  109:        cfontptr->common->fnt_status == FNT_FOUND) {
  177.               MOVEQ.L        #$2,D0                   ;7002 
  178.               CMP.B          $a26(A0),D0              ;b028 0a26 
  179.               BNE.B          ___SetChar__13           ;6606 
  180. ___SetChar__12:
  181. ;  110:      /* Font noch nicht geladen?? */
  182. ;  111:      /* Die Abfrage kommt nur, wenn der Buchstabe nicht eh schon gefunden    */
  183. ;  112:      /* wird, also wenn der Char sicher noch nie ausgepackt wurde!        */
  184. ;  113:
  185. ;  114:      Load_really(cfontptr);        /* nun wird er geladen... */
  186.               MOVE.L         A1,A0                    ;2049 
  187.               JSR            @Load_really(PC)         ;4eba 0000 
  188. ___SetChar__13:
  189. ;  115:    }
  190. ;  116:    unpack_char(cfontptr, pc);
  191.               MOVE.L         D7,D0                    ;2007 
  192.               EXT.L          D0                       ;48c0 
  193.               MOVE.L         _cfontptr(A4),A0          ;206c 0000 
  194.               JSR            @unpack_char(PC)         ;4eba 0000 
  195. ;  117:    if ((ptr = cd->unpacked) == NULL) {
  196.               MOVE.L         $6(A5),A3                ;266d 0006 
  197.               MOVE.L         A3,D0                    ;200b 
  198.               BEQ.W          ___SetChar__37           ;6700 0124 
  199. ___SetChar__14:
  200. ___SetChar__15:
  201. ;  118:      /* auspacken hat nicht geklappt, aber die Breite des Chars ist bekannt */
  202. ;  119:      goto sh_return;
  203. ;  120:    }
  204. ;  121:  }
  205. ;  122:
  206. ;  123:#if 0
  207. ;  124:  x = (long)(PixRound(h, hconv)-ptr->xOffset) + hoffset;
  208. ;  125:  y = (long)(PixRound(v, vconv)-ptr->yOffset) + voffset;
  209. ;  126:#endif
  210. ;  127:
  211. ;  128:#ifdef DISPLAY
  212. ;  129:  x = hh - ptr->xOffset + hoffset;
  213.               MOVE.L         _hh(A4),D0                ;202c 0000 
  214.               SUB.L          $4(A3),D0                ;90ab 0004 
  215.               ADD.L          _hoffset(A4),D0           ;d0ac 0000 
  216. ;  130:  y = vv - ptr->yOffset + voffset;
  217.               MOVE.L         _vv(A4),D7                ;2e2c 0000 
  218.               SUB.L          $8(A3),D7                ;9eab 0008 
  219.               ADD.L          _voffset(A4),D7           ;deac 0000 
  220. ;  131:#else
  221. ;  132:  if (landscape) {
  222. ;  133:    // wird spaeter noch gedreht, also jetzt etwas seltsame Offsets
  223. ;  134:    x = hh - ptr->xOffset + hconvresolution;    // plus 1 inch
  224. ;  135:    y = vv - ptr->yOffset + hoffset;
  225. ;  136:  }
  226. ;  137:  else {
  227. ;  138:    x = hh - ptr->xOffset + hoffset;
  228. ;  139:    y = vv - ptr->yOffset + voffset;
  229. ;  140:  }
  230. ;  141:#endif
  231. ;  142:  w = (long)ptr->width;                    /* char width */
  232.               MOVEQ.L        #$0,D1                   ;7200 
  233.               MOVE.W         (A3),D1                  ;3213 
  234. ;  143:  cp_h = (long)ptr->height;                /* char height */
  235.               MOVEQ.L        #$0,D6                   ;7c00 
  236.               MOVE.W         $2(A3),D6                ;3c2b 0002 
  237. ;  144:
  238. ;  145:  p = (unsigned short *)(ptr+1);
  239. ;  146:
  240. ;  147:  /* Buchstaben am Rand werden vollstaendig weggelassen */
  241. ;  148:  if (x < 0L || x+w >= map.width) {
  242.               MOVE.L         D0,$30(A7)               ;2f40 0030 
  243.               MOVE.L         D1,$2c(A7)               ;2f41 002c 
  244.               TST.L          D0                       ;4a80 
  245.               BMI.W          ___SetChar__37           ;6b00 00f4 
  246. ___SetChar__16:
  247.               ADD.L          D0,D1                    ;d280 
  248.               MOVE.L         _map(A4),D3               ;262c 0000 
  249.               CMP.L          D3,D1                    ;b283 
  250.               BGE.W          ___SetChar__37           ;6c00 00e8 
  251. ___SetChar__17:
  252. ___SetChar__18:
  253. ;  149:      goto sh_return;
  254. ;  150:  }
  255. ;  151:#ifdef BERND
  256. ;  152:  if (y >= lower_limit || y-cp_h < upper_limit) {
  257. ;  153:                ^^^^^^ falsche Richtung!
  258. ;  154:      goto sh_return;
  259. ;  155:  }
  260. ;  156:#else
  261. ;  157:  /* Buchstaben die ganz unten oder oben heraus sind werden weggelassen */
  262. ;  158:  if (y >= lower_limit || y+cp_h < upper_limit) {
  263.               MOVE.L         _lower_limit(A4),D2       ;242c 0000 
  264.               CMP.L          D2,D7                    ;be82 
  265.               BGE.W          ___SetChar__37           ;6c00 00de 
  266. ___SetChar__19:
  267.               MOVE.L         D7,D5                    ;2a07 
  268.               ADD.L          D6,D5                    ;da86 
  269.               MOVE.L         _upper_limit(A4),D3       ;262c 0000 
  270.               CMP.L          D3,D5                    ;ba83 
  271.               BLT.W          ___SetChar__37           ;6d00 00d0 
  272. ___SetChar__20:
  273. ___SetChar__21:
  274. ;  159:      goto sh_return;
  275. ;  160:  }
  276. ;  161:#endif
  277. ;  162:
  278. ;  163:  lmin = 0; lmax = cp_h;
  279.               CLR.L          $40(A7)                  ;42af 0040 
  280.               MOVE.L         D6,D4                    ;2806 
  281. ;  164:
  282. ;  165:  /* Buchstaben die nach unten herausragt wird abgeschnitten */
  283. ;  166:  if (y+cp_h >= lower_limit) {
  284.               CMP.L          D2,D5                    ;ba82 
  285.               BLT.B          ___SetChar__23           ;6d04 
  286. ___SetChar__22:
  287. ;  167:    lmax = lower_limit - y /*- 1*/;    /* -1 wird nicht benoetigt, da <lmax! */
  288.               SUB.L          D7,D2                    ;9487 
  289.               MOVE.L         D2,D4                    ;2802 
  290. ___SetChar__23:
  291. ;  168:  }
  292. ;  169:  /* Buchstaben die nach oben herausragen werden ebenfalls abgeschnitten */
  293. ;  170:  if (y < upper_limit) {
  294.               MOVE.L         _upper_limit(A4),D2       ;242c 0000 
  295.               CMP.L          D2,D7                    ;be82 
  296.               BGE.B          ___SetChar__25           ;6c08 
  297. ___SetChar__24:
  298. ;  171:    lmin = upper_limit - y;
  299.               MOVE.L         D2,D3                    ;2602 
  300.               SUB.L          D7,D3                    ;9687 
  301.               MOVE.L         D3,$40(A7)               ;2f43 0040 
  302. ___SetChar__25:
  303. ;  172:  }
  304. ;  173:
  305. ;  174:  length_row = map.width >> 4;        /* Laenge einer Zeile in Woerter */
  306.               MOVE.L         _map(A4),D3               ;262c 0000 
  307.               ASR.L          #$4,D3                   ;e883 
  308. ;  175:
  309. ;  176:  start_adr = ((unsigned short *)map.pixptr)
  310. ;  177:                + ((y - upper_limit + lmin) * length_row)
  311. ;  178:                + (x >> 4);
  312.               MOVE.L         D7,D1                    ;2207 
  313.               SUB.L          D2,D1                    ;9282 
  314.               ADD.L          $40(A7),D1               ;d2af 0040 
  315.               MOVE.L         D3,D0                    ;2003 
  316.               MOVE.L         D0,$28(A7)               ;2f40 0028 
  317.               JSR            __CXM33(PC)               ;4eba 0000 
  318.               MOVE.L         $30(A7),D1               ;222f 0030 
  319.               ASR.L          #$4,D1                   ;e881 
  320.               ADD.L          D1,D1                    ;d281 
  321.               ADD.L          D0,D0                    ;d080 
  322.               MOVE.L         _map+$8(A4),A2            ;246c 0008 
  323.               ADD.L          D0,A2                    ;d5c0 
  324.               ADD.L          D1,A2                    ;d5c1 
  325. ;  179:  /* Adresse des ersten Wortes */
  326. ;  180:
  327. ;  181:  nr_sh = x & 15;            /* Anzahl benoetigter Shifte */
  328.               MOVEQ.L        #$f,D6                   ;7c0f 
  329.               AND.L          $30(A7),D6               ;ccaf 0030 
  330. ;  182:  words = (w + 15) / 16;        /* Anzahl Words des Chars pro Zeile */
  331.               MOVE.L         $2c(A7),D0               ;202f 002c 
  332.               MOVEQ.L        #$f,D1                   ;720f 
  333.               ADD.L          D1,D0                    ;d081 
  334.               MOVEQ.L        #$10,D1                  ;7210 
  335.               JSR            __CXD33(PC)               ;4eba 0000 
  336. ;  183:
  337. ;  184:  char_adr = (unsigned short *) ((unsigned short *)p + (lmin * words));
  338.               MOVE.L         $40(A7),D1               ;222f 0040 
  339.               MOVE.L         D0,$2c(A7)               ;2f40 002c 
  340.               JSR            __CXM33(PC)               ;4eba 0000 
  341.               ADD.L          D0,D0                    ;d080 
  342.               MOVE.L         A3,A0                    ;204b 
  343.               ADD.L          D0,A0                    ;d1c0 
  344.               LEA            $c(A0),A3                ;47e8 000c 
  345. ;  185:
  346. ;  186:   //reg = 0L;
  347. ;  187:
  348. ;  188:   if (words == 1) {                /* width char <= width word */
  349.               MOVE.L         D4,D5                    ;2a04 
  350.               MOVE.L         $40(A7),D4               ;282f 0040 
  351.               SUB.L          D4,D5      ; lmax-lmin um auf 0 abfragen zu koennen
  352. ___SetChar__26:
  353.               MOVEQ.L        #$1,D0                   ;7001 
  354.               CMP.L          $2c(A7),D0               ;b0af 002c 
  355.               BNE.B          ___SetChar__31           ;661e 
  356. ___SetChar__27:
  357.               MOVE.L         D3,D7                    ;2e03 
  358.               ADD.L          D7,D7                    ; (hes) ich brauch immer das doppelte
  359. ;  189:     for (l=lmax; l>lmin; l--) {
  360.               BRA.B          ___SetChar__29           ;6014 
  361. ___SetChar__28:
  362. ;  190:        reg = ((long)(*char_adr++)) << 16;
  363. ;  191:        reg >>= nr_sh;
  364. ;  192:        *(unsigned long *)start_adr |= reg;
  365.               MOVEQ.L        #$0,D0                   ;7000 
  366.               MOVE.W         (A3)+,D0                 ;301b 
  367.               SWAP           D0                       ;4840 
  368. ;              CLR.W          D0                       ;4240 (hes)
  369.               LSR.L          D6,D0                    ;eca8 
  370.               OR.L           D0,(A2)                  ;8192 
  371. ;  193:        start_adr += length_row;
  372. ;              MOVE.L         D7,D0                    ;2007 
  373. ;              ADD.L          D0,D0                    ;d080 
  374.               ADD.L          D7,A2                    ;d5c0 (hes)
  375. ;              SUBQ.L         #$1,D5                   ;5385 (hes)
  376. ___SetChar__29:
  377.               DBF            D5,___SetChar__28
  378. ;              CMP.L          D4,D5                    ;ba84 
  379. ;              BGT.B          ___SetChar__28           ;6ee8 
  380. ___SetChar__30:
  381.               BRA.B          ___SetChar__37           ;6030 
  382. ___SetChar__31:
  383. ;  194:    }                        /* end for l        */
  384. ;  195:   }
  385. ;  196:   else {
  386. ;  197:    adr = start_adr;
  387.               MOVE.L         A2,A5                    ;2a4a 
  388. ;  198:    for (l=lmax; l>lmin; l--) {
  389.               MOVE.L         $28(A7),D1               ; (hes) length_row * 2
  390.               ADD.L          D1,D1                    ; (hes) schon vorbereiten
  391.               MOVE.L         $2c(A7),D2               ; (hes) words in ein Register sichern
  392.               BRA.B          ___SetChar__36           ;6028 
  393. ___SetChar__32:
  394. ;  199:      for (c=words; c>0; c--) {
  395. ;              MOVE.L         $2c(A7),D7               ;2e2f 002c 
  396.               MOVE.L         D2,D7               ; (hes) words aus dem Register holen
  397.               BRA.B          ___SetChar__34           ;6012 
  398. ___SetChar__33:
  399. ;  200:        reg = ((long)(*char_adr++)) << 16;
  400. ;  201:        reg >>= nr_sh;
  401. ;  202:        *(unsigned long *)(adr++) |= reg;
  402.               MOVE.L         A5,A0                    ;204d 
  403.               ADDQ.L         #$2,A5                   ;548d 
  404.               MOVEQ.L        #$0,D0                   ;7000 
  405.               MOVE.W         (A3)+,D0                 ;301b 
  406.               SWAP           D0                       ;4840 
  407. ;              CLR.W          D0                       ;4240 (hes)
  408.               LSR.L          D6,D0                    ;eca8 
  409.               OR.L           D0,(A0)                  ;8190 
  410. ;              SUBQ.L         #$1,D7                   ;5387 
  411. ___SetChar__34:
  412.               DBF            D7,___SetChar__33
  413. ;              TST.L          D7                       ;4a87 
  414. ;              BGT.B          ___SetChar__33           ;6eea 
  415. ___SetChar__35:
  416. ;  203:      }                        /* end for c        */
  417. ;  204:      start_adr += length_row;
  418. ;              MOVE.L         $28(A7),D1               ;222f 0028 
  419. ;              ADD.L          D1,D1                    ;d281 
  420.               ADD.L          D1,A2                    ;d5c1 
  421. ;  205:      adr = start_adr;
  422.               MOVE.L         A2,A5                    ;2a4a 
  423. ;              SUBQ.L         #$1,D5                   ;5385 
  424. ___SetChar__36:
  425.               DBF            D5,___SetChar__32
  426. ;              CMP.L          D4,D5                    ;ba84 
  427. ;              BGT.B          ___SetChar__32           ;6ed4 
  428. ___SetChar__37:
  429. ;  206:    }                        /* end for l        */
  430. ;  207:  }                        /* end else w<16    */
  431. ;  208:
  432. ;  209:
  433. ;  210:sh_return:
  434. ;  211:
  435. ;  212:    if (command <= SET4) {    /* SET command, not a PUT command */
  436.               CMPI.L         #$83,$3c(A7)             ;0caf 0000 0083 003c 
  437.               BGT.B          ___SetChar__44           ;6e6c 
  438. ___SetChar__38:
  439. ;  213:       /* ... but {\tt DVItype} will allow character codes greater 255,
  440. ;  214:        * assuming that they all have the same width as the character
  441. ;  215:        * whose code is  c mod 256.
  442. ;  216:        */
  443. ;  217:      if (!cfontptr->ctfmw_valid ) {
  444.               MOVE.L         $38(A7),D7               ;2e2f 0038 
  445.               MOVE.L         _cfontptr(A4),A0          ;206c 0000 
  446.               TST.B          $418(A0)                 ;4a28 0418 
  447.               BNE.B          ___SetChar__40           ;663c 
  448. ___SetChar__39:
  449. ;  218:        /* Diese Abfrage ist eigentlich ueberfluessig!!         */
  450. ;  219:        /* Wenn das Programm korrekt funktioniert, sollte dieser */
  451. ;  220:        /* Fall nie auftreten!                     */
  452. ;  221:        Warning("Internal error: 'ctfmw_valid' (%s, #%d, St:%d)",
  453.               MOVE.L         $414(A0),A1              ;2268 0414 
  454.               MOVE.L         (A1),A6                  ;2c51 
  455.               MOVEQ.L        #$0,D0                   ;7000 
  456.               MOVE.B         $a26(A1),D0              ;1029 0a26 
  457. ;  222:        cfontptr->common->fnt_group->fnt_name, cfontptr->fnt_number, cfontptr->common->fnt_status);
  458.               MOVE.L         D0,-(A7)                 ;2f00 
  459.               MOVE.L         (A0),-(A7)               ;2f10 
  460.               PEA            $400(A6)                 ;486e 0400 
  461.               PEA            $52(PC)                  ;487a 0052 
  462.               JSR            _WarningStr(PC)              ;4eba 0000 
  463. ;  223:    setup_ctfmw(cfontptr);
  464.               MOVE.L         _cfontptr(A4),A0          ;206c 0000 
  465.               JSR            @setup_ctfmw(PC)         ;4eba 0000 
  466.               LEA            $10(A7),A7               ;4fef 0010 
  467. ;  224:        h  += cfontptr->ctfmw[(int)pc&255];
  468.               MOVEQ.L        #$0,D1                   ;7200 
  469.               NOT.B          D1                       ;4601 
  470.               AND.L          D1,D7                    ;ce81 
  471.               ASL.L          #$2,D7                   ;e587 
  472.               MOVE.L         _cfontptr(A4),A1          ;226c 0000 
  473.               ADD.L          D7,A1                    ;d3c7 
  474.               MOVE.L         $14(A1),D0               ;2029 0014 
  475.               BRA.B          ___SetChar__41           ;600e 
  476. ___SetChar__40:
  477. ;  225:    /* h += scalewidth(cfontptr->common->fnt_group->tfmw[(int)pc&255], cfontptr->space_faktor); */
  478. ;  226:      }
  479. ;  227:      else {
  480. ;  228:        h  += cfontptr->ctfmw[(int)pc&255];
  481.               MOVEQ.L        #$0,D1                   ;7200 
  482.               NOT.B          D1                       ;4601 
  483.               AND.L          D7,D1                    ;c287 
  484.               ASL.L          #$2,D1                   ;e581 
  485.               ADD.L          D1,A0                    ;d1c1 
  486.               MOVE.L         $14(A0),D0               ;2028 0014 
  487. ___SetChar__41:
  488.               ADD.L          D0,_h(A4)                 ;d1ac 0000 
  489. ___SetChar__42:
  490. ;  229:      }
  491. ;  230:      hh += cd->pixelwidth;
  492.               MOVE.L         $34(A7),A0               ;206f 0034 
  493.               MOVE.W         (A0),D0                  ;3010 
  494.               EXT.L          D0                       ;48c0 
  495.               ADD.L          D0,_hh(A4)                ;d1ac 0000 
  496. ;  231:      setmotion();     /* Immer wenn was geaendert wird, wird auch setmotion() gemacht! */
  497.               JSR            @setmotion(PC)           ;4eba 0000 
  498. ___SetChar__43:
  499. ___SetChar__44:
  500.               MOVEM.L        (A7)+,D2-D7/A2-A3/A5-A6
  501.               ADD.W          #$1c,A7                  ;defc 001c 
  502.               RTS                                     ;4e75 
  503. __const:
  504. __strings:
  505.               DC.B           'Internal error: ctfmw_valid  (%s, #%d, St:%d)'
  506.               DC.B           $00
  507.               DC.B           $0
  508.  
  509.  
  510.               XREF           _cfontptr
  511.               XREF           @scalewidth
  512.               XREF           _h
  513.               XREF           _hconv
  514.               XREF           __CXD33
  515.               XREF           _hh
  516.               XREF           @Load_really
  517.               XREF           @unpack_char
  518.               XREF           _hoffset
  519.               XREF           _vv
  520.               XREF           _voffset
  521.               XREF           _map
  522.               XREF           _lower_limit
  523.               XREF           _upper_limit
  524.               XREF           __CXM33
  525.               XREF           _WarningStr
  526.               XREF           @setup_ctfmw
  527.               XREF           @setmotion
  528.               XREF           _vconv
  529.               XDEF           @SetChar
  530.               END
  531.