├── .gitignore ├── LICENSE ├── README.md ├── adler32.bas ├── args.bas ├── cp.bas ├── doot.vtt ├── dootplayer.bas ├── forth.bas ├── msgboard.bas ├── paint.bas ├── paintv2.bas ├── parsekeys.bas ├── pman.bas ├── pman.man ├── smalltar.bas ├── tc.bas └── tc.man /.gitignore: -------------------------------------------------------------------------------- 1 | _/ -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## Telehack BASIC Programs 2 | A Collection of my BASIC Programs 3 | 4 | | Filename | Description | 5 | | -------------- | ------------------------------------------------------------------------------------------ | 6 | | paint.bas | Painting Program | 7 | | paintv2.bas | Painting Program v2 (Uses INKEY for Instant Drawing) | 8 | | adler32.bas | Create [Adler32](https://en.wikipedia.org/wiki/Adler-32) Hash | 9 | | forth.bas | FORTH Interpreter (Commands: + - / * dup swap rot over) | 10 | | dootplayer.bas | VT File Player (needs doot.vtt) | 11 | | msgboard.bas | A Message Board. Shows a X-Mas Animation in December. This is my current BBS | 12 | | smalltar.bas | A somewhat whacky TAR Implementation. Only Supports Files smaller than 1k | 13 | | args.bas | Parses Command-Line Args passed to the Program. Example: `args.bas arg1 Hello World 12345` | 14 | | parsekeys.bas | Parses Arrow-Keys/F1-F12 from INKEY$ Input | 15 | | cp.bas | Copies a File, utilizing ARG$ for Parsing the Parameters | 16 | | tc.bas | telecommander - a simplified mc-clone, see tc.man | 17 | | pman.bas | a pacman clone, with support for user made levels, see pman.man | -------------------------------------------------------------------------------- /adler32.bas: -------------------------------------------------------------------------------- 1 | 1 a = 1 2 | 2 b = 0 3 | 10 def fnShl(x,n)=x*(2^n) 4 | 15 input "enter a string:", dat$ 5 | 30 valuelen = len(dat$) 6 | 40 for i = 1 to valuelen 7 | 50 a = (a + asc(mid$(dat$,i,1))) mod 65521 8 | 60 b = (b + a) mod 65521 9 | 70 next i 10 | 80 result$ = hex$(fnShl(b,16) or a) 11 | 85 result2$ = "" 12 | 86 if len(result$) = 8 then goto 120 13 | 90 for i = 1 to 8 - len(result$) 14 | 100 result2$ = str$(result2$) + "0" 15 | 110 next i 16 | 120 endresult$ = mid$(result2$,1,len(result2$)) + mid$(result$,1,len(result$)) 17 | 130 print "The Result is:" + mid$(endresult$,1,len(endresult$)) 18 | -------------------------------------------------------------------------------- /args.bas: -------------------------------------------------------------------------------- 1 | 20 DELIMITER$ = " " 2 | 40 MAXSTACK% = 0 3 | 45 REM PUT YOUR PROGRAM LOGIC HERE BEFORE ARGS PARSING 4 | 50 GOSUB 100 5 | 55 REM PUT YOUR PROGRAM LOGIC HERE AFTER ARGS PARSING 6 | 59 GOTO 1000 7 | 60 END 8 | 100 REM split 9 | 110 TSTR$ = "" 10 | 120 FOR I% = 1 TO LEN(ARG$) 11 | 130 IF MID$(ARG$, I%, 1) = DELIMITER$ THEN GOTO 200 12 | 140 TSTR$ = TSTR$ + MID$(ARG$, I%, 1) 13 | 150 IF I% = LEN(ARG$) THEN GOTO 200 14 | 160 NEXT I% 15 | 170 RETURN 16 | 200 REM We have found a delimiter and are pushing it into the Array 17 | 210 MAXSTACK% = MAXSTACK% + 1 18 | 220 ARRAY$(MAXSTACK%) = TSTR$ 19 | 230 TSTR$ = "" 20 | 240 GOTO 160 21 | 1000 REM PROGRAM CONTINUES HERE... 22 | 1010 FOR I% = 0 TO MAXSTACK% 23 | 1020 PRINT ARRAY$(I%) 24 | 1030 NEXT I% 25 | -------------------------------------------------------------------------------- /cp.bas: -------------------------------------------------------------------------------- 1 | 10 DELIMITER$ = " " 2 | 20 MAXSTACK% = 0 3 | 30 GOSUB 60 4 | 40 GOTO 190 5 | 50 END 6 | 60 REM split 7 | 70 TSTR$ = "" 8 | 80 FOR I% = 1 TO LEN(ARG$) 9 | 90 IF MID$(ARG$, I%, 1) = DELIMITER$ THEN GOTO 140 10 | 100 TSTR$ = TSTR$ + MID$(ARG$, I%, 1) 11 | 110 IF I% = LEN(ARG$) THEN GOTO 140 12 | 120 NEXT I% 13 | 130 RETURN 14 | 140 REM We have found a delimiter and are pushing it into the Array 15 | 150 MAXSTACK% = MAXSTACK% + 1 16 | 160 ARRAY$(MAXSTACK%) = TSTR$ 17 | 170 TSTR$ = "" 18 | 180 GOTO 120 19 | 190 REM PROGRAM CONTINUES HERE... 20 | 200 FOR I% = 0 TO MAXSTACK% 21 | 210 IF OPT$ = "-v" THEN PRINT "Source Filename: "; SRC$ : PRINT "Destination Filename: "; DST$ : PRINT "Optional Arguments: "; OPT$ 22 | 220 SRC$ = ARRAY$(1) 23 | 230 DST$ = ARRAY$(2) 24 | 240 OPT$ = ARRAY$(3) 25 | 250 IF SRC$ = "" OR DST$ = "" THEN GOTO 400 26 | 260 IF OPT$ = "-v" THEN PRINT "Opening Source File: "; SRC$; "..." 27 | 270 OPEN SRC$, AS #1 28 | 280 IF OPT$ = "-v" THEN PRINT "Opening Destination File: "; DST$; "..." 29 | 290 OPEN DST$, AS #2 30 | 300 IF EOF(1) = -1 THEN GOTO 350 31 | 310 INPUT# 1, SRCCONTENT$ 32 | 320 IF OPT$ = "-v" THEN PRINT "Read one Line, containing "; LEN(SRCCONTENT$); " Bytes" : PRINT "Writing to Destination File..." 33 | 330 PRINT# 2, SRCCONTENT$ 34 | 340 GOTO 300 35 | 350 IF OPT$ = "-v" THEN PRINT "Closing Filehandles..." 36 | 360 CLOSE #1 37 | 370 CLOSE #2 38 | 380 IF OPT$ = "-v" THEN PRINT "File successfully copied" 39 | 390 END 40 | 399 REM Incase Parameters are missing, print a message and exit 41 | 400 PRINT "Usage: cp.bas [-v]" 42 | 410 END 43 | -------------------------------------------------------------------------------- /doot.vtt: -------------------------------------------------------------------------------- 1 | [2J[H[H 2 | .,::;'. 3 | .:dkkOOOOOxoc'. 4 | .;oxkkO0000000Oxdl:' 5 | ;loodxk000000000Okdl:;. 6 | .:ccclodk000000000Oxdc:;. 7 | .;;;;::loxO0000000kxdl:;'. 8 | .'...',:cldk0000Okdoll:,''. 9 | ......';:ldk000kdlc:::''... 10 | .. ...',:okkxooc:;;;'. 11 | .'. ...';dl;'....,.. .. 12 | ',. ..'d;. .c. ..' 13 | .',,,',;'. .,l. .. 14 | ..,::,;::d:c, . 15 | .';,... .';,,;. 16 | ..'..':cccccc,. 17 | .'',,....... . 18 | ..''''... . .. . 19 | ..... ..,'.....' , ' 20 | '. .....;... , .. 21 | ., .':.c';;;. .. 22 | .''.';.;.,..,'';;,. 23 | .:,;,c,c..;..'.';c:;. 24 | .:,c:l.,c.,...',.':cc;'. . 25 | c:cc.c,,:... ,; ..,;:;,...... 26 | .:,' '.:.'.,'.' .lkoc:;' 27 | ,;'.. ... .:odll; 28 | ':oxl .;cc:. 29 | .'. ... 30 | 31 | 32 | [H 33 | .,::;'. 34 | .:dkkOOOOOxoc'. 35 | .;oxkkO0000000Oxdl:' 36 | ;loodxk000000000Okdl:;. 37 | .:ccclodk000000000Oxdc:;. 38 | .;;;;::loxO0000000kxdl:;'. 39 | .'...',:cldk0000Okxoll:,''. 40 | ......';:ldk000kdlc:::''... 41 | .. ...',:okkxooc:;;;'. 42 | .'. ...';dl;'....,.. .. 43 | ',. ..'d;. .c. ..' 44 | .',,,',;'. .,l. .. 45 | ..,::,;::d:c, . 46 | .';,... .';,,;. 47 | ..'..':cccccc,. 48 | .'',,....... . 49 | ..''''... . .. . 50 | ..... ..,'.....' , ' 51 | '. .....;... , .. 52 | ., .':.c';;;. .. 53 | .''.';.;.,..,'';;,. 54 | .:,;,c,c..;..'.';c:;. 55 | .:,c:l.,c.,...',.':cc;'. . 56 | c:cc.c,,:... ,; ..,;:;,...... 57 | .:,' '.:.'.,'.' .lkoc:;' 58 | ,;'.. ... .:odll; 59 | ':oxl .;cc:. 60 | .'. ... 61 | 62 | 63 | [H 64 | .,::;'. 65 | .:dkkOOOOOxoc'. 66 | .;oxkkO0000000Oxdl:' 67 | ;loodxk000000000Okdl:;. 68 | .:ccclodk000000000Oxdc:;. 69 | .;;;;::loxO0000000kxdl:;'. 70 | .'...',:cldk0000Okxoll:,''. 71 | ......';:ldk000kdlc:::''... 72 | .. ...',:okkxooc:;;;'. 73 | .'. ...';dl;'....,.. .. 74 | ',. ..'d;. .c. ..' 75 | .',,,',;'. .,l. .. 76 | ..,::,;::d:c, . 77 | .';,... .';,,;. 78 | ..'..':cccccc,. 79 | .'',,....... . 80 | ..''''... . .. . 81 | ..... ..,'.....' , ' 82 | '. .....;... , .. 83 | ., .':.c';;;. .. 84 | .''.';.;.,..,'';;,. 85 | .:,;,c,c..;..'.';c:;. 86 | .:,c:l.,c.,...',.':cc;'. . 87 | c:cc.c,,:... ,; ..,;:;,...... 88 | .:,' '.:.'.,'.' .lkoc:;' 89 | ,;'.. ... .:odll; 90 | ':oxl .;cc:. 91 | .'. ... 92 | 93 | 94 | [H 95 | .,::;'. 96 | .:dkkOOOOOxoc'. 97 | .;oxkkO0000000Oxdl:' 98 | ;loodxk000000000Okdl:;. 99 | .:ccclodk000000000Oxdc:;. 100 | .;;;;::loxO0000000kxdl:;'. 101 | .'...',:cldk0000Okxoll:,''. 102 | ......';:ldk000kdlc:::''... 103 | .. ...',:okkxooc:;;;'. 104 | .'. ...';dl;'....,.. .. 105 | ',. ..'d;. .c. ..' 106 | .',,,',;'. .,l. .. 107 | ..,::,;::d:c, . 108 | .';,... .';,,;. 109 | ..'..':cccccc,. 110 | .'',,....... . 111 | ..''''... . .. . 112 | ..... ..,'.....' , ' 113 | '. .....;... , .. 114 | ., .':.c';;;. .. 115 | .''.';.;.,..,'';;,. 116 | .:,;,c,c..;..'.';c:;. 117 | .:,c:l.,c.,...',.':cc;'. . 118 | c:cc.c,,:... ,; ..,;:;,...... 119 | .:,' '.:.'.,'.' .lkoc:;' 120 | ,;'.. ... .:odll; 121 | ':oxl .;cc:. 122 | .'. ... 123 | 124 | 125 | [H 126 | .,:cc:,'.. 127 | 'lxkkOOOOkxoc;'. 128 | .;oxkkOO00000Okdol:' 129 | .'clodxOO00000000Oxoc:,. 130 | .'::cloxO000000000Odlc:,. 131 | ..,,;:cldkO000000Okxo:;,,. 132 | ....';:coxkOOOkkxddo:;,,'. 133 | .....,;coxOkkdolccc:,''.. 134 | ...,:oxkdolc:;;;,. 135 | .. ...,lc,''...'... . 136 | .... ..l;. ;. ..;' 137 | .'','.;' .:' .. 138 | .;;,',:ol;;. . 139 | ...'. ...,,';,. 140 | .....,;;::c;'. 141 | ..'........ 142 | ........ . . 143 | ..' ..'. .. .. 144 | .....'''.. . 145 | .. ',,'',;'. . 146 | ...,,,,'..'';,;. 147 | ;;,,;,'...'.,:,'... 148 | ':cc:,;''.' ..;:,..... 149 | 'oc:,:,;,'.'. .;,,,......... 150 | ,:...';'..;:. ..'''.',,''. 151 | ..... ....'. .;::c::;,. 152 | .;lc;. .,;lllc, 153 | .';. .',,,,. 154 | ... 155 | 156 | [H 157 | ':lll:;'. 158 | .cxkkOOOOkxdol;. 159 | 'ldxkOO00000Okxdlc;. 160 | .:lodxkO00000000Oxolc:. 161 | .;:clodk0000000000xoc:;' 162 | .'',;:ldkO000000Okxoc:;;' 163 | ....,:codkkkkkkxddo:;;,,' 164 | ..';:ldkkxdolcccc;,'... 165 | ..':ldxdolc:;;;,. . 166 | .. ..,c:,''...'... . 167 | .. .c;. ,' ':: 168 | ..''.,. ,, .. 169 | .,;,.':ol,;. . 170 | .',. ...',.;;, 171 | ....,,;:::,. 172 | ..'..... .. 173 | ....''. .. . 174 | .' .., .. . 175 | ,....,.,. ' 176 | ,. ',''.;;' .. 177 | ...,,;,;..;':,, 178 | ,:,,,,.'..,';c;. 179 | ':lc:.c'... .':l:. 180 | :ol;'o.;'..;. .;cc:. 181 | ::..''c...:c .';;;,...... 182 | ... . ....' ,oxoc;,,. 183 | 'co:. .. ,cdkol:' 184 | ,,;. .':ccc;. 185 | ..'. 186 | 187 | [H 188 | .,:cl:;,'. 189 | .'cdkOOOOOkxdl:,. 190 | .,coxkO000000Oxdol:. 191 | .,codxkO00000000kdolc, 192 | .':cldxOO00000000kolc:,. 193 | ..',:coxkO000000OOdlc:;;. 194 | . ..';:ldxxkkkkxdxdc:;;;,. 195 | ..,:cdxxddolcclc;,,... 196 | .';cdxdolc::;:;. 197 | ..'c:,,'....'.. .. 198 | . .:;. ., .:c' 199 | .....'' ',. 200 | .''.':ll;,. . 201 | ........'.,::'. 202 | . ..',,;;,.. 203 | ....... .. 204 | ...'..... . . 205 | .'. ..'. . . 206 | .....,',.. . 207 | ....''...;'. .. 208 | ...:,:',..;,:.. 209 | ,:,,',....,,,,.. 210 | ;cl;:';'.....'''.. 211 | .co;:':',. .,'..'''.. 212 | .:''.;';''.',.....'''....... 213 | .......'... ....':c:;,... 214 | ,::.. . ..';cloc:'. 215 | .;:,. ..,;:cc;.. 216 | ....','. 217 | 218 | [H 219 | .':l::;;'. 220 | .ckkOO0OOkxdoc. 221 | .coxkO0KKK00Oxdoo; 222 | ,looxk00KKKKKKOxdolc. 223 | ,:codxO0KKKKKKKOxooc:' 224 | .';:loxk00KKKK00xolc:c; 225 | ...';:oddxkkkxxkxol::c:,. 226 | .';:oooooollloo:;;,... 227 | ..,:oooolcc:;::,. . 228 | ..::;,,'...,'. .c 229 | . ,;.. ,. .:lo. 230 | .'.'. .;. . 231 | ..'';:cc',. . 232 | ... ...'':cc, 233 | ....',;;,.. 234 | .. . ... 235 | ..... .. .. .. 236 | ... ,.' . 237 | ''''','.. 238 | ',,''..;;. . 239 | .'l,c.',.;;; 240 | ,;',.'. .',:' 241 | .clc.;'., .::,. 242 | ,dl.l..,.. ':c;. 243 | ,; :.l'.,, .':c;. . . 244 | . ......,. .,;;,...... 245 | .:;. .. 'ccoc:;,,. 246 | .,:l. .':cdlc::. 247 | .'::cc:'. 248 | .... 249 | [H 250 | .cdxkkxxolc,. 251 | .cdkO0000Okxdoo: 252 | .cooxkO0KKKKKOkdool. 253 | ,:oodkOKKKKKKK0kdool' 254 | .,:codk0KKKKKKKOdolcc; 255 | ..';:ldxkO00000Odolccc;. 256 | ..,:lddddddddddlc::,... 257 | .,:odddoolccll:. ... 258 | ..:l::;;,'.;,'. .; 259 | .:'.. ,...,::l. 260 | ...,'. .', ... 261 | .'.,',:d;;' . 262 | .'.....'':,cc' 263 | ...',,;cc;'. 264 | .......... 265 | ..',,... . . 266 | ....'.: .. 267 | .,;.'',, 268 | .,,:..,,;. . 269 | .;c:'': .;:. 270 | ,;;'.'..,.;:' 271 | .lo',:.'. .::,. 272 | :d.c:';.; '::;. . 273 | :.,.c,.'c. .,;,'. .... 274 | ... . ..'. .'cc:;,'',' 275 | :l:. .. ..,clxklc:;. 276 | .,c' ..;:cdxlo;. 277 | .':::;,. 278 | 279 | 280 | [H 281 | .cdxkkxxolc,. 282 | .cdkO0000Okxdoo: 283 | .cooxkO0KKKKKOkdool. 284 | ,:oodkOKKKKKKK0kdool' 285 | .,:codk0KKKKKKKOdolcc; 286 | ..';:ldxkO00000Odolccc;. 287 | ..,:lddddddddddlc::,... 288 | .,:odddoolccll:. ... 289 | ..:l::;;,'.;,'. .; 290 | .:'.. ,...,::l. 291 | ...,'. .', ... 292 | .'.,',:d;;' . 293 | .'.....'':,cc' 294 | ...',,;cc;'. 295 | .......... 296 | ..',,... .. . 297 | ....'.: .. 298 | .,;.'',, 299 | .,,:..,,;. . 300 | .;c:'': .;:. 301 | ,;;'.'..,.;:' 302 | .lo',:.'. .::,. 303 | :d.c:';.; '::;. . 304 | :.,.c,.'c. .,;,'. .... 305 | ... . ..'. .'cc:;,'',' 306 | :l:. .. ..,clxklc:;. 307 | .,c' ..;:cdxlo;. 308 | .':::;,. 309 | 310 | 311 | [H 312 | .''..... 313 | .cdkkOOOkxdl:. 314 | .codkO0K000Oxdol, 315 | 'cooxkOKKKKK00kdol;. 316 | ':codk0KKKKKKKOxolcc. 317 | .';codkO0KKKKK0xolccc, 318 | ..;:oddkkOOOO0docc:;,'. 319 | ..;codxddoooodl:'. . 320 | .,clccc::,;::,. ' 321 | ,;'... .;......:, 322 | ..;. .,. ',,. 323 | .''.. .c;;' .. 324 | .',',..''.',;, 325 | .'..,;;loc:, 326 | .....'.... . 327 | ....','. ... . 328 | ... ..,.;. . 329 | .:'..:, . 330 | .cc.,..;,' 331 | .:;.:. .';, 332 | .c:,;..; .,:,. 333 | :c.o'.' ';:,. .. 334 | 'c c.c'l. .,,... ... 335 | ,...:.':; ..'::,'....'. 336 | .. . ..'....,:cclc:;;,. 337 | .:oc. .'::cd0klc:. 338 | .,;. .,:ccoxll,. 339 | ...... 340 | 341 | 342 | [H 343 | . 344 | .',;:cc;;,'. 345 | .',lxkOOOkkxdoc. 346 | ..,cdxkO00000Okxol; 347 | ..codxk0000000Okdolc. 348 | .;codxO0000000kdollc' 349 | .;codxkOOOO00kdollc;, 350 | ..,coxxxxxxxxkdl;,.. . 351 | .,coooollccll:. . 352 | .,:,'... .:,''. .,. 353 | .;' .,' ...'. 354 | ..,. .';, .'. 355 | .;,.',.,,...,'. 356 | .,...,;;ocl;. 357 | ....',;;,,'. 358 | ......... .'. 359 | ..','..'''''. 360 | ,:.'.,,.. 361 | ;:;,'..;,' 362 | ':,''....;;. 363 | .c,:,.'' ':,. .. 364 | .c';;;,:. ..';,........ 365 | ;'.';,,:'. .;:;,'...''. 366 | .'...'.',,.',:lllc:;,.. 367 | ',. ...',,:ldxxoc,.. 368 | .:o; .',ccodo:'.. 369 | ... ....''... 370 | 371 | 372 | 373 | [H 374 | ..... 375 | ;dxkkkkkxdo:. 376 | .;odxkOO00Okkxdo, 377 | clddkO0000000kxdo:. 378 | ;codxO0000000Oxdoll. 379 | .,coxxO0000000xdoolc, 380 | ..,coxkkOOOOO0xol:,..' 381 | .,codxxddooddc' . 382 | .':;,'....c;,, ,, 383 | ;; ,,.....;, 384 | ..,. .;;. .,. 385 | ..:,..:,,; ''. 386 | .;...';.oldc, . 387 | .,.',;ccc;,. .. 388 | .......... ..; .. 389 | ..';c:..;.'.,' . 390 | :c.,'',.' 391 | c:.:. .,;. 392 | ;:',..: .,;,. ... .. 393 | ,l.l,.;. .;'. ... 394 | 'l l.:;o. ...;;'.....'' 395 | :.;.l.;,,..':cc:;:;;;; 396 | .......,.'';:looddol:' 397 | ::' .;:cloO0Odo. 398 | .co, .':llxo:. 399 | . 400 | 401 | 402 | 403 | 404 | [H 405 | ..... 406 | ;dxkkkkkxdo:. 407 | .;odxkOO00Okkxdo, 408 | clddkO0000000kxdo:. 409 | ;codxO0000000Oxdoll. 410 | .,coxxO0000000xdoolc, 411 | ..,coxkkOOOOO0xol:,..' 412 | .,cddxxddooddc' . 413 | .':;,'....c;,, ,, 414 | ;; ,,.....;, 415 | ..,. .;;. .,. 416 | ..:,..:,,; ''. 417 | .;...';.oldc, . 418 | .,..,;ccc;,. .. 419 | .......... ..; .. 420 | ..';c:..;.'.,' . 421 | :c.,''''' 422 | c:.:. .';,. ...... 423 | ;:',..; .,:;. .... 424 | ,l.l,.;. '. .'.. ...'' 425 | 'l l.c,....,::;,'..''',,. 426 | :.;.c.;'..':cll::::;;;;. 427 | ......''',,:looldoooc:, 428 | ::, ',::cllokO0Ood; DO 429 | .co, .;:cook00koc. 430 | ',:;cc:'. 431 | 432 | 433 | 434 | 435 | [H 436 | ..... 437 | ;dxkkkkkxdo:. 438 | .;odxkOO00Okkxdo, 439 | clddkO0000000kxdo:. 440 | ;codxO0000000Oxdoll. 441 | .,coxxO0000000xdoolc, 442 | ..,coxkkOOOOO0xol:,..' 443 | .,cddxxddooddc' . 444 | .':;,'....c;,, ,, 445 | ;; ,,.....;, 446 | ..,. .;;. .,. 447 | ..:,..:,,; ''. 448 | .;...';.oldc, . 449 | .,..,;ccc;,. .. 450 | .......... ..; .. 451 | ..';c:..;.'.,' . 452 | :c.,''''' 453 | c:.:. .';,. ...... 454 | ;:',..; .,:;. .... 455 | ,l.l,.;. '. .'.. ...'' 456 | 'l l.c,....,::;,'..''',,. 457 | :.;.c.;'..':cll::::;;;;. 458 | ......''',,:looldoooc:, 459 | ::, ',::cllokO0Ood; DOOT 460 | .co, .;:cook00koc. 461 | ',:;cc:'. 462 | 463 | 464 | 465 | 466 | [H 467 | ..... 468 | ;dxkkkkkxdo:. 469 | .;odxkOO00Okkxdo, 470 | clddkO0000000kxdo:. 471 | ;codxO0000000Oxdoll. 472 | .,coxxO0000000xdoolc, 473 | ..,coxkkOOOOO0xol:,..' 474 | .,codxxddooddc' . 475 | .':;,'....c;,, ,, 476 | ;; ,,.....;, 477 | ..,. .;;. .,. 478 | ..:,..:,,; ''. 479 | .;...';.oldc, . 480 | .,..,;ccc;,. .. 481 | .......... ..; .. 482 | ..';c:..;.'.,' . 483 | :c.,'',.' 484 | c:.:. .,;. 485 | ;:',..: .,;,. .. .. 486 | ,l.l,.;. .;'. ... 487 | 'l l.:;o. ...;;'.....'' 488 | :.;.l.;,,..':cc:;:;;;, 489 | .......,.'';:looddolc' 490 | ::' .;:cloO0Odo' DOOT 491 | .co, .':llxo:. 492 | . 493 | 494 | 495 | 496 | 497 | [H 498 | ..... 499 | ;dxkkkkkxdo:. 500 | .;odxkOO00Okkxdo, 501 | clddkO0000000kxdo:. 502 | ;codxO0000000Oxdoll. 503 | .,coxxO0000000xdoolc, 504 | ..,coxkkOOOOO0xol:,..' 505 | .,codxxddooddc' . 506 | .':;,'....c;,, ,, 507 | ;; ,,.....;, 508 | ..,. .;;. .,. 509 | ..:,..:,,; ''. 510 | .;...';.oldc, . 511 | .,..,;ccc;,. .. 512 | .......... ..; .. 513 | ..';c:..;.'.,' . 514 | :c.,'''.' 515 | c:.:. .,;'. . 516 | ;:',..: .,:,. .... 517 | ,l.l,.;. ...... ..... 518 | 'l l.c;;. ..,:;,.....',. 519 | :.;.l.;,...,:cc:::;;;;. 520 | ......',',,;clooddolc,. 521 | ::' ..,;:clok00xo:. DOOT DO 522 | .co, ..';lldkko;'. 523 | . .....'.. 524 | 525 | 526 | 527 | 528 | [H 529 | ..... 530 | ;dxkkkkkxdo:. 531 | .;odxkOO00Okkxdo, 532 | clddkO0000000kxdo:. 533 | ;codxO0000000Oxdoll. 534 | .;coxxO0000000xdoolc, 535 | ..,coxkkOOOOO0xol:,..' 536 | .,codxxddooddc' . 537 | .':;,'....c;,, ,, 538 | ;; ,,.....;, 539 | ..,. .;;. .,. 540 | ..:,..:,,; ''. 541 | .;...';.oldc, . 542 | .,..,;ccc;,. .. 543 | .......... ..; .. 544 | ..';c:..;.'.,' . 545 | :c.,''''' 546 | c:.:. .';,. ...... 547 | ;:',..; .,:;. .... 548 | ,l.l,.;. '. .'.. ...'' 549 | 'l l.c,....,::;,'..''',,. 550 | :.;.c.;'..':cll::::;;;;. 551 | ......''',,:looldoooc:, 552 | ::, ',::cllokO0Ood; DOOT DOOT 553 | .co, .;:colk00klc. 554 | .,:;cc:'. 555 | 556 | 557 | 558 | 559 | [H 560 | ..... 561 | ;dxkkkkkxdo:. 562 | .;odxkOO00Okkxdo, 563 | clddkO0000000kxdo:. 564 | ;codxO0000000Oxdoll. 565 | .;coxxO0000000xdoolc, 566 | ..,coxkkOOOOO0xol:,..' 567 | .,codxxddooddc' . 568 | .':;,'....c;,, ,, 569 | ;; ,,.....;, 570 | ..,. .;;. .,. 571 | ..:,..:,,; ''. 572 | .;...';.oldc, . 573 | .,..,;ccc;,. .. 574 | .......... ..; .. 575 | ..';c:..;.'.,' . 576 | :c.,'',.' 577 | c:.:. .,;. 578 | ;:',..: .,;,. ... .. 579 | ,l.l,.;. .;'. ... 580 | 'l l.:;o. ...;;'.....'' 581 | :.;.l.,,,..':cc:;:;;;; 582 | .......,.'';:looxdol:' 583 | ::' .;:cloO0Odo' DOOT DOOT 584 | .co, .';llxo:. 585 | . 586 | 587 | 588 | 589 | 590 | [H 591 | ..... 592 | ;dxkkkkkxdo:. 593 | .;odxkOO00Okkxdo, 594 | clddkO0000000kxdo:. 595 | ;codxO0000000Oxdoll. 596 | .,coxxO0000000xdoolc, 597 | ..,coxkkOOOOO0xol:,..' 598 | .,cddxxddooddc' . 599 | .':;,'....c;,, ,, 600 | ;; ,,.....;, 601 | ..,. .;;. .,. 602 | ..:,..:,,; ''. 603 | .;...';.oldc, . 604 | .,..,;ccc;,. .. 605 | .......... ..; .. 606 | ..';c:..;.'.,' . 607 | :c.,''''' 608 | c:.:. .';,. ...... 609 | ;:',..; .,:;. .... 610 | ,l.l,.;. '. .'.. ...'' 611 | 'l l.c,....,::;,'..''',,. 612 | :.;.c.;'..':cll::::;;;;. 613 | ......''',,:looldoooc:, 614 | ::, ',::cllokO0Ood; DOOT DOOT ! 615 | .co, .;:cook00koc. 616 | ',:;cc:'. 617 | 618 | 619 | 620 | 621 | [H 622 | ..... 623 | ;dxkkkkkxdo:. 624 | .;odxkOO00Okkxdo, 625 | clddkO0000000kxdo:. 626 | ;codxO0000000Oxdoll. 627 | .,coxxO0000000xdoolc, 628 | ..,coxkkOOOOO0xol:,..' 629 | .,cddxxddooddc' . 630 | .':;,'....c;,, ,, 631 | ;; ,,.....;, 632 | ..,. .;;. .,. 633 | ..:,..:,,; ''. 634 | .;...';.oldc, . 635 | .,..,;ccc;,. .. 636 | .......... ..; .. 637 | ..';c:..;.'.,' . 638 | :c.,''''' 639 | c:.:. .';,. ...... 640 | ;:',..; .,:;. .... 641 | ,l.l,.;. '. .'.. ...'' 642 | 'l l.c,....,::;,'..''',,. 643 | :.;.c.;'..':cll::::;;;;. 644 | ......''',,:looldoooc:, 645 | ::, ',::cllokO0Ood; DOOT DOOT ! 646 | .co, .;:cook00koc. 647 | ',:;cc:'. 648 | 649 | 650 | 651 | 652 | [H 653 | ..... 654 | ;dxkkkkkxdo:. 655 | .;odxkOO00Okkxdo, 656 | clddkO0000000kxdo:. 657 | ;codxO0000000Oxdoll. 658 | .,coxxO0000000xdoolc, 659 | ..,coxkkOOOOO0xol:,..' 660 | .,cddxxddooddc' . 661 | .':;,'....c;,, ,, 662 | ;; ,,.....;, 663 | ..,. .;;. .,. 664 | ..:,..:,,; ''. 665 | .;...';.oldc, . 666 | .,..,;ccc;,. .. 667 | .......... ..; .. 668 | ..';c:..;.'.,' . 669 | :c.,''''' 670 | c:.:. .';,. ...... 671 | ;:',..; .,:;. .... 672 | ,l.l,.;. '. .'.. ...'' 673 | 'l l.c,....,::;,'..''',,. 674 | :.;.c.;'..':cll::::;;;;. 675 | ......''',,:looldoooc:, 676 | ::, ',::cllokO0Ood; DOOT DOOT ! 677 | .co, .;:cook00koc. 678 | ',:;cc:'. 679 | 680 | 681 | 682 | 683 | [H 684 | ..... 685 | ;dxkkkkkxdo:. 686 | .;odxkOO00Okkxdo, 687 | clddkO0000000kxdo:. 688 | ;codxO0000000Oxdoll. 689 | .,coxxO0000000xdoolc, 690 | ..,coxkkOOOOO0xol:,..' 691 | .,cddxxddooddc' . 692 | .':;,'....c;,, ,, 693 | ;; ,,.....;, 694 | ..,. .;;. .,. 695 | ..:,..:,,; ''. 696 | .;...';.oldc, . 697 | .,..,;ccc;,. .. 698 | .......... ..; .. 699 | ..';c:..;.'.,' . 700 | :c.,''''' 701 | c:.:. .';,. ...... 702 | ;:',..; .,:;. .... 703 | ,l.l,.;. '. .'.. ...'' 704 | 'l l.c,....,::;,'..''',,. 705 | :.;.c.;'..':cll::::;;;;. 706 | ......''',,:looldoooc:, 707 | ::, ',::cllokO0Ood; DOOT DOOT ! 708 | .co, .;:cook00koc. 709 | ',:;cc:'. 710 | 711 | 712 | 713 | 714 | [H 715 | ..... 716 | ;dxkkkkkxdo:. 717 | .;odxkOO00Okkxdo, 718 | clddkO0000000kxdo:. 719 | ;codxO0000000Oxdoll. 720 | .,coxxO0000000xdoolc, 721 | ..,coxkkOOOOO0xol:,..' 722 | .,cddxxddooddc' . 723 | .':;,'....c;,, ,, 724 | ;; ,,.....;, 725 | ..,. .;;. .,. 726 | ..:,..:,,; ''. 727 | .;...';.oldc, . 728 | .,..,;ccc;,. .. 729 | .......... ..; .. 730 | ..';c:..;.'.,' . 731 | :c.,''''' 732 | c:.:. .';,. ...... 733 | ;:',..; .,:;. .... 734 | ,l.l,.;. '. .'.. ...'' 735 | 'l l.c,....,::;,'..''',,. 736 | :.;.c.;'..':cll::::;;;;. 737 | ......''',,:looldoooc:, 738 | ::, ',::cllokO0Ood; DOOT DOOT ! 739 | .co, .;:cook00koc. 740 | ',:;cc:'. 741 | 742 | 743 | 744 | 745 | -------------------------------------------------------------------------------- /dootplayer.bas: -------------------------------------------------------------------------------- 1 | 1 DELAY% = 0 2 | 10 OPEN "DOOT.VTT", AS #5 3 | 20 SLEEP DELAY% : IF EOF(5) < 0 GOTO 200 4 | 30 INPUT# 5, BUF$ 5 | 40 IF LEFT$(BUF$,7) = "[2J[H[H" THEN CLS : GOTO 20 6 | 50 IF LEFT$(BUF$,2) = "[H" THEN HOME : GOTO 20 7 | 60 PRINT BUF$ 8 | 100 GOTO 20 9 | 200 CLOSE #5 10 | -------------------------------------------------------------------------------- /forth.bas: -------------------------------------------------------------------------------- 1 | 1 MAXSTACK = 0 2 | 2 DIM STACK$(1000) 3 | 10 GOTO 10000 4 | 100 REM PUSH STACK 5 | 110 IF MAXSTACK > 1000 THEN PRINT "Stack full" : RETURN 6 | 120 MAXSTACK = MAXSTACK + 1 7 | 130 STACK$(MAXSTACK) = VALUE$ 8 | 140 RETURN 9 | 300 REM POP STACK 10 | 310 IF MAXSTACK < 1 THEN PRINT "Stack empty" : RETURN 11 | 315 RET$ = STACK$(MAXSTACK) 12 | 320 STACK$(MAXSTACK) = "" 13 | 330 MAXSTACK = MAXSTACK - 1 14 | 340 RETURN 15 | 400 REM Split 16 | 410 FOR I = 1 TO LEN(INTXT$) 17 | 420 IF MID$(INTXT$, I, 1) = " " THEN GOTO 500 18 | 430 TSTR$ = TSTR$ + MID$(INTXT$ ,I, 1) 19 | 440 NEXT I 20 | 450 RETURN 21 | 500 REM Split Space found 22 | 510 VALUE$ = TSTR$ 23 | 520 IF VAL(VALUE$) > 0 THEN GOSUB 100 24 | 525 TSTR$ = "" 25 | 530 IF VALUE$ = "+" THEN GOSUB 1000 26 | 540 IF VALUE$ = "-" THEN GOSUB 1500 27 | 550 IF VALUE$ = "*" THEN GOSUB 2000 28 | 560 IF VALUE$ = "/" THEN GOSUB 2500 29 | 570 IF VALUE$ = "dup" THEN GOSUB 3000 30 | 580 IF VALUE$ = "swap" THEN GOSUB 3500 31 | 590 IF VALUE$ = "drop" THEN GOSUB 4000 32 | 600 IF VALUE$ = "rot" THEN GOSUB 4500 33 | 610 IF VALUE$ = "over" THEN GOSUB 5000 34 | 620 IF VALUE$ = "." THEN GOSUB 5500 35 | 630 IF VALUE$ = ".s" THEN GOSUB 6000 36 | 640 GOTO 440 37 | 1000 REM addition 38 | 1010 IF MAXSTACK < 2 THEN PRINT "Not enough Items on Stack" : RETURN 39 | 1020 GOSUB 300 40 | 1030 LEFTITEM% = VAL(RET$) 41 | 1040 GOSUB 300 42 | 1050 RIGHTITEM% = VAL(RET$) 43 | 1060 VALUE$ = STR$(LEFTITEM% + RIGHTITEM%) 44 | 1070 GOSUB 100 45 | 1080 RETURN 46 | 1500 REM subtraction 47 | 1510 IF MAXSTACK < 2 THEN PRINT "Not enough Items on Stack" : RETURN 48 | 1520 GOSUB 300 49 | 1530 LEFTITEM% = VAL(RET$) 50 | 1540 GOSUB 300 51 | 1550 RIGHTITEM% = VAL(RET$) 52 | 1560 VALUE$ = STR$(RIGHTITEM% - LEFTITEM%) 53 | 1570 GOSUB 100 54 | 1580 RETURN 55 | 2000 REM Multiplication 56 | 2010 IF MAXSTACK < 2 THEN PRINT "Not enough Items on Stack" : RETURN 57 | 2020 GOSUB 300 58 | 2030 LEFTITEM% = VAL(RET$) 59 | 2040 GOSUB 300 60 | 2050 RIGHTITEM% = VAL(RET$) 61 | 2060 VALUE$ = STR$(LEFTITEM% * RIGHTITEM%) 62 | 2070 GOSUB 100 63 | 2080 RETURN 64 | 2500 REM Division 65 | 2510 IF MAXSTACK < 2 THEN PRINT "Not enough Items on Stack" : RETURN 66 | 2520 GOSUB 300 67 | 2530 LEFTITEM% = VAL(RET$) 68 | 2540 GOSUB 300 69 | 2550 RIGHTITEM% = VAL(RET$) 70 | 2560 VALUE$ = STR$(RIGHTITEM% / LEFTITEM%) 71 | 2570 GOSUB 100 72 | 2580 RETURN 73 | 3000 REM dup 74 | 3010 IF MAXSTACK < 1 THEN PRINT "Not enough Items on Stack" : RETURN 75 | 3020 GOSUB 300 76 | 3030 VALUE$ = RET$ 77 | 3040 GOSUB 100 78 | 3050 GOSUB 100 79 | 3060 RETURN 80 | 3500 REM swap 81 | 3510 IF MAXSTACK < 2 THEN PRINT "Not enough Items on Stack" : RETURN 82 | 3520 GOSUB 300 83 | 3530 LEFTITEM% = VAL(RET$) 84 | 3540 GOSUB 300 85 | 3550 RIGHTITEM% = VAL(RET$) 86 | 3560 VALUE$ = STR$(LEFTITEM%) 87 | 3570 GOSUB 100 88 | 3580 VALUE$ = STR$(RIGHTITEM%) 89 | 3590 GOSUB 100 90 | 3600 RETURN 91 | 4000 REM drop 92 | 4010 IF MAXSTACK < 1 THEN PRINT "Not enough Items on Stack" : RETURN 93 | 4020 GOSUB 300 94 | 4030 RETURN 95 | 4500 REM rot 96 | 4510 IF MAXSTACK < 3 THEN PRINT "Not enough Items on Stack" : RETURN 97 | 4520 GOSUB 300 98 | 4530 LEFTITEM% = VAL(RET$) 99 | 4540 GOSUB 300 100 | 4550 MIDITEM% = VAL(RET$) 101 | 4560 GOSUB 300 102 | 4570 RIGHTITEM% = VAL(RET$) 103 | 4580 VALUE$ = STR$(MIDITEM%) 104 | 4590 GOSUB 100 105 | 4600 VALUE$ = STR$(LEFTITEM%) 106 | 4610 GOSUB 100 107 | 4620 VALUE$ = STR$(RIGHTITEM%) 108 | 4630 GOSUB 100 109 | 4640 RETURN 110 | 5000 REM over 111 | 5010 IF MAXSTACK < 2 THEN PRINT "Not enough Items on Stack" : RETURN 112 | 5020 GOSUB 300 113 | 5030 LEFTITEM% = VAL(RET$) 114 | 5040 GOSUB 300 115 | 5050 RIGHTITEM% = VAL(RET$) 116 | 5060 VALUE$ = STR$(RIGHTITEM%) 117 | 5070 GOSUB 100 118 | 5080 VALUE$ = STR$(LEFTITEM%) 119 | 5090 GOSUB 100 120 | 5100 VALUE$ = STR$(RIGHTITEM%) 121 | 5110 GOSUB 100 122 | 5120 RETURN 123 | 5500 REM . 124 | 5510 IF MAXSTACK < 1 THEN PRINT "Not enough Items on Stack" : RETURN 125 | 5520 GOSUB 300 126 | 5530 PRINT RET$ 127 | 5540 RETURN 128 | 6000 REM .s 129 | 6010 FOR II = 1 TO MAXSTACK 130 | 6020 PRINT STACK$(II) 131 | 6030 NEXT II 132 | 6040 RETURN 133 | 10000 REM Start 134 | 10010 INPUT "FORTH>"; INTXT$ 135 | 10015 INTXT$ = INTXT$ + " " 136 | 10020 GOSUB 410 137 | 10030 GOTO 10000 138 | -------------------------------------------------------------------------------- /msgboard.bas: -------------------------------------------------------------------------------- 1 | 0 CLS 2 | 1 SY% = 1 3 | 2 SX% = INT(WIDTH / 2) 4 | 3 C% = 2 5 | 4 T% = 0 6 | 5 SD% = 0.05 7 | 6 MTH$ = MID$(DATE$, 4, 3) 8 | 7 IF MTH$ <> "Dec" THEN GOTO 500 9 | 8 GOSUB 400 10 | 9 GOTO 100 11 | 10 REM SUB PRINT A TRIANGLE 12 | 20 IF DISABLE% = 0 THEN LOCATE SY%, SX% : PRINT "*"; : SLEEP SD% 13 | 30 SY% = SY% + 1 14 | 31 SX% = SX% - 1 15 | 40 IF DISABLE% = 0 THEN LOCATE SY%, SX%: PRINT "/"; : SLEEP SD% 16 | 50 SX% = SX% + 2 17 | 60 IF DISABLE% = 0 THEN LOCATE SY%, SX%: PRINT "\"; : SLEEP SD% 18 | 69 DISABLE% = 0 19 | 70 RETURN 20 | 80 REM SUB COMBINE THREE TRIANGLES TO ONE 21 | 81 FOR II = 0 TO 2 22 | 82 IF II = 1 THEN SY% = SY% + 1 : SX% = SX% + 1 23 | 83 IF II = 2 THEN SX% = SX% - 5 : SY% = SY% - 1 24 | 84 GOSUB 10 25 | 85 NEXT II 26 | 86 RETURN 27 | 100 REM START 28 | 110 GOSUB 80 29 | 151 SY% = SY% + 1 30 | 152 SX% = SX% + 5 31 | 160 REM 32 | 168 FOR CC = 1 TO C% 33 | 169 IF CC <> 1 AND CC <> C% AND (C% = 3 OR C% = 5) THEN DISABLE% = 1 34 | 170 GOSUB 80 35 | 210 SX% = SX% - 7 36 | 220 SY% = SY% - 3 37 | 300 NEXT CC 38 | 301 SY% = SY% + 4 39 | 302 SX% = SX% + (C% * 10) - T% 40 | 309 T% = T% + 2 41 | 310 C% = C% + 1 42 | 315 Q% = INT(HEIGHT / 4.5) 43 | 320 IF C% > Q% THEN PRINT "" : SLEEP 2 : GOTO 410 44 | 330 GOTO 168 45 | 400 REM 46 | 410 XX% = INT(WIDTH / 2) - 1 47 | 420 LOCATE 9, XX% : PRINT "Hi" 48 | 430 XX% = INT(WIDTH / 2) - INT(LEN(USER$) / 2) 49 | 440 LOCATE 10, XX% : PRINT USER$ : SLEEP 2 50 | 450 text$ = "Happy Christmas!" 51 | 460 XX% = INT(WIDTH / 2) - (LEN(text$) / 2) 52 | 470 LOCATE 17, XX% : PRINT text$ 53 | 480 SLEEP 2 54 | 500 IF USER$ = "archer" THEN GOTO 101100 55 | 501 OPEN "counter.dat", AS #1 56 | 510 IF EOF(1) = -1 THEN GOTO 540 57 | 520 INPUT# 1, DUMPP$ 58 | 521 CTRDAT% = CTRDAT% + 1 59 | 530 GOTO 510 60 | 540 PRINT# 1, TIME$ + " " + DATE$ + " " + USER$ 61 | 550 CLOSE #1 62 | 560 PRINT "YOU ARE USER NO. " + STR$(CTRDAT%) 63 | 570 PRINT "" 64 | 580 PRINT "" 65 | 101100 REM unet 66 | 101110 DAY$ = LEFT$(DATE$, 2) 67 | 101120 MTH$ = MID$(DATE$, 4, 3) 68 | 101130 YR$ = RIGHT$(DATE$, 2) 69 | 101140 TLIST$ = "thds.list" 70 | 101150 REM CLS 71 | 101160 OPEN "logo.asc", AS #1 72 | 101170 IF EOF(1) = -1 THEN GOTO 101210 73 | 101180 INPUT# 1, LOGO$ 74 | 101190 PRINT LOGO$ 75 | 101200 GOTO 101170 76 | 101210 CLOSE #1 77 | 101220 PRINT CHR$(10) : PRINT CHR$(10) 78 | 101230 PRINT "Listing Threads" 79 | 101240 PRINT "---------------" 80 | 101250 OPEN TLIST$, AS #1 81 | 101260 IF EOF(1) = -1 THEN GOTO 101310 82 | 101270 INPUT# 1, BUF$ 83 | 101280 PRINT BUF$ + " --> "; 84 | 101290 GOSUB 101960 85 | 101300 GOTO 101260 86 | 101310 CLOSE #1 87 | 101320 rem 88 | 101330 PRINT CHR$(10) 89 | 101340 PRINT "(r)ead (p)ost thread or (q)uit?"; 90 | 101350 CHOICE$ = INKEY$ 91 | 101360 PRINT CHR$(10) 92 | 101370 IF CHOICE$ = "r" THEN GOTO 101420 93 | 101380 IF CHOICE$ = "p" THEN GOTO 101760 94 | 101390 IF CHOICE$ = "q" THEN END 95 | 101400 PRINT CHR$(10) 96 | 101410 GOTO 101330 97 | 101420 rem 98 | 101430 PRINT CHR$(10) 99 | 101440 INPUT "Enter ID: ", RNMBR$ 100 | 101445 IF LEN(RNMBR$) > 11 THEN GOTO 101150 101 | 101450 RNMBR$ = RNMBR$ + ".thd" 102 | 101460 IF RNMBR$ = "" THEN GOTO 101430 103 | 101470 OPEN RNMBR$, AS #1 104 | 101480 IF EOF(1) = -1 THEN GOTO 101530 105 | 101490 SMH% = 1 106 | 101500 INPUT# 1, RBUF$ 107 | 101510 PRINT RBUF$ 108 | 101520 GOTO 101480 109 | 101530 CLOSE #1 110 | 101540 PRINT CHR$(10) 111 | 101550 IF SMH% = 0 THEN GOTO 101150 112 | 101560 SMH% = 0 113 | 101570 PRINT "(p)ost reply or (b)ack? "; 114 | 101580 CHOICE$ = INKEY$ 115 | 101590 PRINT CHR$(10) 116 | 101600 IF CHOICE$ = "p" THEN GOTO 101640 117 | 101610 IF CHOICE$ = "b" THEN GOTO 101150 118 | 101620 PRINT CHR$(10) 119 | 101630 GOTO 101570 120 | 101640 rem 121 | 101650 INPUT "Enter Message: ", IMSG$ 122 | 101651 IMSG$ = IMSG$ + " (posted by " + USER$ + " on " + DATE$ + " at " + TIME$ + ")" 123 | 101660 IF IMSG$ = "" THEN GOTO 101650 124 | 101670 OPEN RNMBR$, AS #1 125 | 101680 IF EOF(1) = -1 THEN GOTO 101710 126 | 101690 INPUT# 1, DUMP$ 127 | 101700 GOTO 101680 128 | 101710 PRINT# 1, IMSG$ 129 | 101720 PRINT# 1, "----" 130 | 101730 CLOSE #1 131 | 101740 PRINT "Ok" 132 | 101750 GOTO 101150 133 | 101760 rem post 134 | 101770 INPUT "Enter Message: ", MSG$ 135 | 101771 MSG$ = MSG$ + " (posted by " + USER$ + " on " + DATE$ + " at " + TIME$ + ")" 136 | 101780 IF MSG$ = "" THEN GOTO 101770 137 | 101790 NMBR$ = DAY$ + MTH$ + YR$ 138 | 101800 NMBR$ = NMBR$ + CHR$(INT(RND(1)*8+49)) + CHR$(INT(RND(1)*8+49)) + CHR$(INT(RND(1)*8+49)) + CHR$(INT(RND(1)*8+49)) 139 | 101810 NMBR$ = NMBR$ + ".thd" 140 | 101820 OPEN NMBR$, AS #1 141 | 101830 PRINT# 1, MSG$ 142 | 101840 PRINT# 1, "----" 143 | 101850 CLOSE #1 144 | 101860 OPEN TLIST$, AS #1 145 | 101870 IF EOF(1) = -1 THEN GOTO 101900 146 | 101880 INPUT# 1, DUMP$ 147 | 101890 GOTO 101870 148 | 101900 NMBR$ = LEFT$(NMBR$, LEN(NMBR$)-4) 149 | 101910 PRINT# 1, NMBR$ 150 | 101920 CLOSE #1 151 | 101930 PRINT "Ok" 152 | 101940 PRINT CHR$(10) 153 | 101950 GOTO 101150 154 | 101960 rem 155 | 101970 BBUF$ = BUF$ + ".thd" 156 | 101980 OPEN BBUF$, AS #2 157 | 101990 IF EOF(2) = -1 THEN GOTO 102050 158 | 102000 INPUT# 2, PV$ 159 | 102010 PV$ = LEFT$(PV$, 30) + "..." 160 | 102020 CLOSE #2 161 | 102030 GOSUB 102070 162 | 102040 PRINT PV$ " (" CREP% " Replies)" 163 | 102050 BBUF$ = "" : PV$ = "" 164 | 102060 RETURN 165 | 102070 rem count replies 166 | 102080 CREP% = 1 167 | 102090 OPEN BBUF$, AS #7 168 | 102100 IF EOF(7) = -1 THEN GOTO 102140 169 | 102110 INPUT# 7, DUMP$ 170 | 102120 CREP% = CREP% + 1 171 | 102130 GOTO 102100 172 | 102140 CLOSE #7 173 | 102150 CREP% = CREP% - 1 174 | 102160 CREP% = CREP% / 2 175 | 102170 RETURN 176 | -------------------------------------------------------------------------------- /paint.bas: -------------------------------------------------------------------------------- 1 | 0 CLS 2 | 1 COLOR 7, 0 3 | 2 MINY = 12 4 | 3 MINX = 1 5 | 4 CHAR$ = SPC$(1) 6 | 5 DIM DATA$(HEIGHT, WIDTH) 7 | 6 FOR F = MINY TO HEIGHT 8 | 7 FOR FF = 1 TO WIDTH 9 | 8 DATA$(F, FF) = "0 " 10 | 9 NEXT FF : NEXT F 11 | 10 PRINT "telepaint 0.1 by archer" 12 | 20 PRINT "Directions: w,a,s,d" 13 | 21 PRINT "Change Color: c" 14 | 22 PRINT "Change Coords: n" 15 | 23 PRINT "Change Characters: x" 16 | 24 PRINT "Save File: f" 17 | 25 PRINT "Open File: o" 18 | 26 PRINT "List of Colors: 0:Black, 1:Red, 2:Green, 3:Yellow, 4:Blue, 5:Magenta, 6:Cyan, 7:White" 19 | 30 X = INT(WIDTH / 2) 20 | 40 Y = INT(HEIGHT / 2) 21 | 41 COLOR 0, 0 22 | 42 LOCATE 10, 1 23 | 43 PRINT SPC$(WIDTH-1); 24 | 44 LOCATE 11, 1 25 | 45 PRINT SPC$(WIDTH-1); 26 | 50 LOCATE 9,1 27 | 55 PRINT SPC$(WIDTH-1); 28 | 56 LOCATE 9,1 29 | 60 COLOR 7, 0 30 | 70 INPUT "Enter Command:", MOV$ 31 | 80 FOR I=1 TO LEN(MOV$) 32 | 90 COLOR 0, CLR% 33 | 100 IF MID$(MOV$, I, 1) = "w" THEN Y = Y - 1 34 | 110 IF MID$(MOV$, I, 1) = "s" THEN Y = Y + 1 35 | 120 IF MID$(MOV$, I, 1) = "a" THEN X = X - LEN(CHAR$) 36 | 130 IF MID$(MOV$, I, 1) = "d" THEN X = X + LEN(CHAR$) 37 | 140 IF MID$(MOV$, I, 1) = "c" THEN GOSUB 230 38 | 142 IF MID$(MOV$, I, 1) = "n" THEN GOSUB 300 39 | 143 IF MID$(MOV$, I, 1) = "x" THEN GOSUB 400 40 | 144 IF MID$(MOV$, I, 1) = "f" THEN GOSUB 500 41 | 145 IF MID$(MOV$, I, 1) = "o" THEN GOSUB 600 42 | 149 COLOR 0, CLR% 43 | 150 IF Y < MINY THEN Y = MINY 44 | 160 IF X < MINX THEN X = MINX 45 | 170 IF Y > HEIGHT THEN Y = HEIGHT 46 | 180 IF X > WIDTH THEN X = WIDTH 47 | 190 LOCATE Y, X 48 | 191 DATA$(Y, X) = STR$(CLR%) + CHAR$ 49 | 200 PRINT CHAR$; 50 | 210 NEXT I 51 | 220 GOTO 41 52 | 230 REM - Color change 53 | 240 COLOR 7, 0 54 | 250 INPUT "Enter Color (0-7): ", CLR% 55 | 260 IF CLR% >= 0 AND CLR% < 8 THEN COLOR 0, CLR% : RETURN 56 | 270 LOCATE 8, 15 57 | 280 PRINT "Invalid Color. Range is from 0 to 7" 58 | 290 RETURN 59 | 300 REM Change Coords 60 | 310 COLOR 7, 0 61 | 320 INPUT "Enter X: ", X 62 | 330 INPUT "Enter Y: ", Y 63 | 380 RETURN 64 | 400 REM Change Chars 65 | 410 COLOR 7,0 66 | 420 INPUT "Enter Characters: ", CHAR$ 67 | 421 IF LEN(CHAR$) <> 1 THEN CHAR$ = SPC$(1) 68 | 430 RETURN 69 | 500 COLOR 7,0 70 | 501 INPUT "Enter Filename: ", FILENAME$ 71 | 502 IF FILENAME$ = "" THEN RETURN 72 | 503 FILENAME$ = "p" + FILENAME$ : OPEN FILENAME$, AS #1 73 | 504 PRINT# 1,HEIGHT 74 | 505 PRINT# 1,WIDTH 75 | 510 FOR F = 1 TO HEIGHT 76 | 520 FOR FF = 1 TO WIDTH 77 | 530 OUTP$ = OUTP$ + DATA$(F, FF) 78 | 540 NEXT FF 79 | 545 PRINT# 1, OUTP$ 80 | 546 OUTP$ = "" 81 | 547 PRINT# 1, "" 82 | 550 NEXT F 83 | 551 CLOSE #1 84 | 560 RETURN 85 | 600 REM - Open 86 | 601 COLOR 7,0 87 | 610 INPUT "Enter Filename: ", FILENAME$ 88 | 620 IF FILENAME$ = "" THEN RETURN 89 | 625 FILENAME$ = "p" + FILENAME$ 90 | 630 OPEN FILENAME$, AS #1 91 | 640 INPUT# 1, LHEIGHT% 92 | 650 INPUT# 1, LWIDTH% 93 | 651 LHEIGHT% = INT(LHEIGHT%) 94 | 652 LWIDTH% = INT(LWIDTH%) 95 | 665 IF HEIGHT < LHEIGHT% THEN PRINT "Height doesnt match Terminal Size" : END 96 | 666 IF WIDTH < LWIDTH% THEN PRINT "Width doesnt match Terminal Size" : END 97 | 670 FOR F = MINY TO LHEIGHT% 98 | 680 INPUT# 1, LINE$ 99 | 685 CTR = 1 100 | 690 FOR FF = 1 TO LWIDTH% * 2 STEP 2 101 | 700 CLR% = INT(MID$(LINE$, FF, 1)) 102 | 710 CHRR$ = MID$(LINE$, FF+1, 1) 103 | 720 REM COLOR 0, CLR% 104 | 730 REM LOCATE F, FF 105 | 740 REM PRINT CHRR$; 106 | 741 COLOR 0, CLR% 107 | 742 LOCATE F, CTR 108 | 743 PRINT CHRR$; 109 | 745 DATA$(F, CTR) = STR$(CLR%) + CHRR$ 110 | 749 CTR = CTR + 1 111 | 750 NEXT FF 112 | 770 NEXT F 113 | 778 CLOSE #1 114 | 780 RETURN 115 | -------------------------------------------------------------------------------- /paintv2.bas: -------------------------------------------------------------------------------- 1 | 10 PRINT "Loading..."; 2 | 20 COLOR 7, 0 3 | 30 MINY = 12 4 | 40 MINX = 1 5 | 50 CHAR$ = SPC$(1) 6 | 60 DIM DATA$(HEIGHT, WIDTH) 7 | 70 FOR F = MINY TO HEIGHT 8 | 80 FOR FF = 1 TO WIDTH 9 | 90 DATA$(F, FF) = "0 " 10 | 100 NEXT FF : NEXT F 11 | 110 CLS 12 | 120 PRINT "telepaint 1.0 by archer (use stty /reset at terminal to reset colors)" 13 | 130 PRINT "Directions: h,j,k,l" 14 | 140 PRINT "Change Color: c" 15 | 150 PRINT "Change Coords: n" 16 | 160 PRINT "Change Characters: x" 17 | 170 PRINT "Save File: f" 18 | 180 PRINT "Open File: o; Quit: q" 19 | 190 PRINT "List of Colors: 0:Black, 1:Red, 2:Green, 3:Yellow, 4:Blue, 5:Magenta, 6:Cyan, 7:White" 20 | 200 X = INT(WIDTH / 2) 21 | 210 Y = INT(HEIGHT / 2) 22 | 220 REM COLOR 0, 0 23 | 230 REM LOCATE MINY-2, 1 24 | 240 REM PRINT SPC$(WIDTH-1); 25 | 250 REM LOCATE MINY-1, 1 26 | 260 REM PRINT SPC$(WIDTH-1); 27 | 270 REM LOCATE MINY-3,1 28 | 280 REM PRINT SPC$(WIDTH-1); 29 | 290 LOCATE MINY-3,1 30 | 300 COLOR 7, 0 31 | 310 PRINT "Enter Command: "; 32 | 315 MOV$ = INKEY$ 33 | 316 PRINT "" 34 | 320 REM FOR I=1 TO LEN(MOV$) 35 | 330 IF MID$(MOV$, I, 1) = "k" THEN Y = Y - 1 36 | 340 IF MID$(MOV$, I, 1) = "j" THEN Y = Y + 1 37 | 350 IF MID$(MOV$, I, 1) = "h" THEN X = X - LEN(CHAR$) 38 | 360 IF MID$(MOV$, I, 1) = "l" THEN X = X + LEN(CHAR$) 39 | 370 IF MID$(MOV$, I, 1) = "c" THEN GOSUB 600 40 | 380 IF MID$(MOV$, I, 1) = "n" THEN GOSUB 700 41 | 390 IF MID$(MOV$, I, 1) = "x" THEN GOSUB 800 42 | 400 REM IF MID$(MOV$, I, 1) = "f" THEN GOSUB 900 43 | 401 IF MID$(MOV$, I, 1) = "f" THEN GOSUB 900 44 | 410 REM IF MID$(MOV$, I, 1) = "o" THEN GOSUB 1100 45 | 411 IF MID$(MOV$, I, 1) = "o" THEN GOSUB 1100 46 | 415 IF MID$(MOV$, I, 1) = "q" THEN GOTO 1400 47 | 420 COLOR 0, CLR% 48 | 430 IF Y < MINY THEN Y = MINY 49 | 440 IF X < MINX THEN X = MINX 50 | 450 IF Y > HEIGHT THEN Y = HEIGHT 51 | 460 IF X > WIDTH THEN X = WIDTH 52 | 470 LOCATE Y, X 53 | 480 DATA$(Y, X) = STR$(CLR%) + CHAR$ 54 | 490 PRINT CHAR$; 55 | 500 REM NEXT I 56 | 510 GOTO 220 57 | 600 REM - Color change 58 | 610 COLOR 7, 0 59 | 620 INPUT "Enter Color (0-7): ", CLR% 60 | 630 IF CLR% >= 0 AND CLR% < 8 THEN COLOR 0, CLR% : RETURN 61 | 640 LOCATE 8, 15 62 | 650 PRINT "Invalid Color. Range is from 0 to 7" 63 | 660 RETURN 64 | 700 REM Change Coords 65 | 710 COLOR 7, 0 66 | 720 INPUT "Enter X: ", X 67 | 730 INPUT "Enter Y: ", Y 68 | 740 RETURN 69 | 800 REM Change Chars 70 | 810 COLOR 7,0 71 | 820 INPUT "Enter Characters: ", CHAR$ 72 | 830 IF LEN(CHAR$) <> 1 THEN PRINT "Only one Character is allowed" : CHAR$ = SPC$(1) 73 | 840 RETURN 74 | 900 REM Save File 75 | 910 COLOR 7,0 76 | 920 INPUT "Enter Filename: ", FILENAME$ 77 | 930 IF FILENAME$ = "" THEN RETURN 78 | 935 FILENAME$ = "p" + FILENAME$ 79 | 940 PRINT "Saving File..."; 80 | 950 OPEN FILENAME$, AS #1 81 | 960 PRINT# 1,HEIGHT 82 | 970 PRINT# 1,WIDTH 83 | 980 FOR F = 1 TO HEIGHT 84 | 990 FOR FF = 1 TO WIDTH 85 | 1000 OUTP$ = OUTP$ + DATA$(F, FF) 86 | 1010 NEXT FF 87 | 1020 PRINT# 1, OUTP$ 88 | 1030 OUTP$ = "" 89 | 1040 PRINT# 1, "" 90 | 1050 NEXT F 91 | 1060 CLOSE #1 92 | 1070 RETURN 93 | 1100 REM - Open 94 | 1110 COLOR 7,0 95 | 1120 INPUT "Enter Filename: ", FILENAME$ 96 | 1130 IF FILENAME$ = "" THEN RETURN 97 | 1135 FILENAME$ = "p" + FILENAME$ 98 | 1140 PRINT "Loading File..."; 99 | 1150 OPEN FILENAME$, AS #1 100 | 1160 INPUT# 1, LHEIGHT% 101 | 1170 INPUT# 1, LWIDTH% 102 | 1180 LHEIGHT% = INT(LHEIGHT%) 103 | 1190 LWIDTH% = INT(LWIDTH%) 104 | 1200 IF HEIGHT < LHEIGHT% THEN PRINT "Height doesnt match Terminal Size" : END 105 | 1210 IF WIDTH < LWIDTH% THEN PRINT "Width doesnt match Terminal Size" : END 106 | 1220 FOR F = MINY TO LHEIGHT% 107 | 1230 INPUT# 1, LINE$ 108 | 1240 CTR = 1 109 | 1250 FOR FF = 1 TO LWIDTH% * 2 STEP 2 110 | 1260 CLR% = INT(MID$(LINE$, FF, 1)) 111 | 1270 CHRR$ = MID$(LINE$, FF+1, 1) 112 | 1280 COLOR 0, CLR% 113 | 1290 LOCATE F, CTR 114 | 1300 PRINT CHRR$; 115 | 1310 DATA$(F, CTR) = STR$(CLR%) + CHAR$ 116 | 1320 CTR = CTR + 1 117 | 1330 NEXT FF 118 | 1340 NEXT F 119 | 1350 CLOSE #1 120 | 1360 RETURN 121 | 1400 REM QUIT 122 | 1410 COLOR 8,8 123 | 1420 END 124 | -------------------------------------------------------------------------------- /parsekeys.bas: -------------------------------------------------------------------------------- 1 | 10 A% = 0 : B% = 0 : C% = 0 : D% = 0 : UP% = 0 : DOWN% = 0 : LEFT% = 0 : RIGHT% = 0 : FN% = 0 2 | 20 MEH$ = INKEY$ : REM discard the initial value, because it holds the return key from hitting run 3 | 30 A% = ASC(INKEY$) 4 | 40 IF A% = 27 THEN B% = ASC(INKEY$) 5 | 50 IF B% = 91 THEN C% = ASC(INKEY$) 6 | 60 IF C% = 49 OR C% = 50 THEN D% = ASC(INKEY$) 7 | 70 REM PRINT "A:"; A%; ",B:"; B%; ",C:"; C%; ",D:"; D% 8 | 80 IF A% = 27 AND B% = 91 AND C% = 65 THEN UP% = 1 9 | 90 IF A% = 27 AND B% = 91 AND C% = 66 THEN DOWN% = 1 10 | 100 IF A% = 27 AND B% = 91 AND C% = 68 THEN LEFT% = 1 11 | 110 IF A% = 27 AND B% = 91 AND C% = 67 THEN RIGHT% = 1 12 | 120 IF A% = 27 AND B% = 91 AND C% = 49 AND D% = 49 THEN FN% = 1 13 | 130 IF A% = 27 AND B% = 91 AND C% = 49 AND D% = 50 THEN FN% = 2 14 | 140 IF A% = 27 AND B% = 91 AND C% = 49 AND D% = 51 THEN FN% = 3 15 | 150 IF A% = 27 AND B% = 91 AND C% = 49 AND D% = 52 THEN FN% = 4 16 | 160 IF A% = 27 AND B% = 91 AND C% = 49 AND D% = 53 THEN FN% = 5 17 | 170 IF A% = 27 AND B% = 91 AND C% = 49 AND D% = 55 THEN FN% = 6 18 | 180 IF A% = 27 AND B% = 91 AND C% = 49 AND D% = 56 THEN FN% = 7 19 | 190 IF A% = 27 AND B% = 91 AND C% = 49 AND D% = 57 THEN FN% = 8 20 | 200 IF A% = 27 AND B% = 91 AND C% = 50 AND D% = 48 THEN FN% = 9 21 | 210 IF A% = 27 AND B% = 91 AND C% = 50 AND D% = 49 THEN FN% = 10 22 | 220 IF A% = 27 AND B% = 91 AND C% = 50 AND D% = 51 THEN FN% = 11 23 | 230 IF A% = 27 AND B% = 91 AND C% = 50 AND D% = 52 THEN FN% = 12 24 | 240 IF UP% = 1 OR DOWN% = 1 OR LEFT% = 1 OR RIGHT% = 1 THEN PRINT "Arrow Keys pressed: Up:"; UP%; " Down:"; DOWN%; " Left:"; LEFT%; " Right:"; RIGHT% 25 | 250 IF FN% = 0 AND UP% = 0 AND DOWN% = 0 AND LEFT% = 0 AND RIGHT% = 0 THEN PRINT "Key pressed: "; CHR$(A%); " ASCII-Value: "; A% 26 | 260 IF FN% > 0 THEN PRINT "Pressed F-Key: "; FN% 27 | -------------------------------------------------------------------------------- /pman.bas: -------------------------------------------------------------------------------- 1 | 0 CLS : GOSUB 9000 2 | 1 IF ARGV$(1) = "" THEN MAPTYPE$ = "Default Level" : CANWIN% = 1 3 | 2 MY_DIR% = 1 4 | 3 T_P$(0) = "V" : T_P$(1) = "<" : T_P$(2) = "A" : T_P$(3) = ">" 5 | 4 INVALID_INPUT% = 0 6 | 5 SCORE% = 0 7 | 6 DEATH% = 0 8 | 7 MAPTYPE$ = "" 9 | 8 OWIDTH% = WIDTH 10 | 9 OHEIGHT% = HEIGHT 11 | 10 T_WALL$ = "#" 12 | 20 RESET$ = CHR$(27) + "[39;49m" 13 | 21 YELLOW$ = CHR$(27) + "[33m" 14 | 22 BLUE$ = CHR$(27) + "[34;44m" 15 | 23 RED$ = CHR$(27) + "[31m" 16 | 30 T_FREE$ = " " 17 | 31 T_BOB$ = "B" 18 | 32 T_START$ = "@" 19 | 33 T_DOT$ = "." 20 | 34 T_POB$ = "P" 21 | 39 MY_POS%(0) = 2 : MY_POS%(1) = 2 22 | 41 IF LEN(ARGV$(1)) = 0 THEN GOSUB 10000 23 | 42 IF LEN(ARGV$(1)) > 0 THEN GOSUB 6000 24 | 45 GOSUB 14000 25 | 50 GOSUB 7000 26 | 1000 REM PAINT MAP$ 27 | 1001 MAP$(MY_POS%(0), MY_POS%(1)) = T_P$(MY_DIR%) 28 | 1006 PRINT CHR$(27) + "[H" 29 | 1007 GOSUB 14000 30 | 1010 FOR I% = 0 TO MAP_SIZE_Y% 31 | 1020 FOR J% = 1 TO MAP_SIZE_X% 32 | 1025 IF MAP$(I%, J%) = T_P$(2) OR MAP$(I%, J%) = T_P$(1) OR MAP$(I%, J%) = T_P$(3) OR MAP$(I%, J%) = T_P$(0) THEN PRINT YELLOW$; 33 | 1026 IF MAP$(I%, J%) = T_WALL$ THEN PRINT BLUE$;" "; 34 | 1027 IF MAP$(I%, J%) = T_POB$ OR MAP$(I%, J%) = T_BOB$ THEN PRINT RED$; 35 | 1030 IF MAP$(I%, J%) <> T_WALL$ THEN PRINT MAP$(I%, J%); 36 | 1035 IF MAP$(I%, J%) = T_P$(2) OR MAP$(I%, J%) = T_P$(1) OR MAP$(I%, J%) = T_P$(3) OR MAP$(I%, J%) = T_P$(0) OR MAP$(I%, J%) = T_WALL$ THEN PRINT YELLOW$; 37 | 1037 IF MAP$(I%, J%) = T_POB$ OR MAP$(I%, J%) = T_BOB$ THEN PRINT RESET$; 38 | 1038 PRINT RESET$; 39 | 1050 NEXT J% 40 | 1055 PRINT "" 41 | 1060 NEXT I% 42 | 2000 REM READ INPUT 43 | 2001 INVALID_INPUT% = 0 44 | 2010 REM INP$ = INKEY$ 45 | 2011 GOSUB 13000 46 | 2013 REM UNCOMMENT THIS TO DUMP THE MAP DATA: IF INP$ = "x" THEN GOTO 12000 47 | 2015 GOSUB 3000 : IF DEATH% = 1 THEN PRINT CHR$(10) + "You are dead :(" : PRINT "" : END 48 | 2016 GOSUB 8000 : GOSUB 3000 : IF INVALID_INPUT% = 1 THEN GOTO 1000 49 | 2017 GOSUB 4000 50 | 2020 IF INP$ = "w" THEN MAP$(MY_POS%(0), MY_POS%(1)) = T_FREE$ : MY_POS%(0) = MY_POS%(0) - 1 : MY_DIR% = 0 51 | 2030 IF INP$ = "s" THEN MAP$(MY_POS%(0), MY_POS%(1)) = T_FREE$ : MY_POS%(0) = MY_POS%(0) + 1 : MY_DIR% = 2 52 | 2040 IF INP$ = "a" THEN MAP$(MY_POS%(0), MY_POS%(1)) = T_FREE$ : MY_POS%(1) = MY_POS%(1) - 1 : MY_DIR% = 3 53 | 2050 IF INP$ = "d" THEN MAP$(MY_POS%(0), MY_POS%(1)) = T_FREE$ : MY_POS%(1) = MY_POS%(1) + 1 : MY_DIR% = 1 54 | 2997 GOSUB 5000 55 | 2998 GOSUB 11000 56 | 2999 GOTO 1000 57 | 3000 REM COLLISION DETETCTION SUB 58 | 3010 IF INP$ = "w" AND MAP$(MY_POS%(0) - 1, MY_POS%(1)) = T_WALL$ THEN INVALID_INPUT% = 1 59 | 3020 IF INP$ = "s" AND MAP$(MY_POS%(0) + 1, MY_POS%(1)) = T_WALL$ THEN INVALID_INPUT% = 1 60 | 3030 IF INP$ = "a" AND MAP$(MY_POS%(0), MY_POS%(1) - 1) = T_WALL$ THEN INVALID_INPUT% = 1 61 | 3040 IF INP$ = "d" AND MAP$(MY_POS%(0), MY_POS%(1) + 1) = T_WALL$ THEN INVALID_INPUT% = 1 62 | 3050 IF INP$ = "w" AND (MAP$(MY_POS%(0) - 1, MY_POS%(1)) = T_BOB$ OR MAP$(MY_POS%(0) - 1, MY_POS%(1)) = T_POB$) THEN DEATH% = 1 63 | 3060 IF INP$ = "s" AND (MAP$(MY_POS%(0) + 1, MY_POS%(1)) = T_BOB$ OR MAP$(MY_POS%(0) + 1, MY_POS%(1)) = T_POB$) THEN DEATH% = 1 64 | 3070 IF INP$ = "a" AND (MAP$(MY_POS%(0), MY_POS%(1) - 1) = T_BOB$ OR MAP$(MY_POS%(0), MY_POS%(1) - 1) = T_POB$) THEN DEATH% = 1 65 | 3080 IF INP$ = "d" AND (MAP$(MY_POS%(0), MY_POS%(1) + 1) = T_BOB$ OR MAP$(MY_POS%(0), MY_POS%(1) + 1) = T_POB$) THEN DEATH% = 1 66 | 3100 RETURN 67 | 4000 REM CONSUME . SUB 68 | 4010 IF INP$ = "w" AND MAP$(MY_POS%(0) - 1, MY_POS%(1)) = T_DOT$ THEN SCORE% = SCORE% + 1 69 | 4020 IF INP$ = "s" AND MAP$(MY_POS%(0) + 1, MY_POS%(1)) = T_DOT$ THEN SCORE% = SCORE% + 1 70 | 4030 IF INP$ = "a" AND MAP$(MY_POS%(0), MY_POS%(1) - 1) = T_DOT$ THEN SCORE% = SCORE% + 1 71 | 4040 IF INP$ = "d" AND MAP$(MY_POS%(0), MY_POS%(1) + 1) = T_DOT$ THEN SCORE% = SCORE% + 1 72 | 4999 RETURN 73 | 5000 REM PRINT SCORE SUB 74 | 5010 LOCATE MAP_SIZE_Y% + 3, 1 75 | 5020 PRINT "Score: "; SCORE% 76 | 5030 RETURN 77 | 6000 REM READ MAP SUB 78 | 6010 OPEN ARGV$(1), AS #1 79 | 6015 J% = 0 80 | 6020 IF EOF(1) = -1 THEN GOTO 6080 81 | 6030 INPUT# 1, MAP_ROW$ 82 | 6035 IF MAP_SIZE_X% = 0 THEN MAP_SIZE_X% = LEN(MAP_ROW$) 83 | 6040 FOR I% = 1 TO LEN(MAP_ROW$) 84 | 6050 MAP$(J%, I%) = MID$(MAP_ROW$, I%, 1) 85 | 6060 NEXT I% 86 | 6065 J% = J% + 1 87 | 6070 GOTO 6020 88 | 6080 CLOSE #1 89 | 6086 MAP_SIZE_Y% = J% 90 | 6090 RETURN 91 | 7000 REM LOCATE STARTING POS SUB 92 | 7001 BID% = 0 93 | 7002 MAXBID% = 0 94 | 7010 FOR I% = 0 TO MAP_SIZE_X% 95 | 7020 FOR J% = 0 TO MAP_SIZE_Y% 96 | 7030 IF MAP$(J%, I%) = T_START$ THEN MAP$(J%, I%) = T_P$(MY_DIR%) : MY_POS%(0) = J% : MY_POS%(1) = I% 97 | 7031 IF MAP$(J%, I%) = T_BOB$ THEN BOBS_X%(BID%) = I% : BOBS_Y%(BID%) = J% : BOBS_DIR%(BID%) = 1 : BID% = BID% + 1 : MAXBID% = MAXBID% + 1 98 | 7032 IF MAP$(J%, I%) = T_POB$ THEN BOBS_X%(BID%) = I% : BOBS_Y%(BID%) = J% : BOBS_DIR%(BID%) = 0 : BID% = BID% + 1 : MAXBID% = MAXBID% + 1 99 | 7040 NEXT J% 100 | 7050 NEXT I% 101 | 7060 RETURN 102 | 8000 REM MOVE BOBS SUB 103 | 8010 FOR I% = 0 TO MAXBID% 104 | 8013 IF BOBS_DIR%(I%) = 1 AND MAP$(BOBS_Y%(I%), BOBS_X%(I%) + 1) <> T_WALL$ THEN OLDTILE$ = MAP$(BOBS_Y%(I%), BOBS_X%(I%)) : MAP$(BOBS_Y%(I%), BOBS_X%(I%)) = T_FREE$ : BOBS_X%(I%) = BOBS_X%(I%) + 1 : MAP$(BOBS_Y%(I%), BOBS_X%(I%)) = OLDTILE$ 105 | 8014 IF BOBS_DIR%(I%) = 3 AND MAP$(BOBS_Y%(I%), BOBS_X%(I%) - 1) <> T_WALL$ THEN OLDTILE$ = MAP$(BOBS_Y%(I%), BOBS_X%(I%)) : MAP$(BOBS_Y%(I%), BOBS_X%(I%)) = T_FREE$ : BOBS_X%(I%) = BOBS_X%(I%) - 1 : MAP$(BOBS_Y%(I%), BOBS_X%(I%)) = OLDTILE$ 106 | 8015 IF BOBS_DIR%(I%) = 0 AND MAP$(BOBS_Y%(I%) - 1, BOBS_X%(I%)) <> T_WALL$ THEN OLDTILE$ = MAP$(BOBS_Y%(I%), BOBS_X%(I%)) : MAP$(BOBS_Y%(I%), BOBS_X%(I%)) = T_FREE$ : BOBS_Y%(I%) = BOBS_Y%(I%) - 1 : MAP$(BOBS_Y%(I%), BOBS_X%(I%)) = OLDTILE$ 107 | 8016 IF BOBS_DIR%(I%) = 2 AND MAP$(BOBS_Y%(I%) + 1, BOBS_X%(I%)) <> T_WALL$ THEN OLDTILE$ = MAP$(BOBS_Y%(I%), BOBS_X%(I%)) : MAP$(BOBS_Y%(I%), BOBS_X%(I%)) = T_FREE$ : BOBS_Y%(I%) = BOBS_Y%(I%) + 1 : MAP$(BOBS_Y%(I%), BOBS_X%(I%)) = OLDTILE$ 108 | 8020 IF BOBS_DIR%(I%) = 1 AND MAP$(BOBS_Y%(I%), BOBS_X%(I%) + 1) = T_WALL$ THEN BOBS_DIR%(I%) = 3 109 | 8021 IF BOBS_DIR%(I%) = 3 AND MAP$(BOBS_Y%(I%), BOBS_X%(I%) - 1) = T_WALL$ THEN BOBS_DIR%(I%) = 1 110 | 8022 IF BOBS_DIR%(I%) = 0 AND MAP$(BOBS_Y%(I%) - 1, BOBS_X%(I%)) = T_WALL$ THEN BOBS_DIR%(I%) = 2 111 | 8023 IF BOBS_DIR%(I%) = 2 AND MAP$(BOBS_Y%(I%) + 1, BOBS_X%(I%)) = T_WALL$ THEN BOBS_DIR%(I%) = 0 112 | 8030 NEXT I% 113 | 8999 RETURN 114 | 9000 REM START PAGE 115 | 9001 IF ARGV$(1) = "" THEN MAPTYPE$ = "Default Level" 116 | 9002 IF ARGV$(1) <> "" THEN MAPTYPE$ = "Custom Level " + ARGV$(1) 117 | 9005 PRINT "pacman 1.0" 118 | 9006 PRINT "by archer" 119 | 9007 PRINT "==========" 120 | 9008 PRINT "" 121 | 9009 PRINT "You can move with the arrow keys or with the w,a,s,d keys" 122 | 9010 PRINT "< > V A is the Player, depending on the direction" 123 | 9020 PRINT ". you can eat the dots to score points" 124 | 9030 PRINT "B P dont touch them, they will kill you! they also eat the dots" 125 | 9040 PRINT "" 126 | 9045 PRINT "Map: "; MAPTYPE$ 127 | 9046 PRINT "" 128 | 9050 PRINT "Press e to start..." 129 | 9060 A$ = INKEY$ : IF A$ <> "e" THEN GOTO 9060 130 | 9065 PRINT CHR$(27) + "[?25l"; 131 | 9070 CLS 132 | 9080 RETURN 133 | 10000 REM LOAD BUILTIN DEFAULT LEVEL IF NO ONE PASSED THRU SUB 134 | 10010 DEFLVL$(0) = "#########################" 135 | 10020 DEFLVL$(1) = "#.....P.....#...........#" 136 | 10030 DEFLVL$(2) = "#.####.####.#.####.####.#" 137 | 10040 DEFLVL$(3) = "#.####.####.#.####.####.#" 138 | 10050 DEFLVL$(4) = "#@..........B...........#" 139 | 10060 DEFLVL$(5) = "#.####.#.#######.#.####.#" 140 | 10070 DEFLVL$(6) = "#......#....#....#......#" 141 | 10080 DEFLVL$(7) = "######.####.#.####.######" 142 | 10090 DEFLVL$(8) = "######.#....#....#.######" 143 | 10100 DEFLVL$(9) = "######.#B........#.######" 144 | 10110 DEFLVL$(10) = "######.#.#######.#.######" 145 | 10120 DEFLVL$(11) = "######.#.#######.#.######" 146 | 10130 DEFLVL$(12) = "######.#.B.......#.######" 147 | 10140 DEFLVL$(13) = "######.#....#....#.######" 148 | 10150 DEFLVL$(14) = "######.####.#.####.######" 149 | 10160 DEFLVL$(15) = "#......#....#....#......#" 150 | 10170 DEFLVL$(16) = "#.####.#.#######.#.####.#" 151 | 10180 DEFLVL$(17) = "#..........P............#" 152 | 10190 DEFLVL$(18) = "#.####.####.#.####.####.#" 153 | 10200 DEFLVL$(19) = "#.####.####.#.####.####.#" 154 | 10210 DEFLVL$(20) = "#...........#...........#" 155 | 10220 DEFLVL$(21) = "#########################" 156 | 10230 DEFLVLSIZE% = 21 157 | 10240 FOR J% = 0 TO DEFLVLSIZE% 158 | 10250 FOR I% = 1 TO LEN(DEFLVL$(J%)) 159 | 10260 MAP$(J%, I%) = MID$(DEFLVL$(J%), I%, 1) 160 | 10270 NEXT I% 161 | 10280 NEXT J% 162 | 10290 MAP_SIZE_X% = I% 163 | 10300 MAP_SIZE_Y% = J% 164 | 10310 RETURN 165 | 11000 REM CHECK WINNING CONDITION SUB 166 | 11001 DOTCOUNT% = 0 167 | 11010 FOR J% = 0 TO MAP_SIZE_Y% 168 | 11020 FOR I% = 0 TO MAP_SIZE_X% 169 | 11030 IF MAP$(J%, I%) = T_DOT$ THEN DOTCOUNT% = DOTCOUNT% + 1 170 | 11040 NEXT I% 171 | 11050 NEXT J% 172 | 11060 IF DOTCOUNT% = 0 THEN PRINT "" : PRINT "You won!" : PRINT "" : GOSUB 12345 : END 173 | 11070 RETURN 174 | 12000 REM DEBUG 175 | 12005 CLS 176 | 12010 FOR J% = 0 TO MAP_SIZE_Y% 177 | 12020 FOR I% = 0 TO MAP_SIZE_X% 178 | 12030 PRINT MAP$(J%, I%); 179 | 12040 NEXT I% 180 | 12050 PRINT "" 181 | 12060 NEXT J% 182 | 12345 IF CANWIN% = 1 THEN UWIN% = 1 : RETURN 183 | 13000 REM READ ARROW KEYS INPUT SUB 184 | 13010 KEY$ = INKEY$ 185 | 13020 IF KEY$ = CHR$(27) THEN KEY$ = INKEY$ : IF KEY$ = "[" THEN GOTO 13040 186 | 13025 INP$ = INKEY$ 187 | 13030 RETURN 188 | 13040 KEY$ = INKEY$ 189 | 13050 IF KEY$ = "A" THEN INP$ = "w" 190 | 13060 IF KEY$ = "B" THEN INP$ = "s" 191 | 13070 IF KEY$ = "C" THEN INP$ = "d" 192 | 13080 IF KEY$ = "D" THEN INP$ = "a" 193 | 13090 RETURN 194 | 14000 REM CHECK TERMINAL SIZE 195 | 14010 IF HEIGHT <> OHEIGHT% OR WIDTH <> OWIDTH% THEN PRINT "Terminal size has changed, please restart" : END 196 | 14020 IF MAP_SIZE_X% > WIDTH THEN PRINT "Your Terminal Width is " + STR$(WIDTH) + " but should be atleast " + STR$(MAP_SIZE_X%) : END 197 | 14030 IF MAP_SIZE_Y% > (HEIGHT - 3) THEN PRINT "Your Terminal Height is " + STR$(HEIGHT) + " but should be atleast " + STR$(MAP_SIZE_Y% + 3) : END 198 | 14040 RETURN 199 | -------------------------------------------------------------------------------- /pman.man: -------------------------------------------------------------------------------- 1 | Pman - Create Your Own Level 2 | ============================ 3 | 4 | Explanation of Symbols: 5 | ----------------------- 6 | @ is the player's starting point (only one allowed) 7 | # is a wall 8 | . dots can be eaten for points! But beware, enemies like them too... 9 | B A horizontal moving enemy, will turn around on hitting a wall 10 | P A vertical moving enemy, will turn around on hitting a wall 11 | 12 | Example of a Simple Map: 13 | ------------------------ 14 | ##### 15 | #...# 16 | #.@.# 17 | #...# 18 | ##### 19 | 20 | Example of a Simple Map with One Enemy: 21 | --------------------------------------- 22 | ######## 23 | #@.....# 24 | #...#..# 25 | #B..#..# 26 | ######## 27 | 28 | Put the map into a file, with an editor like ped. 29 | When you're done, you can start pman.exe and pass the filename as an argument, e.g.: `pman mymap.map` 30 | -------------------------------------------------------------------------------- /smalltar.bas: -------------------------------------------------------------------------------- 1 | 10 DIM FILES$(10) 2 | 11 FILEI% = 0 3 | 12 MAXFILES% = 0 4 | 100 PRINT "tar archiver 0.6a by archer" + CHR$(10) 5 | 110 PRINT "Enter filenames and leave a blank line when done" 6 | 120 INPUT "Filename?", TMP$ 7 | 130 IF TMP$ <> "" THEN FILES$(FILEI%) = TMP$ : FILEI% = FILEI% + 1 : GOTO 120 8 | 135 MAXFILES% = FILEI% 9 | 140 OPEN "test.tar", AS #5 10 | 150 FILEI% = 0 11 | 315 PRINT# 5, H$; FC$; PAD$; 12 | 998 CSUM$ = STRING$(8, CHR$(32)) 13 | 999 CSINIT% = 0 14 | 1000 REM START 15 | 1020 F1$ = LEFT$(FILES$(FILEI%) + STRING$(100, CHR$(0)), 100) 16 | 1030 F2$ = "0000664" + CHR$(0) 17 | 1040 F3$ = "0001750" + CHR$(0) 18 | 1050 F4$ = "0001750" + CHR$(0) 19 | 1055 GOSUB 20000 20 | 1060 F5$ = RIGHT$(STRING$(11, "0") + FSIZE$, 11) + CHR$(0) 21 | 1070 F6$ = RIGHT$(STRING$(11, "0") + "03577571360", 11) + CHR$(0) 22 | 1080 F7$ = CSUM$ 23 | 1090 F8$ = "0" 24 | 1100 F9$ = STRING$(100, CHR$(0)) 25 | 1110 F10$ = "ustar " + CHR$(0) 26 | 1120 F11$ = LEFT$(USER$ + STRING$(31, CHR$(0)), 31) + CHR$(0) 27 | 1130 F12$ = LEFT$(USER$ + STRING$(31, CHR$(0)), 31) + CHR$(0) 28 | 1140 F13$ = STRING$(8, CHR$(0)) 29 | 1150 F14$ = STRING$(8, CHR$(0)) 30 | 1160 F15$ = STRING$(167, CHR$(0)) 31 | 1170 HS% = LEN(F1$+F2$+F3$+F4$+F5$+F6$+F7$+F8$+F9$+F10$+F11$+F12$+F13$+F14$+F15$) 32 | 1180 H$ = F1$+F2$+F3$+F4$+F5$+F6$+F7$+F8$+F9$+F10$+F11$+F12$+F13$+F14$+F15$ 33 | 1190 FC$ = "" 34 | 1200 OPEN FILES$(FILEI%), AS #1 35 | 1210 IF EOF(1) = -1 THEN GOTO 1250 36 | 1220 INPUT# 1, FILEBUF$ 37 | 1230 FC$ = FC$ + FILEBUF$ + CHR$(10) 38 | 1240 GOTO 1210 39 | 1250 FC$ = LEFT$(FC$, LEN(FC$)-1) 40 | 1255 CLOSE #1 41 | 1260 FS% = LEN(FC$) 42 | 1281 IF CSINIT% = 0 THEN GOSUB 10000 43 | 1290 IF CSINIT% = 0 THEN CSINIT% = 1 : GOTO 1000 44 | 1300 PRINT "Added File "; FILES$(FILEI%); " to archive" 45 | 1310 FILEI% = FILEI% + 1 46 | 1311 GOSUB 10000 47 | 1312 GOSUB 30000 48 | 1315 PRINT# 5, H$ + FC$ + PAD$; 49 | 1318 CSINIT% = 0 : CSUM$ = STRING$(8, CHR$(32)) 50 | 1320 IF FILEI% < MAXFILES% THEN GOTO 1000 51 | 1330 GOSUB 5000 52 | 1340 PRINT# 5, PAD$; 53 | 1350 CLOSE #5 54 | 1360 PRINT "done." 55 | 1370 END 56 | 5000 REM END PADDING OF 20 BLOCKS 57 | 5001 PAD$ = "" 58 | 5010 PAD$ = PAD$ + CHR$(0) 59 | 5020 PS% = LEN(PAD$) + FS% + HS% 60 | 5030 IF PS% / 512 <> 20 THEN GOTO 5010 61 | 5040 RETURN 62 | 10000 REM SUB CALCULATE CHECKSUM 63 | 10001 SUM% = 0 64 | 10010 FOR I% = 0 TO 512 65 | 10020 SUM% = SUM% + (&HFF AND ASC(MID$(H$, I%, 1))) 66 | 10030 NEXT I% 67 | 10040 CSUM$ = RIGHT$(STRING$(6, "0") + OCT$(SUM%), 6) + CHR$(0) + CHR$(32) 68 | 10050 RETURN 69 | 20000 REM GET FILE SIZE 70 | 20005 FSIZE% = 0 71 | 20010 OPEN FILES$(FILEI%), AS #2 72 | 20020 IF EOF(2) = -1 THEN GOTO 20060 73 | 20030 INPUT# 2, TMPBUF$ 74 | 20040 FSIZE% = FSIZE% + LEN(TMPBUF$) 75 | 20050 GOTO 20020 76 | 20060 CLOSE #2 77 | 20070 FSIZE$ = OCT$(FSIZE%) 78 | 20080 RETURN 79 | 30000 REM SUB END PADDING FOR RECORD 80 | 30001 REM todo check padding 81 | 30010 TT% = HS% + FSIZE% + 512 82 | 30020 TR% = TT% MOD 512 83 | 30030 IF TR% <> 0 THEN TT% = TT% - 1 : GOTO 30020 84 | 30040 PAD$ = STRING$(TT% - HS% - FS%, CHR$(0)) 85 | 30045 PAD$ = LEFT$(PAD$, LEN(PAD$)-1) 86 | 30050 RETURN 87 | -------------------------------------------------------------------------------- /tc.bas: -------------------------------------------------------------------------------- 1 | 10 BGCOLOR$ = "6" : FGCOLOR$ = "4" : EXTCOLS% = 0 2 | 20 OPEN "tc.ini", AS #1 3 | 30 IF EOF(1) = -1 THEN GOTO 120 4 | 40 INPUT# 1, LINE$ 5 | 50 SEP% = INSTR(LINE$, "=", 0) 6 | 60 K$ = LEFT$(LINE$, SEP%) 7 | 70 V$ = MID$(LINE$, SEP% + 2, 90) 8 | 80 IF K$ = "foreground" THEN FGCOLOR$ = V$ 9 | 81 IF K$ = "background" THEN BGCOLOR$ = V$ 10 | 82 IF K$ = "fg_r" THEN FG_R$ = V$ 11 | 83 IF K$ = "fg_g" THEN FG_G$ = V$ 12 | 84 IF K$ = "fg_b" THEN FG_B$ = V$ 13 | 85 IF K$ = "bg_r" THEN BG_R$ = V$ 14 | 86 IF K$ = "bg_g" THEN BG_G$ = V$ 15 | 87 IF K$ = "bg_b" THEN BG_B$ = V$ 16 | 110 GOTO 30 17 | 120 CLOSE #1 18 | 121 IF ARGC% = 3 THEN EXTCOLS% = 0 : GOTO 125 19 | 122 IF FG_R$ <> "" THEN EXTCOLS% = 1 20 | 125 IF ARGV$(1) <> "" THEN FGCOLOR$ = ARGV$(1) 21 | 126 IF ARGV$(2) <> "" THEN BGCOLOR$ = ARGV$(2) 22 | 130 IF BGCOLOR$ = "black" THEN BGCOLOR$ = "0" 23 | 140 IF BGCOLOR$ = "red" THEN BGCOLOR$ = "1" 24 | 150 IF BGCOLOR$ = "green" THEN BGCOLOR$ = "2" 25 | 160 IF BGCOLOR$ = "yellow" THEN BGCOLOR$ = "3" 26 | 170 IF BGCOLOR$ = "blue" THEN BGCOLOR$ = "4" 27 | 180 IF BGCOLOR$ = "cyan" THEN BGCOLOR$ = "5" 28 | 190 IF BGCOLOR$ = "magenta" THEN BGCOLOR$ = "6" 29 | 200 IF BGCOLOR$ = "white" THEN BGCOLOR$ = "7" 30 | 210 IF FGCOLOR$ = "black" THEN FGCOLOR$ = "0" 31 | 220 IF FGCOLOR$ = "red" THEN FGCOLOR$ = "1" 32 | 230 IF FGCOLOR$ = "green" THEN FGCOLOR$ = "2" 33 | 240 IF FGCOLOR$ = "yellow" THEN FGCOLOR$ = "3" 34 | 250 IF FGCOLOR$ = "blue" THEN FGCOLOR$ = "4" 35 | 260 IF FGCOLOR$ = "cyan" THEN FGCOLOR$ = "5" 36 | 270 IF FGCOLOR$ = "magenta" THEN FGCOLOR$ = "6" 37 | 280 IF FGCOLOR$ = "white" THEN FGCOLOR$ = "7" 38 | 290 PRINT "telecommander v0.7a by archer" 39 | 300 PRINT "on startup colors can be defined:" 40 | 310 PRINT "tc " 41 | 320 PRINT "tc blue cyan" 42 | 330 PRINT "Available Colors: black, red, green, yellow, blue, cyan, magenta, white 43 | 340 PRINT CHR$(10); 44 | 350 GOSUB 2160 45 | 360 IF WIDTH < 80 OR HEIGHT < 24 THEN PRINT "This program needs atleast 80x24 :(" : END 46 | 370 CURRENTPAGE% = 0 47 | 380 CURRENTPOS% = 0 48 | 390 KEY$ = "" 49 | 400 MAXPERPAGE% = HEIGHT - 6 50 | 410 DBL_TOP_LEFT$ = CHR$(9556) 51 | 420 DBL_TOP_RIGHT$ = CHR$(9559) 52 | 430 DBL_BOTTOM_LEFT$ = CHR$(9562) 53 | 440 DBL_BOTTOM_RIGHT$ = CHR$(9565) 54 | 450 DBL_HORIZONTAL$ = CHR$(9552) 55 | 460 DBL_VERTICAL$ = CHR$(9553) 56 | 470 DBL_T_RIGHT$ = CHR$(9568) 57 | 480 DBL_T_LEFT$ = CHR$(9571) 58 | 490 DBL_T_DOWN$ = CHR$(9574) 59 | 500 DBL_T_UP$ = CHR$(9577) 60 | 510 OWIDTH% = WIDTH 61 | 520 OHEIGHT% = HEIGHT 62 | 530 REM GOTO 780 63 | 540 SPIN$ = "/" 64 | 550 DELIMITER$ = " " 65 | 560 MAXSTACK% = 0 66 | 570 GOSUB 600 67 | 580 GOTO 750 68 | 590 END 69 | 600 REM split 70 | 610 TSTR$ = "" 71 | 620 FOR I% = 1 TO LEN(DIR$) 72 | 630 GOSUB 2220 73 | 640 IF MID$(DIR$, I%, 1) = DELIMITER$ THEN GOTO 690 74 | 650 TSTR$ = TSTR$ + MID$(DIR$, I%, 1) 75 | 660 IF I% = LEN(DIR$) THEN GOTO 690 76 | 670 NEXT I% 77 | 680 RETURN 78 | 690 SLEEP 0 79 | 700 REM IF INSTR(TSTR$, ".txt", 0) > -1 THEN ARRAY$(MAXSTACK%) = TSTR$ : MAXSTACK% = MAXSTACK% + 1 80 | 710 REM IF INSTR(TSTR$, ".bas", 0) > -1 THEN ARRAY$(MAXSTACK%) = TSTR$ : MAXSTACK% = MAXSTACK% + 1 81 | 720 ARRAY$(MAXSTACK%) = TSTR$ : MAXSTACK% = MAXSTACK% + 1 82 | 730 TSTR$ = "" 83 | 740 GOTO 670 84 | 750 REM PROGRAM CONTINUES HERE... 85 | 760 PRINT CHR$(10); CHR$(10); "Press any key to continue..."; 86 | 770 MEH$ = INKEY$ 87 | 780 SHOWORHIDE% = 0 : GOSUB 2420 88 | 781 IF EXTCOLS% = 0 THEN COLOR BGCOLOR$, FGCOLOR$ 89 | 782 IF EXTCOLS% = 1 THEN PRINT CHR$(27) + "[38;2;" + FG_R$ + ";" + FG_G$ + ";" + FG_B$ + ";48;2;" + BG_R$ + ";" + BG_G$ + ";" + BG_B$ + "m"; 90 | 790 CLS 91 | 800 IF EXTCOLS% = 1 THEN PRINT CHR$(27) + "[38;2;" + FG_R$ + ";" + FG_G$ + ";" + FG_B$ + ";48;2;" + BG_R$ + ";" + BG_G$ + ";" + BG_B$ + "m"; : FOR CLH% = 1 TO HEIGHT : FOR CLW% = 1 TO WIDTH : PRINT " "; : NEXT : SLEEP 0.000001 : NEXT 92 | 801 IF EXTCOLS% = 0 THEN COLOR BGCOLOR$, FGCOLOR$ : FOR CLH% = 1 TO HEIGHT : FOR CLW% = 1 TO WIDTH : PRINT " "; : NEXT : SLEEP 0.000001 : NEXT 93 | 810 REM PAINT BORDER 94 | 820 Y$ = "1" : X$ = "1" : GOSUB 2090 95 | 830 PRINT STRING$(WIDTH, DBL_HORIZONTAL$); 96 | 840 Y$ = "1" : X$ = "1" : GOSUB 2090 : PRINT DBL_TOP_LEFT$; 97 | 850 Y$ = "1" : X$ = STR$(WIDTH) : GOSUB 2090 : PRINT DBL_TOP_RIGHT$; 98 | 860 Y$ = STR$(HEIGHT - 1) : X$ = "1" : GOSUB 2090 : PRINT DBL_BOTTOM_LEFT$; 99 | 870 Y$ = STR$(HEIGHT - 1) : X$ = STR$(WIDTH) : GOSUB 2090 : PRINT DBL_BOTTOM_RIGHT$; 100 | 880 Y$ = STR$(HEIGHT - 1) : X$ = "2" : GOSUB 2090 : PRINT STRING$(WIDTH - 2, DBL_HORIZONTAL$); 101 | 890 Y$ = "1" : X$ = STR$(INT(WIDTH / 2 )) : GOSUB 2090 : PRINT DBL_T_DOWN$; 102 | 900 Y$ = STR$(HEIGHT - 1) : X$ = STR$(INT(WIDTH / 2)) : GOSUB 2090 : PRINT DBL_T_UP$; 103 | 910 FOR I% = 2 TO HEIGHT - 2 104 | 920 Y$ = STR$(I%) : X$ = "1" : GOSUB 2090 : PRINT DBL_VERTICAL$; 105 | 930 Y$ = STR$(I%) : X$ = STR$(WIDTH) : GOSUB 2090 : PRINT DBL_VERTICAL$; 106 | 940 Y$ = STR$(I%) : X$ = STR$(INT(WIDTH / 2)) : GOSUB 2090 : PRINT DBL_VERTICAL$; 107 | 950 NEXT I% 108 | 960 Y$ = STR$(HEIGHT - 3) : X$ = "1" : GOSUB 2090 : PRINT DBL_T_RIGHT$; 109 | 970 Y$ = STR$(HEIGHT - 3) : X$ = STR$(INT(WIDTH / 2)) : GOSUB 2090 : PRINT DBL_T_LEFT$; 110 | 980 Y$ = STR$(HEIGHT - 3) : X$ = "2" : GOSUB 2090 : PRINT STRING$(INT(WIDTH / 2 - 2), DBL_HORIZONTAL$); 111 | 990 Y$ = STR$(INT(HEIGHT / 4)) : X$ = STR$(INT(WIDTH / 2)) : GOSUB 2090 : PRINT DBL_T_RIGHT$; 112 | 1000 Y$ = STR$(INT(HEIGHT / 4)) : X$ = STR$(WIDTH) : GOSUB 2090 : PRINT DBL_T_LEFT$; 113 | 1010 Y$ = STR$(INT(HEIGHT / 4)) : X$ = STR$(INT(WIDTH / 2) + 1) : GOSUB 2090 : PRINT STRING$(INT(WIDTH / 2) - 1, DBL_HORIZONTAL$); 114 | 1020 GOSUB 1430 115 | 1030 REM FILL 116 | 1040 TOTALPAGES% = INT(MAXSTACK% / MAXPERPAGE%) 117 | 1050 IF (MAXSTACK% / MAXPERPAGE%) > INT(MAXSTACK% / MAXPERPAGE%) THEN TOTALPAGES% = INT(MAXSTACK% / MAXPERPAGE%) + 1 118 | 1060 SHOWORHIDE% = 0 : Y$ = STR$(HEIGHT - 2) : X$ = "3" : GOSUB 2090 : PRINT USER$; " "; DATE$; " "; TIME$; " "; CURRENTPAGE% + 1; "/"; TOTALPAGES% : SHOWORHIDE% = 1 119 | 1070 GOSUB 1140 120 | 1080 GOSUB 1310 121 | 1090 GOSUB 1240 122 | 1100 IF OWIDTH% <> WIDTH OR OHEIGHT% <> HEIGHT THEN REDRAW% = 1 123 | 1110 IF REDRAW% = 1 THEN REDRAW% = 0 : KEY$ = "" : GOTO 2470 124 | 1120 KEY$ = POLKEY$ 125 | 1130 GOTO 1030 126 | 1140 REM FILE LIST 127 | 1150 Y$ = "2" : X$ = "3" : GOSUB 2090 128 | 1160 SCREENI% = 3 129 | 1170 FROM% = CURRENTPAGE% * MAXPERPAGE% 130 | 1180 TOO% = FROM% + MAXPERPAGE% 131 | 1190 FOR I% = FROM% TO TOO% 132 | 1200 PRINT ARRAY$(I%); SPC$(8) : Y$ = STR$(SCREENI%) : X$ = "3" : GOSUB 2090 133 | 1210 SCREENI% = SCREENI% + 1 134 | 1220 NEXT I% 135 | 1230 RETURN 136 | 1240 REM ACTIVE 137 | 1250 IF CURRENTPOS% + 2 > HEIGHT THEN RETURN 138 | 1260 Y$ = STR$(CURRENTPOS%+2) : X$ = "3" : GOSUB 2090 139 | 1280 IF EXTCOLS% = 1 THEN PRINT CHR$(27) + "[38;2;" + BG_R$ + ";" + BG_G$ + ";" + BG_B$ + ";48;2;" + FG_R$ + ";" + FG_G$ + ";" + FG_B$ + "m"; 140 | 1281 IF EXTCOLS% = 0 THEN COLOR FGCOLOR$, BGCOLOR$ 141 | 1282 PRINT ARRAY$(CURRENTPAGE% * MAXPERPAGE% + CURRENTPOS%); 142 | 1290 IF EXTCOLS% = 1 THEN PRINT CHR$(27) + "[38;2;" + FG_R$ + ";" + FG_G$ + ";" + FG_B$ + ";48;2;" + BG_R$ + ";" + BG_G$ + ";" + BG_B$ + "m"; 143 | 1291 IF EXTCOLS% = 0 THEN COLOR BGCOLOR$, FGCOLOR$ 144 | 1300 RETURN 145 | 1310 REM KEY PRESSED 146 | 1320 IF KEY$ = "s" THEN CURRENTPOS% = CURRENTPOS% + 1 : IF CURRENTPOS% > MAXPERPAGE% OR ARRAY$(CURRENTPAGE% * MAXPERPAGE% + CURRENTPOS%) = "" THEN CURRENTPOS% = 0 147 | 1330 IF KEY$ = "w" THEN CURRENTPOS% = CURRENTPOS% - 1 : IF CURRENTPOS% < 0 THEN CURRENTPOS% = 0 148 | 1340 IF KEY$ = "c" THEN GOSUB 1850 149 | 1350 IF KEY$ = "o" THEN GOSUB 1530 150 | 1360 REMAINDER% = MAXSTACK% MOD MAXPERPAGE% 151 | 1370 IF KEY$ = "." THEN CURRENTPAGE% = CURRENTPAGE% + 1 : CURRENTPOS% = CURRENTPAGE% * MAXPERPAGE% - (MAXPERPAGE% * CURRENTPAGE%) : IF CURRENTPAGE% >= CINT(MAXSTACK% / MAXPERPAGE%) + SGN(REMAINDER%) -1 THEN CURRENTPAGE% = CINT(MAXSTACK% / MAXPERPAGE%) - 1 152 | 1380 IF KEY$ = "," THEN CURRENTPAGE% = CURRENTPAGE% - 1 : CURRENTPOS% = CURRENTPAGE% * MAXPERPAGE% - MAXPERPAGE% : IF CURRENTPAGE% < 0 THEN CURRENTPAGE% = 0 153 | 1390 IF CURRENTPOS% < 0 THEN CURRENTPOS% = 0 154 | 1400 IF KEY$ = "." OR KEY$ = "," THEN GOSUB 1750 155 | 1410 IF KEY$ = "r" THEN REDRAW% = 1 156 | 1420 RETURN 157 | 1430 REM HINT TEXT 158 | 1440 Y$ = "2" : X$ = STR$(INT(WIDTH / 2) + 2) : GOSUB 2090 159 | 1450 PRINT "telecommander"; 160 | 1460 Y$ = "3" : X$ = STR$(INT(WIDTH / 2) + 2) : GOSUB 2090 161 | 1470 PRINT "w - move up, s - move down, r - redraw"; 162 | 1480 Y$ = "4" : X$ = STR$(INT(WIDTH / 2) + 2) : GOSUB 2090 163 | 1490 PRINT "o - open file, c - copy file"; 164 | 1500 Y$ = "5" : X$ = STR$(INT(WIDTH / 2) + 2) : GOSUB 2090 165 | 1510 PRINT ". - next page , - previous page"; 166 | 1520 RETURN 167 | 1530 REM PREVIEW FILE 168 | 1540 GOSUB 1690 169 | 1550 GOSUB 2290 170 | 1560 IF ISBINARYFILE% = 1 THEN ISBINARYFILE% = 0 : RETURN 171 | 1570 POSY% = INT(HEIGHT / 4) + 1 172 | 1580 II% = 1 173 | 1590 OPEN ARRAY$(CURRENTPAGE% * MAXPERPAGE% + CURRENTPOS%), AS #1 174 | 1600 IF EOF(1) = -1 OR POSY% > HEIGHT - 2 THEN GOTO 1670 175 | 1610 INPUT# 1, FILECONTENT$ 176 | 1620 Y$ = STR$(POSY%) : X$ = STR$(INT(WIDTH / 2) + 3) : GOSUB 2090 177 | 1630 POSY% = POSY% + 1 178 | 1640 II% = II% + 1 179 | 1650 PRINT LEFT$(FILECONTENT$, INT(WIDTH / 2) - 6); 180 | 1660 GOTO 1600 181 | 1670 CLOSE #1 182 | 1680 RETURN 183 | 1690 REM CLEAR FILE PREVIEW 184 | 1700 FOR I% = INT(HEIGHT / 4) + 1 TO HEIGHT - 2 185 | 1710 Y$ = STR$(I%) : X$ = STR$(INT(WIDTH / 2) + 3) : GOSUB 2090 186 | 1720 PRINT SPC$(INT(WIDTH / 2)-3); 187 | 1730 NEXT I% 188 | 1740 RETURN 189 | 1750 REM CLEAR FILE AREA 190 | 1760 LOCATE 2, 3 191 | 1770 FOR I% = 0 TO MAXPERPAGE% 192 | 1780 PRINT SPC$(INT(WIDTH / 2) - 5); 193 | 1790 Y$ = STR$(I% + 3) : X$ = "3" : GOSUB 2090 194 | 1800 NEXT I% 195 | 1810 GOSUB 1140 196 | 1820 CURRENTPOS% = CURRENTPAGE% * MAXPERPAGE% - (MAXPERPAGE% * CURRENTPAGE%) 197 | 1830 GOSUB 1240 198 | 1840 RETURN 199 | 1850 REM COPY FILE 200 | 1860 GOSUB 1690 201 | 1870 SHOWORHIDE% = 1 202 | 1880 Y$ = STR$(INT(HEIGHT / 4) + 2) : X$ = STR$(INT(WIDTH / 2) + 3) : GOSUB 2110 203 | 1890 PRINT "Copy File "; ARRAY$(CURRENTPAGE% * MAXPERPAGE% + CURRENTPOS%); " to..."; 204 | 1900 Y$ = STR$(INT(HEIGHT / 4) + 3) : X$ = STR$(INT(WIDTH / 2) + 3) : GOSUB 2110 205 | 1910 INPUT ">", NEWFILE$ 206 | 1920 IF NEWFILE$ = "" OR LEN(NEWFILE$) > 11 THEN PRINT CHR$(10); "Max. Length is 8!" : GOTO 1900 207 | 1930 Y$ = STR$(INT(HEIGHT / 4) + 5) : X$ = STR$(INT(WIDTH / 2) + 3) : GOSUB 2110 208 | 1940 PRINT "Copying file "; ARRAY$(CURRENTPAGE% * MAXPERPAGE% + CURRENTPOS%); " to "; NEWFILE$; "..."; 209 | 1950 OPEN ARRAY$(CURRENTPAGE% * MAXPERPAGE% + CURRENTPOS%), AS #1 210 | 1960 OPEN NEWFILE$, AS #2 211 | 1970 IF EOF(1) = -1 THEN GOTO 2010 212 | 1980 INPUT# 1, FILELINE$ 213 | 1990 PRINT# 2, FILELINE$ 214 | 2000 GOTO 1970 215 | 2010 CLOSE #1 216 | 2020 CLOSE #2 217 | 2030 Y$ = STR$(INT(HEIGHT / 4) + 6) : X$ = STR$(INT(WIDTH / 2) + 3) : GOSUB 2090 218 | 2040 ARRAY$(MAXSTACK%) = NEWFILE$ 219 | 2050 MAXSTACK% = MAXSTACK% + 1 220 | 2060 PRINT "File has been copied."; 221 | 2070 SHOWORHIDE% = 0 : GOSUB 2420 222 | 2080 RETURN 223 | 2090 REM LOCATE Y X 224 | 2100 SHOWORHIDE% = 0 225 | 2110 GOSUB 2420 226 | 2120 PRINT CHR$(27) + "[" + Y$ + ";" + X$ + "H"; 227 | 2130 GOSUB 2420 228 | 2140 RETURN 229 | 2150 REM STATUSBAR FROM UNDERWOOD 230 | 2160 REM INIT 231 | 2170 PRINT "Loading..."; CHR$(10) 232 | 2180 S% = 1 233 | 2190 E% = LEN(DIR$) 234 | 2200 T% = 1 235 | 2210 RETURN 236 | 2220 REM INCREMENT 237 | 2230 MD% = INT((T%/E%*100)/10) 238 | 2240 ML% = 10 - INT((T%/E%*100)/10) 239 | 2250 P% = INT(T%/E%*100) 240 | 2260 IF O% <> P% THEN PRINT CHR$(27) "[A" "[" STRING$(MD%, "#") STRING$(ML%, "_") "] " STR$(P%) "%" : O% = P% : T% = T% + 1 : RETURN 241 | 2270 IF P% <> 100 THEN T% = T% + 1 : RETURN 242 | 2280 RETURN 243 | 2290 REM CHECK FILE TYPE FOR PREVIEW 244 | 2300 FILENAME$ = ARRAY$(CURRENTPAGE% * MAXPERPAGE% + CURRENTPOS%) 245 | 2310 IF INSTR(FILENAME$, ".a2", 0) > -1 THEN GOSUB 2370 246 | 2320 IF INSTR(FILENAME$, ".exe", 0) > -1 THEN GOSUB 2370 247 | 2330 IF INSTR(FILENAME$, ".gam", 0) > -1 THEN GOSUB 2370 248 | 2340 IF INSTR(FILENAME$, ".vt", 0) > -1 THEN GOSUB 2370 249 | 2350 IF INSTR(FILENAME$, ".c8", 0) > -1 THEN GOSUB 2370 250 | 2360 RETURN 251 | 2370 REM CHECK FILE TYPE PRINT ERROR MESSAGE 252 | 2380 GOSUB 1690 253 | 2390 Y$ = STR$(INT(HEIGHT / 4) + 1) : X$ = STR$(INT(WIDTH / 2) + 3) : GOSUB 2090 : PRINT "Binary Files cannot be opened"; 254 | 2400 ISBINARYFILE% = 1 255 | 2410 RETURN 256 | 2420 REM SHOW HIDE CURSOR SHOWORHIDE% 257 | 2430 SLEEP 0 258 | 2440 IF SHOWORHIDE% = 1 THEN PRINT CHR$(27) "[?25h"; 259 | 2450 IF SHOWORHIDE% = 0 THEN PRINT CHR$(27) "[?25l"; 260 | 2460 RETURN 261 | 2470 REM REDRAW 262 | 2480 MAXPERPAGE% = HEIGHT - 6 263 | 2490 OWIDTH% = WIDTH 264 | 2500 OHEIGHT% = HEIGHT 265 | 2510 GOTO 780 266 | -------------------------------------------------------------------------------- /tc.man: -------------------------------------------------------------------------------- 1 | telecommander - a simplified mc-clone 2 | ===================================== 3 | 4 | just start it with tc.bas with the default colors 5 | 6 | you can define colors on start up: tc.bas 7 | use the command show colors to see available colors 8 | 9 | you can set your preferred colors in tc.ini, which wil loaded on startup. 10 | example for default colors telehack provides: 11 | tc.bas green red 12 | 13 | example tc.ini: 14 | foreground=red 15 | background=blue 16 | 17 | you can also set in tc.ini R,G,B values which can display 256 colors. your terminal needs to support 256 colors. 18 | example tc.ini: 19 | fg_r=31 20 | fg_g=56 21 | fg_b=99 22 | bg_r=1 23 | bg_g=127 24 | bg_b=200 --------------------------------------------------------------------------------