home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 116 / 116.d81 / surprise (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  4KB  |  155 lines

  1. 10 poke53280,0:poke53281,0:print"[147]"
  2. 20 dv=peek(186):ifdv<8thendv=8
  3. 30 sys57812"birthday font",dv,0:poke780,0:poke781,0:poke782,56:sys65493
  4. 40 ck$="[154][221]                                [146][154][221]"
  5. 50 ul$="    ---------------------------------"
  6. 60 sp$="                            "
  7. 70 dv=peek(186):ifdv<8thendv=8
  8. 80 cl$(1)="love"
  9. 90 cl$(2)="sincerely yours"
  10. 100 cl$(3)="your friend"
  11. 110 cl$(4)="your younger friend"
  12. 120 cl$(5)="your older friend"
  13. 130 cl$(6)="make your own closing"
  14. 137 :
  15. 138 :rem title screen
  16. 139 :
  17. 140 poke53272,31:print"[147][129]      a program by  robert dallmann[155]"
  18. 150 printtab(18)"[158][\]
  19. 160 [153][163]18)"<=>
  20. 170 fori=1to7:printtab(18)"[154]$%&":next
  21. 180 printtab(3)"[154][213][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][201]"
  22. 190 printtab(18)"[145]$%&"
  23. 200 printtab(3)"[221][201][213][201][213][201][213][201][213][201][213][201][213][201][213][201][213][201][213][201][213][201][213][201][213][201][213][201][213][201][213][201][213][154][221]"
  24. 210 printtab(3)"[221][202][203][202][203][202][203][202][203][202][203][202][203][202][203][202][203][202][203][202][203][202][203][202][203][202][203][202][203][202][203][202][203][154][221]"
  25. 220 fori=0to1:printtab(3)ck$:next
  26. 230 printtab(3)"[154][171][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][179] "
  27. 240 fori=0to5:printtab(3)ck$:next
  28. 250 printtab(3)"[202][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][203]"
  29. 260 poke214,12:print:printtab(9)" birthday[160]surprise!!!"
  30. 270 printtab(13)" disclaimer: "
  31. 280 print"[159] neither loadstar nor the author"
  32. 290 print"  will be held accountable for  "
  33. 300 print" any injuries suffered, friend- "
  34. 310 print" ships destroyed, or any other  "
  35. 320 print"   malady that may result from  "
  36. 330 print"    the use of this program.    "
  37. 340 poke214,23:print:printtab(15)"press a key"
  38. 350 geta$:ifa$=""then350
  39. 357 :
  40. 358 :rem input screen
  41. 359 :
  42. 360 print"[147][155]":print"what is the birthday person's name?"
  43. 370 l9=16:printleft$(ul$,l9+5)"[145][145]":gosub1170:na$=q9$
  44. 380 print"what is your name?"
  45. 390 l9=16:printleft$(ul$,l9+5)"[145][145]":gosub1170:nb$=q9$
  46. 400 print"what is the current year? (19xx)"
  47. 410 l9=2:printleft$(ul$,l9+5)"[145][145]":gosub1170:y=val(q9$)
  48. 420 print"what is the birthday month? (1-12)"
  49. 430 printleft$(ul$,l9+5)"[145][145]":gosub1170:m=val(q9$)
  50. 440 print"what is the birth day? (1-31)"
  51. 450 printleft$(ul$,l9+5)"[145][145]":gosub1170:d=val(q9$)
  52. 460 print"what was the last leap year? (19xx)"
  53. 470 printleft$(ul$,l9+5)"[145][145]":gosub1170:ly=val(q9$)
  54. 480 print"what was the year of birth? (19xx)"
  55. 490 printleft$(ul$,l9+5)"[145][145]":gosub1170:yb=val(q9$)
  56. 500 gosub860:rem closing subroutine
  57. 507 :
  58. 508 :rem calculations
  59. 509 :
  60. 510 yy=y-yb:mm=yy*12:x=int((ly-yb)/4):dd=int(yy*365+x)
  61. 520 h=dd*24:mi=h*60:s=mi*60
  62. 530 gosub540:goto740
  63. 537 :
  64. 538 :rem card screen subroutine
  65. 539 :
  66. 540 print"[147]"
  67. 550 print"[211][211][211][211][211][211][211][211][211][211][211][211][211][211][211][211][211][211][211][211][211][211][211][211][211][211][211][211][211][211][211][211][211][211][211][211][211][211][211]":print
  68. 560 poke646,7
  69. 570 printleft$(sp$,12)m"/"d"/"y
  70. 580 printleft$(sp$,12)"happy birthday!"
  71. 590 poke646,7:printleft$(sp$,20-(len(na$)/2))na$
  72. 600 printleft$(sp$,7)"did you know that you are..."
  73. 610 poke646,3
  74. 620 printleft$(sp$,8)yy" years old"
  75. 630 printleft$(sp$,8)mm" months old"
  76. 640 printleft$(sp$,8)dd" days old"
  77. 650 printleft$(sp$,8)h" hours old"
  78. 660 printleft$(sp$,8)mi" minutes old"
  79. 670 printleft$(sp$,8)s" seconds old"
  80. 680 poke646,2:print
  81. 690 print"[211][211][211][211][211][211][211][211][211][211][211][211][211][211][211][211][211][211][211][211][211][211][211][211][211][211][211][211][211][211][211][211][211][211][211][211][211][211][211]":print
  82. 700 poke646,7
  83. 710 printleft$(sp$,20-(len(cl$(cl))/2))cl$(cl)","
  84. 720 printleft$(sp$,20-(len(nb$)/2))nb$:print
  85. 730 return
  86. 737 :
  87. 738 :rem print prompts
  88. 739 :
  89. 740 print"[155]  would you like to print this? (y[155]/n[155])"
  90. 750 getp$:ifp$=""then750
  91. 760 ifp$<>"y"then1050
  92. 770 print"[147]  be sure your printer is on and press"
  93. 780 print"     any key to begin printing..."
  94. 790 geta$:ifa$=""then790
  95. 797 :
  96. 798 :rem print routine
  97. 799 :
  98. 800 open4,4
  99. 810 cmd4
  100. 820 gosub550:rem card screen to printer
  101. 830 print#4
  102. 840 close4
  103. 850 goto 1050
  104. 857 :
  105. 858 :rem closing subroutine
  106. 859 :
  107. 860 print"[147]":print"[159][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164]"
  108. 870 print"[154][145]what closing would you like on the note?"
  109. 880 print"[152][145][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184]"
  110. 890 fori=1to6:printtab(9)i"[157]. "cl$(i):next
  111. 900 printtab(9)"[158][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164]"
  112. 910 printtab(9)"[159] enter your selection "
  113. 920 printtab(9)"[158][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163]"
  114. 922 fori=217to242:pokei,peek(i)or128:next:rem line links
  115. 930 getcl$:ifcl$=""then930
  116. 940 cl=val(cl$)
  117. 950 ifcl=6thengosub970
  118. 960 return
  119. 967 :
  120. 968 :rem custom closing
  121. 969 :
  122. 970 print""
  123. 980 print"[145][145][145][145][145]":print"[158]     enter your desired closing..."
  124. 990 l9=36:printleft$(ul$,l9+1)"[145][145]":gosub1170:cl$(6)=q9$
  125. 1000 return
  126. 1010 end
  127. 1020 :
  128. 1030 :rem  return to loadstar
  129. 1040 :
  130. 1050 print"[147]"tab(8)"[155] quit to loadstar? (y[155]/n[155])"
  131. 1060 geta$:ifa$=""then1060
  132. 1070 ifa$="y"then1090
  133. 1080 run40
  134. 1090 a$="hello connect":fori=8to9:close2:open2,i,2:close2:ifstthen1110
  135. 1100 close15:open15,i,15,"r0:"+a$+"="+a$:input#15,er:close15:ifer=63then1120
  136. 1110 next:print"[147]":poke2048,0:poke44,8:poke53272,23:poke186,8:end
  137. 1120 poke646,peek(53281):print"[147]load"chr$(34)a$chr$(34)","i
  138. 1130 print"run":poke44,8:poke2048,0:poke631,13:poke632,13:poke198,2:end
  139. 1140 :
  140. 1150 :rem  input routine
  141. 1160 :
  142. 1170 q9$="":print"    ";:u9=53280:poke198,0
  143. 1180 geta$
  144. 1190 poke646,rnd(1)*15+1:print"[164][157]";:ifa$=""then1180
  145. 1200 ifa$=chr$(13)thenprint" [155]":return
  146. 1210 if(a$=chr$(20)andlen(q9$))thenq9$=left$(q9$,len(q9$)-1):goto1250
  147. 1220 iflen(q9$)>=l9thent9%=peek(u9):pokeu9,1:pokeu9,t9%:goto1180
  148. 1230 ifa$<" "or(a$>chr$(127)anda$<chr$(160))ora$=chr$(34)then1180
  149. 1240 q9$=q9$+a$
  150. 1250 print""a$;:goto1180
  151. 1257 :
  152. 1258 :rem scratch and save
  153. 1259 :
  154. 10000 open15,8,15,"s0:surprise":close15:save"surprise",8:end
  155.