home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / Assembler / dse-src1.dms / in.adf / demosas.lzh / demosource.LZH / text.include < prev   
Encoding:
Text File  |  1991-05-17  |  972 b   |  62 lines

  1. ;assume a screen which is erm... 40 bytes wide
  2.  
  3.  
  4.     even
  5.  
  6. letter
  7.     ;Calculate letter to print...
  8.     move.l #0,d0
  9.     move.w d0,ek            ;Reset text counter.
  10.     move.l string_adr,a0    :Move to next letter in string.
  11.     move.w (a0),d0
  12.     add.l #2,a0
  13.     move.l a0,string_adr
  14.  
  15.     ;Calculate screen address (always bottom right of screen ram)
  16.     move.l #SCREEN1+$1f44,a0
  17.  
  18.     and.w #$00ff,d0
  19.     cmp.w #32,d0        ;a space
  20.     beq space
  21.     cmp.w #73,d0        ;capital I
  22.     beq eye
  23.     cmp.w #42,d0        ;end of string marker
  24.     beq end_of_string
  25. eyeback
  26.     sub.w #65,d0
  27.  
  28.     move.l a0,-(sp)
  29.     
  30.     move.l #font,a1
  31.     mulu.w #104,d0
  32.     add.l d0,a1    
  33.     
  34.     move.l #20,d0
  35. l1    move.l (a0),d1
  36.     or.l (a1)+,d1
  37.     move.l d1,(a0)
  38.     add.l #44,a0        ;44 = screen width.
  39.     dbf d0,l1
  40.  
  41.     move.l (sp)+,a0
  42.  
  43.     
  44.  
  45. space
  46.     rts
  47.  
  48. eye        ;a special case for I 'cos it's so skinny!
  49.     move.w ek,d1
  50.     add.w #4,d1
  51.     move.w d1,ek
  52.     bra eyeback
  53.  
  54. end_of_string            ;called at end of string to make sure it repeats
  55.     move.l #string,a0
  56.     move.l a0,string_adr
  57.     rts
  58.  
  59.     even
  60. font
  61.     incbin "bigfont.bin"
  62.     even