Jump to content

Recommended Posts

I am currently coding a new BBS based on S&T machine code.

 

I need some helpmon my final areas, as i have mever coded this type of functIons before.

 

I need help with:

 

Meassage base for posting, reading,etc

New message scan usinf pointers

Bbs email

 

Any help would be appreciated and of course get a co-author title for the program.

 

I have no code for these areas yet, so will be starting from scratch.

 

Thanks

 

Chris

Link to comment
https://forums.atariage.com/topic/214199-message-base-coding-help/
Share on other sites

Yep... String variable array containing a string variable for each line of text, then the other data bits you mentioned... What's the max length of a string variable in XB?

 

It might not even matter, as you would probably want the length of the string to coincide with the width of your screen parameters... Are you planning to use 32? 28?

Since i will be supporting both 40 and 80 column, the max per line will be betwenn 75-80 characters max. I am thinking 28 lines max, regardless of line lenth.

 

I already have a test program that stores the whole body in a string array.

 

Now i need to figure out the best file type to store:

 

Msg title

Author

Date posted

Msg #

Msg body

 

With 80 chars at 28 lines its over 2200 characters, then of course, title, msg #, date, author will add to it more.

 

 

Im a bit rusty... Can we have two open sources (i.e. rs232 AND DSK1) at the same time, or do we need to store inputs from rs232 in a RAM buffer and then open the storage device (DSK1 or HDX or HRD) to save there?

 

The start-up default allows you 3 files open simultaneously in any mode. That can be changed on the command line with "CALL FILES(<#files>)" followed immediately by "NEW". In XB, I believe the max is 9. I don't think RS232 is part of the file limitation, so you should be able to manage I/O pretty much any way you wish.

 

...lee

so what type of file can store characters like that, i know it would be a variable file.

 

I'm wondering if there is a way to use a variable 254 file and still be able to store that much data?

 

The problem with variable-length records is that you lose 1 byte/sector (record count for that sector?) plus 1 byte/record (character count for that record), so you can never store the maximum-length string that way and you will always lose at least 2 bytes/sector, even with fixed-length records.

 

Another way to handle messages might be to use a fixed-128 file and use your own scheme to manage I/O access. You could store lines as strings, each with a leading count byte. You could manage messages by starting each message with a message header that contains relevant information about the message. You might create a message index file that consists of message numbers followed by the record # and byte offset into that record for the beginning of that particular message. I'm sure you can dream up other scenarios.

 

...lee

Msg title

Author

Date posted

Msg #

Msg body

 

One thing that was very much appreciated on my BBS by the users was a "reply to #" line, and the ability to 'thread' back and read the original message. In my case I just made it the first line of the message body (if people really wanted to type "Reply to #xxx" they could ;) ).

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...