home *** CD-ROM | disk | FTP | other *** search
/ ZAM 3 / ZAM 3.adf / Source / Flowtxt.AMOS / Flowtxt.amosSourceCode
Encoding:
AMOS Source Code  |  1990-12-11  |  2.0 KB  |  60 lines

  1. ' Flowing text output program
  2. '
  3. '            By
  4. '
  5. '     Graham Stephenson  
  6. '
  7. ' This program is ALL my own work. Whilst it is a VERY primitive program 
  8. ' and easy to program, it can improve the look and feel of even the most 
  9. ' basic program in some cases. It makes your programs look more "IBMy" Use 
  10. ' this routine in conjunction with the Standardtxt.AMOS routine and you
  11. ' can slightly improve the look and feel of what is a very primitive 
  12. ' program. 
  13. '
  14. ' Hope you find this useful! 
  15. '
  16.  
  17. Screen Open 0,640,200,8,Hires
  18. Paper 0 : Flash Off : Cls 0
  19. Colour 1,$FFF : Colour 2,$E9E : Colour 3,$F00 : Colour 4,$FF0
  20. Colour 5,$1F0 : Colour 6,$444 : Colour 7,$8BF
  21. Pen 2 : Curs Pen 4
  22.  
  23. TXT$="Welcome to this flowing text intro. It can improve the most basic @"
  24. TXT$=TXT$+"display and make it look better (in my opinion anyway!) @"
  25. TXT$=TXT$+"It is also possible to make it go to the next line just @"
  26. TXT$=TXT$+"by putting in certain letters and checking those letters @"
  27. TXT$=TXT$+"before they are output to the screen so that necessary @"
  28. TXT$=TXT$+"alterations can be made. Return! @"
  29. TXT$=TXT$+"And again! @"
  30. TXT$=TXT$+"}1You might want to add }2colors }1as well! @"
  31. TXT$=TXT$+"}3T}4r}3y }4t}3h}4i}3s }7Looks pretty impressive!@"
  32. TXT$=TXT$+"You could also add your own control codes so that @"
  33. TXT$=TXT$+"the underline and shade commands can be used. I'll leave @"
  34. TXT$=TXT$+"for you to sort out though! @"
  35. TXT$=TXT$+"}1G}2o}3o}4d}5b}6y}7e}1! @"
  36.  
  37. For T=1 To Len(TXT$)
  38.    OUTPUT=0
  39.    T$=Mid$(TXT$,T,1)
  40.    If T$="@" and OUTPUT=0
  41.       Print Chr$(13)
  42.       OUTPUT=1
  43.    End If 
  44.    If T$="}" and OUTPUT=0
  45.       Add T,1
  46.       T$=Mid$(TXT$,T,1)
  47.       Pen(Asc(T$)-48)
  48.       OUTPUT=1
  49.    End If 
  50.    If OUTPUT=0
  51.       Print T$;
  52.    End If 
  53.    Wait Vbl 
  54. Next T
  55.  
  56. ' There you have it! You could also enhance this a lot by using a 16 
  57. ' colour screen and have those letters 8-15 flashing. As a hint though,
  58. ' you would need to use Hexdecimal digits instead of denary ones.  
  59. '
  60. '                                               Graham Stephenson 11-12-92