Shift838 Posted July 6, 2013 Share Posted July 6, 2013 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 Quote Link to comment https://forums.atariage.com/topic/214199-message-base-coding-help/ Share on other sites More sharing options...
Opry99er Posted July 6, 2013 Share Posted July 6, 2013 Hey Chris... You're coding this message base in XB, am I correct? Quote Link to comment https://forums.atariage.com/topic/214199-message-base-coding-help/#findComment-2787304 Share on other sites More sharing options...
Shift838 Posted July 6, 2013 Author Share Posted July 6, 2013 Yes, XB. Quote Link to comment https://forums.atariage.com/topic/214199-message-base-coding-help/#findComment-2787308 Share on other sites More sharing options...
Opry99er Posted July 6, 2013 Share Posted July 6, 2013 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? Quote Link to comment https://forums.atariage.com/topic/214199-message-base-coding-help/#findComment-2787337 Share on other sites More sharing options...
Shift838 Posted July 6, 2013 Author Share Posted July 6, 2013 I am thinking we store the messagy boddy by line in an array, then write it to.a file along with subject, posted by, message number and date. Quote Link to comment https://forums.atariage.com/topic/214199-message-base-coding-help/#findComment-2787381 Share on other sites More sharing options...
Opry99er Posted July 6, 2013 Share Posted July 6, 2013 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? Quote Link to comment https://forums.atariage.com/topic/214199-message-base-coding-help/#findComment-2787389 Share on other sites More sharing options...
Shift838 Posted July 6, 2013 Author Share Posted July 6, 2013 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. Quote Link to comment https://forums.atariage.com/topic/214199-message-base-coding-help/#findComment-2787412 Share on other sites More sharing options...
+Lee Stewart Posted July 6, 2013 Share Posted July 6, 2013 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 Quote Link to comment https://forums.atariage.com/topic/214199-message-base-coding-help/#findComment-2787524 Share on other sites More sharing options...
+Lee Stewart Posted July 6, 2013 Share Posted July 6, 2013 What's the max length of a string variable in XB? 255 ...lee Quote Link to comment https://forums.atariage.com/topic/214199-message-base-coding-help/#findComment-2787525 Share on other sites More sharing options...
Shift838 Posted July 6, 2013 Author Share Posted July 6, 2013 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? Quote Link to comment https://forums.atariage.com/topic/214199-message-base-coding-help/#findComment-2787597 Share on other sites More sharing options...
+Lee Stewart Posted July 6, 2013 Share Posted July 6, 2013 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 Quote Link to comment https://forums.atariage.com/topic/214199-message-base-coding-help/#findComment-2787609 Share on other sites More sharing options...
+InsaneMultitasker Posted July 6, 2013 Share Posted July 6, 2013 Your choice of file type(s) and structure will play a part in determining which, if any, of the built-in file IO assembly routines you can use to read and display the files. Quote Link to comment https://forums.atariage.com/topic/214199-message-base-coding-help/#findComment-2787624 Share on other sites More sharing options...
Tursi Posted July 7, 2013 Share Posted July 7, 2013 Msg titleAuthor 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 ). Quote Link to comment https://forums.atariage.com/topic/214199-message-base-coding-help/#findComment-2788157 Share on other sites More sharing options...
Recommended Posts
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.