home *** CD-ROM | disk | FTP | other *** search
/ Power Programming / powerprogramming1994.iso / progtool / bss / pup.arc / PUP.DOC < prev    next >
Text File  |  1987-12-11  |  20KB  |  533 lines

  1. T. Jennings
  2. Fido Software
  3. 164 Shipley 
  4. San Francisco CA 94107
  5.  
  6. document updated: 10 Dec 87
  7.  
  8.  
  9.             Puppy
  10.  
  11. Pup is a very modest project: it is a very small scaleì
  12. bulletin board, targeted mainly for the current low-end typeì
  13. machines; Z80, 64K, maybe 500K disk storage, primitive DOS.ì
  14. It of course works fine on MSDOS; there is a pclone versionì
  15. available. (Ask)
  16.  
  17. By Jan/Feb of 88, Pup will have a full featured FidoNetì
  18. compatible network interface. The design is complete, andì
  19. some code is done. 
  20.  
  21.  
  22. While the pclone version is where new things get tested, itì
  23. is NOT the point of Pup. There are already more than enoughì
  24. pclone BBSs to choose from; Pup however would fit veryì
  25. comfortably into the smallest possible pclone these days.
  26.  
  27. BBSs have escalated in complexity way out of proportion toì
  28. their usefulness; most BBSs are used by highly skilledì
  29. people with lots of resource$ to talk to people likeì
  30. themselves. This is fine, but most of the world isn't in theì
  31. position to sit $1,000 (or more!) in a corner of the roomì
  32. for one special purpose only.
  33.  
  34. Also, the trend is towards larger, more complex systems,ì
  35. wide area networking, extremely high throughput dataì
  36. transfers and other things that just push the likes of Fido,ì
  37. Opus, TBBS an order of magnitude or two out of the range ofì
  38. many (if not most) people who might benefit from them.
  39.  
  40. Seems we've forgotten that the original intent of BBSs wasì
  41. to communicate with other people. It is not obvious to meì
  42. that talking to more people is better. The best BBSs I'veì
  43. ever used, of any type, were all very small systems; RCP/Ms,ì
  44. Apple][/GBBS, etc. Most used awful software, but were stillì
  45. the best (meaning most useful or most amusing) systems I'veì
  46. run across. There's a hint there, I think.
  47.  
  48.  
  49. I would love to see Pup ported to CP/M (especially: thatì
  50. awful Heath/Zenith H-89) and Apple ][ PRODOS or something.
  51. .pa
  52. .he Copyrights, trademarks, money, that sort of thing.
  53.  
  54.         S H A R E W A R E 
  55.  
  56. Puppy is shareware; if you like it or find it or parts of itì
  57. useful, then mail me what you think it's worth. $40 isì
  58. suggested. Less will not be considered an insult. In return,ì
  59. I will mail you a diskette with the latest & greatest on it.
  60.  
  61.  
  62. -*-*- -*-*- -*-*- -*-*- -*-*- -*-*- -*-*- -*-*- -*-*- 
  63.  
  64. PUPPY PRE-RELEASE NOTE: The message base design reallyì
  65. annoys some people. Instead of the usual linear numberedì
  66. messages, I opted for a stack-like design (see the next pageì
  67. or so for details.) 
  68.  
  69. I may do another message base that is in the more usualì
  70. linear fashion; it will be fully compatible with the messageì
  71. base data files that this Pup generates; only the programì
  72. will change. It's not all that big code-wise, but the Pileì
  73. really bugs some people. I do eventually take hints, so ...
  74.  
  75. -*-*- -*-*- -*-*- -*-*- -*-*- -*-*- -*-*- -*-*- -*-*- 
  76.  
  77. Check out the pclone version, show it to people, see whatì
  78. your reaction is. It should be portable as-is to smallì
  79. machines.
  80.  
  81. OK, down to brass tacks. (What on earth does that mean?) I,ì
  82. Tom Jennings, do business as Fido Software, at the addressì
  83. below. My commercial products are copyrighted works, and myì
  84. sole source of income. Copyrighted works produced by me willì
  85. be marked as such:
  86.  
  87.         Copyright Tom Jennings 1987, etc
  88.  
  89. This is very straightforward. These are commercial products;ì
  90. you want, you pay. Or the guy in the big car over there willì
  91. make you pay double later, OK?
  92.  
  93.  
  94. Now for years I have been writing programs and distributingì
  95. them, in binary and some in source form, but I've never madeì
  96. it very clear what their status was. Partly this is becauseì
  97. the previous environment (less cutthroat) was more friendlyì
  98. and less demanding, and partly because I just wasn't thatì
  99. organized. This is to change starting now. (now?)
  100.  
  101.  
  102. The following notice will be firmly affixed to all programsì
  103. produced by me that are not commercial copyrighted works.ì
  104. Please don't utter the phrase "public domain" because thatì
  105. means something awful:
  106.  
  107.         (k) All Rights Reversed
  108.  
  109. (all hail Eris) This means: what you do with it is up toì
  110. you. I ask though, that if you distribute it, you provideì
  111. sources as part of the package, at no extra cost or penaltyì
  112. or obligation to the person receiving it; and that you alsoì
  113. do not remove the (k) All Rights Reversed notice. I also askì
  114. that you don't change the version number, if there is one;ì
  115. you will only needlessly confuse people when I come out withì
  116. a new version. Hint: Add your own IDs after it, like "1-AB"ì
  117. where "AB" is your version number.
  118.  
  119.  
  120. "Fido" is a trademark of Tom Jennings. It you utter it sendì
  121. me a dollar. "FidoNet" is a also registered trademark of Tomì
  122. Jennings. If you even think it send me two dollars. If youì
  123. use both, send me ten dollars and your first born child. Allì
  124. rights reserved, and all wrongs righted. So there.
  125.  
  126.  
  127.  
  128.     Fido Software
  129.     164 Shipley
  130.     San Francisco CA 94107
  131.     (415)-764-1629, FidoSW, using Fido v12 1:125/111
  132.     (415)-882-9835, ch@os, using Puppy v1
  133.       soon will be known as 1:125/164
  134.  
  135. If you have anything to contribute, please do. 
  136. .pa
  137. Historical Curiosities: An Editorial
  138.  
  139. A little history is in order here. I, like hundreds ofì
  140. others, have been hanging out on BBSs and writing freeì
  141. programs since Ward & Randy's CBBS. Nothing new or unique orì
  142. interesting here.
  143.  
  144. Fido, started in 1984, is by far the most popular and wellì
  145. known program I have ever produced. To say it exceededì
  146. anything I ever planned for it is an understatement.ì
  147. Requests for diskettes got so heavy that I started chargingì
  148. for diskettes; as demand for functions and reliabilityì
  149. increased, by many hundreds of people, it slowly turned intoì
  150. a part-time business.
  151.  
  152. Now it eventually became obvious that this wasn't a typicalì
  153. free BBS program, and that others wanted to write FidoNet¡
  154. compatible programs; Thom Henderson had sucessfully gottenì
  155. SeaDog running. An effort went into documenting the protocolì
  156. (Randy Bush did a wonderful job with the FSC001 doc a yearì
  157. later) and making structures public, etc. Interfaceì
  158. information was released with each version, and work wasì
  159. started towards the real technical specification,ì
  160. culminating in FSC001. 
  161.  
  162. Eventually, Fido/FidoNet became a full time job. I nowì
  163. derive all of my income from it. (I license Fido/FidoNet toì
  164. mostly small to medium companies and non-militaryì
  165. governmental agencies.) Because of this, Fido is no longerì
  166. free, starting with version 12. (You can now use previousì
  167. versions for free; v11 manuals once again available for $35)
  168.  
  169. My roots and heart is still in the hobbiest end of things,ì
  170. and Fido Software is hardly a traditional software company.ì
  171. I am working on new software for hobbiests, both "free" andì
  172. "shareware". I now fund this development from licensingì
  173. Fido, and hopefully other sources in the future. I'm hardlyì
  174. getting rich from this, and that's not the point.
  175.  
  176. My goal today is somewhat subversive I suppose; I want toì
  177. see more non-technical people use computers forì
  178. communicating in ways not traditionally though of, and onì
  179. small cheap machines; not by throwing money at high-endì
  180. Pclones or traditional services. (You're supposed to doì
  181. wierd things with computers, that's what they're for!)
  182.  
  183. Traditional media in the U. S. is getting more and moreì
  184. restricted to lowest-common-denominator, safe, bland,ì
  185. *profitable* mindless pap. (Did you know: only 26ì
  186. corporations own 1/2 or more of all media in the US:ì
  187. magazines, books, TV, radio, newspapers, etc? Source:ì
  188. "Fairness & Accuracy in Reporting", June 87) Individuals andì
  189. small groups running BBSs and writing zines is one way toì
  190. promote free (as in open) communications.
  191.  
  192. Some have asserted that I'm a greedy programmer trying toì
  193. milk money from peoples hobby with Fido (how dare I chargeì
  194. money) and that I don't care about much else.
  195.  
  196. I will merely say: I've been writing free software sinceì
  197. 1979, and have had phenomenal, unexpected success withì
  198. Fido/FidoNet, which I have basically given to the world,ì
  199. gratis. My attitudes haven't changed much, except to get aì
  200. bit more radical. Time will tell, as it always does.
  201.  
  202. OK, I'll shut up now.
  203. .pa
  204. Pup's FidoNet interface
  205.  
  206. Suffice to say at this point, it will be both highì
  207. performance, and will fit very nicely on a 64K Z80 with aì
  208. couple of decent sized floppies.
  209.  
  210. Keep in mind it's not meant to act as a gateway to all ofì
  211. Western Europe. You would probably have a hard time evenì
  212. making it a Net Host.
  213.  
  214. What it will do though is run up to 16 echo conferences at aì
  215. higher software-performance level available on any machineì
  216. today, period. No space- and time-consuming packeting andì
  217. unpacketing, no external conferencing packages.
  218.  
  219. Use of the nodelist will be optional; for echo conferences,ì
  220. only the system information for the next-in-line systemì
  221. (Pup, Fido, Opus, etc) is needed. 
  222.  
  223.  
  224. The method is: on-the-fly packeting and unpacketing. The Pupì
  225. FidoNet code uses XMODEM to send the packet, as per FSC001ì
  226. specifications. However, instead of generating a packet fileì
  227. ahead of time, then XMODEMing it out, when XMODEM goes toì
  228. "read" a block from the packet file, it uses a state machineì
  229. to generate the data as it goes. Because the message base isì
  230. one contiguous file, with a memory resident index,ì
  231. performance is not a problem. This part is already coded.
  232.  
  233. The receiver does a similar thing. As XMODEM receivesì
  234. blocks, it would normally write them to a packet file forì
  235. later unpacking into messages. In Pup, the blocks are notì
  236. written to a file, but decomposed byte by byte into theì
  237. message base directly. Again, because of the message baseì
  238. design performance isn't an issue.
  239.  
  240. .pa
  241. Pup the Bulletin Board
  242.  
  243. Pup has all the usual amenities, but it doesn't appear thatì
  244. way when you first look at it. There's only ten commands orì
  245. so total.
  246.  
  247. The message base consists of two files, one that containsì
  248. the message body text, and the other is an index with theì
  249. usual TO:, FROM:, etc information, as well as the TOPICì
  250. information. (More on Topics later.)
  251.  
  252. Pup's message base is created once when SET-PUP is run, andì
  253. never changes in size. (You can set the size of each messageì
  254. and the number of messages.) (And later there will be a wayì
  255. to change the size, but not right away.) The advantages: itì
  256. never grows to fill your disk; performance is extremely goodì
  257. (if you format the disk first, you will be guarenteed thatì
  258. all sectors in the file are contiguous); there is no needì
  259. for message base maintenance.
  260.  
  261. (NOTE: See the PRE-RELEASE NOTE mentioned earlier aboutì
  262. message base paradigm.)
  263.  
  264. Messages are arranged to match my desk: a Pile. I work byì
  265. writing things on these tiny 3 x 5 pads of paper; one note,ì
  266. phone number, bug, etc per sheet. I stack 'em up, move themì
  267. around, etc. The one on the top is the newest.
  268.  
  269. Pups messages are in a Pile. When you enter a message, itì
  270. goes on the Top; ones entered before are still there, underì
  271. the top. Eventually, they reach the bottom, then they fallì
  272. off. If you set Pup to have 100 messages, then when youì
  273. enter the 101st message, the first one ever entered fallsì
  274. off the bottom.
  275.  
  276. Yeah, its a ring buffer. 
  277.  
  278. When you read messages you start, by default, at the Top ofì
  279. the Pile. From there you can read messages, one afterì
  280. another, until you hit the Bottom. You can of course hopì
  281. around as you wish.
  282.  
  283. Now a huge monolithic messag base isn't much fun to pokeì
  284. around in. This is where Topics come in. 
  285.  
  286. Pup can have up to 16 topics; you must have at least one.ì
  287. Topics are the usual grouping, areas, subjects, that sort ofì
  288. thing. In Pup though, instead of rigid barricades thatì
  289. messages must be forced within, in Pup you can hop Topics atì
  290. will. 
  291.  
  292. When reading messages, you can choose which which topics youì
  293. wish to see, including "all". If you choose one topic, thenì
  294. those are the only messages you will see. If you chooseì
  295. "all", then you see all messages in all topics; this is niceì
  296. for browsing a board for the first time or two. If you'reì
  297. only interested in two or three topics, you can select onlyì
  298. those and you will see no others.
  299.  
  300. When entering messages, you choose which topic the messageì
  301. resides in; one message can also reside in any number ofì
  302. topics. Obviously to be use with caution, but great forì
  303. notices and such.
  304.  
  305.  
  306. One of the reasons I chose this was because of a commonì
  307. problem when using Fido-type message areas; neophyte usersì
  308. tend to not change areas, and never become aware of theì
  309. different catagories that may exist. Even sophisticatedì
  310. users say "A 5" and therefore won't see if the list ofì
  311. message areas has changed.
  312.  
  313. By default, in Pup you see all messages in all topics,ì
  314. starting at the newest. If this annoys you, you can useì
  315. choose which topics to see and not see, including "ALL".ì
  316. This is the exact opposite of the Fido (and RBBS, Opus, etc)ì
  317. philosophy.
  318. .pa
  319. Puppy and human callers
  320.  
  321. One of the first things to go in the trash when designingì
  322. Pup was anything relating to "callers". As I see it, callerì
  323. records have the following main purposes:
  324.  
  325.     terminal settings (lines, columns, etc)
  326.     where they left off last time
  327.     access controls
  328.     let users see their name in lights
  329.  
  330. I consider all the other junk like help levels, last¡
  331. accessed message area or file areas and times called to beì
  332. design deficiencies (help levels?) or froo-froo (lastì
  333. message area).
  334.  
  335. If you need access controls you don't want Puppy. Accessì
  336. controls always escalate into huge monstrosities. Theì
  337. purpose of Pup is so that people can communicate, in an easyì
  338. to use and effecient manner. It's not an operating system,ì
  339. like some BBS installations are approaching.
  340.  
  341. Its a little wierd at first ... but you get used to it. Oneì
  342. objection that pops to mind is: how do I know that thatì
  343. person is who he says he is? Well, you don't. Actually ...ì
  344. if you are conversing with someone (not what you call whatì
  345. happens when there are 500+ people using a system!) it'sì
  346. pretty obvious. Also, it's not much of a challenge and notì
  347. worth the bother of entering stupid messages. Remember also,ì
  348. this isn't targeted at the mainstream BBS crowd.
  349.  
  350. How do you run a system then, with upwards of 500 differentì
  351. people per month? Get a Fido or other large scale (largeì
  352. resource) type program, which fits those sort ofì
  353. installations perfectly.
  354. .pa
  355. OK, enough: what's on the disk
  356.  
  357. The end result of all the crap in the Pup package is twoì
  358. programs and a few support files:
  359.  
  360.     PUP.EXE        the Pup program
  361.     SET-PUP.EXE    the Pup installer
  362.     PUP.SET        Pup configuration text file
  363.     FIDO2PUP.EXE    Fido to Pup message converter
  364.  
  365.     WELCOME.PUP    the initial welcome message
  366.     FILES.PUP    list of download files
  367.     MAIN.HLP    various help files ...
  368.     MESSAGE.HLP    ...
  369.     EDIT.HLP    ...
  370.  
  371.     PUPPY.SYS    main system file
  372.     MESSAGE.DAT    the message base itself
  373.     MESSAGE.IDX    the message bsae index
  374.  
  375. SET-PUP reads the text file PUP.SET and compiles it into theì
  376. PUPPY.SYS file that contains the installation type goodiesì
  377. (modem type, node number, limits and controls) and createsì
  378. an empty message base, if one doesn't already exist.
  379.  
  380. PUP is the BBS program, and reads all the other junk. 
  381.  
  382. FIDO2PUP puts any Fido .MSG messages into the Pup messageì
  383. base, and leaves the highest numbered one as the Topì
  384. message. Gives you something to start with.
  385.  
  386. .pa
  387. The complete list of files is:
  388.  
  389. Include files:
  390. ASCII.H
  391. PUPMEM.H
  392. PUPPY.H
  393. DRIVER.H
  394. LATTICE.ASH
  395.  
  396. Various tools for compilation:
  397. C.BAT
  398. PUP        MAKE file
  399. PUP.LNK        PLINK command file
  400. IBM.LIB        pclone serial driver library
  401. DRIVER.DOC    Pup/Fido driver specification
  402.  
  403. PUPMAIN.C    Pup main() and main loop
  404. PUP.C        Pup commands 
  405. MSGBASE.C    the message base system
  406. FILES.C        Pup file commands
  407. QUOTE.C        signon quotations
  408. SCHED.C        the scheduler
  409. EDIT.C        message editor
  410. XMODEM.C    XMODEM/TELINK protocol handler
  411. MODEMIO.C    (not so) low level I/O
  412. MDMFUNC.C    modem drivers
  413. SUPPORT.C    misc. support routines
  414. PRINTF.C    a real printf()
  415. MS-C.C        DOS dependent C routines
  416. MS-ASM.ASM    DOS dependent ASM routines
  417. ABORT.ASM
  418.  
  419. FIDO2PUP.C    Fido msg converter
  420. SET-PUP.C    config program
  421.  
  422. PUP.SET        sample config file
  423. FILES.PUP    sample files list
  424. WELCOME.PUP    sample welcome file
  425. QUOTES.PUP    sample quotations
  426. MAIN.HLP    sample help files
  427. MESSAGE.HLP
  428. EDIT.HLP
  429. .pa
  430. .he Implementation Notes
  431.  
  432. GENERAL
  433.  
  434. Data structures and other definitions of global importanceì
  435. to Pup are in PUPPY.H, which is included by all .C files inì
  436. Pup. When you change this file, recompile all modules; theì
  437. make file provided will do this with RMAKE.EXE from Phoenixì
  438. Software.
  439.  
  440. Global static data is defined in PUPMAIN.C, and referencesì
  441. to it via #extern's are in PUPMEM.H. All sources exceptì
  442. PUPMAIN.H include PUPMEM.H. It's the easiest way I've foundì
  443. to manage external data; the one time it's a pain is if youì
  444. add or delete a global variable (in PUPMAIN.C); you have toì
  445. recompile everything. Oh well.
  446.  
  447.  
  448. SERIAL INTERFACE
  449.  
  450. The serial I/O driver provided, IBM.LIB, is for pclonesì
  451. only; you will need to write equivelant routines forì
  452. whatever your machine is, even on CP/M. Most are prettyì
  453. simple, and even polled is OK; Pup will even allow typeaheadì
  454. on polled machines, due to the lookeahead done in MODEMIO.C.
  455.  
  456. Note that the drivers as defined in DRIVER.DOC are ratherì
  457. complex; you don't need anything but the low level serialì
  458. parts. (Poke through MODEMIO) Why not prune DRIVER.DOC andì
  459. pass out a proper version?
  460.  
  461. Pup uses a three or four wire modem installation. It needs:
  462.  
  463.     Tx Data        obviously
  464.     Rx Data        obviously
  465.     Ground        obviously
  466.     CD        Carrier Detect (pin 6 or 8)
  467.     DTR        Data Terminal Ready (pin 20)
  468.  
  469. DTR is optional; see below.
  470.  
  471. Pup has a parameter "cd-bit" in PUP.SET; this is the bitì
  472. mask pup uses to check for CD on the serial port. Pup ANDsì
  473. the contents of the status register with the cd-bit, and ifì
  474. the result is not zero, then the modem is assumed to beì
  475. online.
  476.  
  477. CALLER INTERFACE I/O
  478.  
  479. Basically, the I/O system is the same as Fido and has all ofì
  480. it's features: full typeahead, output pause (^S, ^Q),ì
  481. background abort-detect (^C, ^K), typeahead flush (^F),ì
  482. "command-ahead" (ie. "D N FILENAME.EXT X" executes a wholeì
  483. download command skipping all the prompts), formatted I/O,ì
  484. complete carrier loss detection with no programmaticì
  485. overhead, dead-user timer, full time limit enforcement.
  486.  
  487. In theory, you should never have to mess with anything inì
  488. MODEMIO. And be careful if you do, it's filled withì
  489. recursive and effecient stuff, and I think it's pretty wellì
  490. documented. It does a lot just as it stands; it is fourì
  491. years accumulated work and experience.
  492.  
  493.  
  494. MODEM SUPPORT
  495.  
  496. As implemented, Pup will support just about any Hayes typeì
  497. modem. The modem must have a CD (Carrier Detect) line. DTRì
  498. is reccomended, but not required.
  499.  
  500. The initialization specified in PUP.SET should set the modemì
  501. to numeric result codes and autoanswer OFF. Pup answers theì
  502. phone by waiting for a RING result code, then issuing an ATAì
  503. command, and waiting for the CONNECT 1200 (or 2400, etc)ì
  504. message, and then assumes it's online and connected. Noì
  505. hocus pocus or complicated autobaud. 
  506.  
  507.  
  508. LITTLE ENDIAN vs. BIG ENDIAN
  509.  
  510. This is the endless "Intel" vs. "Motorola" argument. Iì
  511. really don't care either way; neither does Pup. The onlyì
  512. part that cares about byte order is the FidoNet interface,ì
  513. and there you have no choice.
  514.  
  515. The only time this might matter is if you were to generate aì
  516. message base on a Z80 and physically copy it to a 6502ì
  517. machine; you'd have to convert byte order. For locally¡
  518. generated data, it's not an issue.
  519.  
  520.  
  521. FUNCTION PORTABILITY
  522.  
  523. I tried to keep things down to two kinds of portabilityì
  524. problems: C language data typing and O/S functionality.
  525.  
  526. On C data types, most things don't care; general purposeì
  527. counters etc are just "int"s, etc. For ones that matter,ì
  528. almost all want to be either 8 or 16 bit data. For these, Iì
  529. defined two types: BYTE and WORD. In the Lattice 2.12/MSDOSì
  530. version, BYTE is defined as char, and WORD as int. Changeì
  531. accordingly to fit your system. These are defined inì
  532. PUPPY.H.
  533.