home *** CD-ROM | disk | FTP | other *** search
/ 17 Bit Software 4: Phase Four / 17Bit_Phase_Four.iso / files / 3023.dms / 3023.adf / Source-Code / InfoPad / InfoPad.amosSourceCode < prev    next >
Encoding:
AMOS Source Code  |  1994-02-21  |  9.0 KB  |  106 lines

  1. ' InfoPad (c) John White, 1993. All rights reserved. 
  2. Close Workbench : Close Editor : Hide On : Dim YZ(7) : Dim A$(19) : Dim XA(19) : Dim YA(19)
  3. A$(0)="                                                                            " : A$(1)="                                                                            "
  4. A$(2)="                                                                            " : A$(3)="                                                                            "
  5. A$(4)="                                                                            " : A$(5)="                                                                            "
  6. A$(6)="                                                                            " : A$(7)="                                                                            "
  7. A$(8)="                                                                            " : A$(9)="                                                                            "
  8. A$(10)="                                                                            " : A$(11)="                                                                            "
  9. A$(12)="                                                                            " : A$(13)="                                                                            "
  10. A$(14)="                                                                            " : A$(15)="                                                                            "
  11. A$(16)="                                                                            " : A$(17)="                                                                            "
  12. A$(18)="                                                                            " : A$(19)="                                                                            "
  13. Erase 15 : Reserve As Chip Work 15,15201 : TT=Start(15) : For Z=0 To 15200 : Poke TT+Z,32 : Next Z
  14. Q=0 : R=0 : S=1 : T=2 : U=77 : V=0 : W=0 : X=2 : Y=1 : YU=0 : Gosub 24 : Gosub 25 : Screen Open 1,640,80,4,Hires : Screen Hide 1 : Curs Off : Flash Off : Screen Display 1,128,145,640,60
  15. Screen Open 0,640,273,8,Hires : Unpack 14 To 0 : Screen Hide 0 : Curs Off : Paper 0 : Pen 1 : Flash Off : Screen Display 0,128,35,640,273 : Paste Bob 393,216,1 : Paste Bob 393,238,3 : Paste Bob 471,216,5 : Paste Bob 471,238,8 : Paste Bob 548,216,9
  16. Paste Bob 159,216,24 : Paste Bob 232,238,26 : Paste Bob 19,222,21 : Paste Bob 589,216,11 : Paste Bob 217,216,13 : Paste Bob 260,216,19 : Paste Bob 304,216,17 : Paste Bob 548,238,22 : Paste Bob 300,238,23 : Paste Bob 346,216,15 : Paste Bob 159,238,28
  17. Limit Mouse 128,42 To 440,290 : Get Palette 0 : For Z=0 To 7 : YZ(Z)=Colour(Z) : Colour Z,0 : Next Z : Screen Show 0 : Fade 1,YZ(0),YZ(1),YZ(2),YZ(3),YZ(4),YZ(5),YZ(6),YZ(7) : Wait 8 : Paper 2 : Show On 
  18. 0
  19. Reserve Zone 13 : Set Zone 1,393,216 To 456,232 : Set Zone 2,393,238 To 456,254 : Set Zone 3,471,216 To 534,232 : Set Zone 4,471,238 To 534,254 : Set Zone 5,548,216 To 581,232 : Set Zone 6,589,216 To 622,232 : Set Zone 7,217,216 To 250,232
  20. Set Zone 8,260,216 To 293,232 : Set Zone 9,304,216 To 337,232 : Set Zone 10,346,216 To 379,232 : Set Zone 11,159,216 To 209,232 : Set Zone 12,232,238 To 292,254 : Set Zone 13,159,238 To 218,254
  21. 1
  22. Z$=Inkey$ : SC=Scancode : MZ=Mouse Zone : MK=Mouse Key : If Z$=>Chr$(32) and S=0 Then If Z$<Chr$(127) and S=0 Then Q=0 : Gosub 12
  23. If SC=70 and S=0 Then Gosub 13
  24. If MZ=8 and MK=1 and S=0 or SC=79 and S=0 Then Paste Bob 217,216,13 : Paste Bob 260,216,20 : Paste Bob 304,216,17 : Paste Bob 346,216,15 : If R>0 Then Dec R : Gosub 18 : Gosub 11 : Gosub 28
  25. If MZ=9 and MK=1 and S=0 or SC=78 and S=0 Then Paste Bob 217,216,13 : Paste Bob 260,216,19 : Paste Bob 304,216,18 : Paste Bob 346,216,15 : If R<9 Then Add R,1 : Gosub 19 : Gosub 11 : Gosub 28
  26. If MZ=8 and MK=1 and S=1 or SC=79 and S=1 Then Paste Bob 217,216,13 : Paste Bob 260,216,20 : Paste Bob 304,216,17 : Paste Bob 346,216,15 : If R>0 Then Dec R : Gosub 18 : Gosub 16 : Gosub 28
  27. If MZ=9 and MK=1 and S=1 or SC=78 and S=1 Then Paste Bob 217,216,13 : Paste Bob 260,216,19 : Paste Bob 304,216,18 : Paste Bob 346,216,15 : If R<9 Then Add R,1 : Gosub 19 : Gosub 16 : Gosub 28
  28. If MZ=7 and MK=1 and S=0 Then Paste Bob 217,216,14 : Paste Bob 260,216,19 : Paste Bob 304,216,17 : Paste Bob 346,216,15 : R=0 : Gosub 25 : Gosub 11 : Gosub 28
  29. If MZ=10 and MK=1 and S=0 Then Paste Bob 217,216,13 : Paste Bob 260,216,19 : Paste Bob 304,216,17 : Paste Bob 346,216,16 : R=9 : Gosub 26 : Gosub 11 : Gosub 28
  30. If MZ=7 and MK=1 and S=1 Then Paste Bob 217,216,14 : Paste Bob 260,216,19 : Paste Bob 304,216,17 : Paste Bob 346,216,15 : R=0 : Gosub 25 : Gosub 16 : Gosub 28
  31. If MZ=10 and MK=1 and S=1 Then Paste Bob 217,216,13 : Paste Bob 260,216,19 : Paste Bob 304,216,17 : Paste Bob 346,216,16 : R=9 : Gosub 26 : Gosub 16 : Gosub 28
  32. If R+1<10 Then Text 344,249,Str$(R+1)+" "
  33. If R+1>9 Then Text 344,249,Str$(R+1)
  34. If MZ=1 and MK=1 Then Paste Bob 393,216,2 : Paper 3 : Pen 4 : Gosub 32 : If Exist("DF0:"+W$) Then Erase 15 : Load "DF0:"+W$,15 : Paste Bob 393,216,1 : Gosub 28 Else Paste Bob 393,216,1
  35. If MZ=2 and MK=1 Then Paste Bob 393,238,4 : Paper 3 : Pen 4 : Gosub 32 : Save "DF0:"+W$,15 : Paste Bob 393,238,3
  36. If MZ=3 and MK=1 Then Paste Bob 471,216,6 : Paste Bob 471,238,7 : S=0
  37. If MZ=4 and MK=1 Then Paste Bob 471,238,8 : Paste Bob 471,216,5 : S=1
  38. If MZ=6 and MK=1 and S=0 or SC=77 and S=0 Then YU=1 : Paste Bob 548,216,9 : Paste Bob 589,216,12 : Add W,1 : Gosub 11 : YU=0
  39. If MZ=5 and MK=1 and S=0 or SC=76 and S=0 Then YU=1 : Paste Bob 589,216,11 : Paste Bob 548,216,10 : Dec W : Gosub 11 : YU=0
  40. If MZ=6 and MK=1 and S=1 or SC=77 and S=1 Then Paste Bob 548,216,9 : Paste Bob 589,216,12 : Add W,1 : Gosub 16
  41. If MZ=5 and MK=1 and S=1 or SC=76 and S=1 Then Paste Bob 589,216,11 : Paste Bob 548,216,10 : Dec W : Gosub 16
  42. If W+1<10 Then Text 587,249,Str$(W+1)+" "
  43. If W+1>9 Then Text 587,249,Str$(W+1)
  44. If MZ=11 and MK=1 and S=0 Then Paste Bob 159,216,25 : Gosub 23 : Paste Bob 159,216,24
  45. If MZ=12 and MK=1 or SC=95 Then Paste Bob 232,238,27 : Gosub 10 : Paste Bob 232,238,26
  46. If SC=16 and S=1 or MZ=13 and MK=1 and S=1 Then Paste Bob 159,238,29 : End 
  47. Goto 1
  48. 10
  49. Screen 1 : Paper 3 : Pen 1 : Ink 1 : Get Palette 0 : Cls 0 : For Z=0 To 7 : Print At(0,Z);"                                                                                " : Next Z : Draw 0,0 To 639,0 : Draw 0,59 To 639,59 : Ink 3
  50. Draw 0,1 To 639,1 : Draw 0,58 To 639,58 : Ink 1 : Draw 0,2 To 639,2 : Draw 0,57 To 639,57 : Ink 0 : Draw 0,3 To 639,3 : Draw 0,56 To 639,56 : Print At(1,1);"All the Disks in this list are Free!" : Pen 0 : Print At(1,2);"They are of very high quality."
  51. Pen 1 : Print At(1,3);"Only the Top Brand name disks are used in this collection of Disks." : Pen 0 : Print At(1,4);"Buy 10 disks and automatically win your dream Holiday." : Pen 1 : Print At(1,6);"What a shame the above text is only an example!"
  52. Screen To Front 1 : Screen Show 1 : Wait Key : Cls : Screen To Back 1 : Screen 0 : Return 
  53. 11
  54. If W<0 Then W=19
  55. If W>19 Then W=0
  56. X=2 : Y=W+1 : U=77 : T=X : For Z=1 To 76 : Poke TT+XA(W)+Z,32 : Next Z : If YU=1 Then For Z=1 To 76 : Mid$(A$(W),Z,1)=Chr$(Peek(TT+XA(W)+Z)) : Next Z : Print At(X,Y);A$(W) : Gosub 24 : Return 
  57. 16
  58. If W<0 Then W=19
  59. If W>19 Then W=0
  60. X=2 : Y=W+1 : U=77 : T=X : Gosub 24 : Return 
  61. 12
  62. If V=1 Then X=T : V=0
  63. Paper 2 : Pen 1 : If X<=U Then Locate X,Y : Print Z$; : Gosub 14 : Add X,1 : If X>U Then Q=1
  64. If Q=1 and W=>0 and W<19 and X>U Then Add W,1 : Gosub 16
  65. Return 
  66. 13
  67. If X=>T Then Dec X : If X<T Then V=1
  68. If V=1 and W=>1 Then Dec W : Y=W+1 : X=U : V=0 : YA(W)=77
  69. Paper 2 : Pen 1 : If X=>T Then Locate X,Y : Print " "; : Gosub 15
  70. Return 
  71. 14
  72. Poke TT+XA(W)+YA(W),Asc(Z$) : Add YA(W),1 : Return 
  73. 15
  74. Dec YA(W) : Poke TT+XA(W)+YA(W),32 : Return 
  75. 18
  76. For Z=0 To 19 : XA(Z)=XA(Z)-76 : Next Z : Return 
  77. 19
  78. For Z=0 To 19 : Add XA(Z),76 : Next Z : Return 
  79. 23
  80. For Z=1 To 76 : For MA=0 To 19 : Poke TT+XA(MA)+Z,32 : Next MA : Next Z : Gosub 28 : Return 
  81. 24
  82. For Z=0 To 19 : YA(Z)=1 : Next Z : Return 
  83. 25
  84. XA(0)=0 : XA(1)=760 : XA(2)=1520 : XA(3)=2280 : XA(4)=3040 : XA(5)=3800 : XA(6)=4560 : XA(7)=5320 : XA(8)=6080 : XA(9)=6840 : XA(10)=7600 : XA(11)=8360
  85. XA(12)=9120 : XA(13)=9880 : XA(14)=10640 : XA(15)=11400 : XA(16)=12160 : XA(17)=12920 : XA(18)=13680 : XA(19)=14440 : Return 
  86. 26
  87. XA(0)=684 : XA(1)=1444 : XA(2)=2204 : XA(3)=2964 : XA(4)=3724 : XA(5)=4484 : XA(6)=5244 : XA(7)=6004 : XA(8)=6764 : XA(9)=7524 : XA(10)=8284 : XA(11)=9044 : XA(12)=9804
  88. XA(13)=10564 : XA(14)=11324 : XA(15)=12084 : XA(16)=12844 : XA(17)=13604 : XA(18)=14364 : XA(19)=15124 : Return 
  89. 28
  90. For Z=1 To 76 : For MA=0 To 19 : Mid$(A$(MA),Z,1)=Chr$(Peek(TT+XA(MA)+Z)) : Next MA : Next Z : Paper 2 : Pen 1 : For Z=0 To 19 : Print At(2,Z+1);A$(Z) : Next Z : Return 
  91. 32
  92. W$="" : EA=0 : EB=3 : EC=28 : Print At(3,28);"               ";At(3,28);
  93. 33
  94. U$=Inkey$ : If U$=Chr$(13) Then If W$="" Then Goto 33
  95. If U$=Chr$(13) Then Return 
  96. If U$=>Chr$(32) Then If U$<Chr$(127) Then Gosub 34
  97. If Scancode=70 or Scancode=65 Then Gosub 35
  98. Goto 33
  99. 34
  100. If EA=1 Then EB=3 : EA=0
  101. If EB<=17 Then Locate EB,EC : Print U$; : W$=W$+U$ : Add EB,1
  102. Return 
  103. 35
  104. If EB=>3 Then Dec EB : If EB<3 Then EA=1
  105. If EB=>3 Then Locate EB,EC : Print " "; : W$=Mid$(W$,1,Len(W$)-1)
  106. Return