GAP ANSICMDS Tutor For GAP v4.3 and Later Prepared by: Herb Mellinger The Silicon Lab BBS (813)-869-3700 HST/DUAL GAP: Registered Trademark of GAP Development Company page 1 Author's Comments This text is provided free and entered into the Public Domain. All Legal disclaimers regarding use of, fitness, suitability, etc. are hereby imposed by and for the sake of the author, his heirs and assigns. I would like to express my appreciation to Kenny Gardener our programming Guru and GAP Development Company for the Finest World Class Software available today. No part of this text may be altered in any way. However, other authors are encouraged to add as addendums to this text further notes, comments, solutions that they may have to enhance the original idea. Copyright January 1990 page 2 Foreward After many hours trying to use GAP's ANSICMDS and seeing numerous messages similar to my experiences I decided to overcome my own inabilities and maybe help others with a clearer and easy to understand explanation. I only hope that it is as clear to the reader as it is to the writer. Trying to make animated screens for my own BBS and using the ANSICMDS caused the screens to really go bonkers at times. Kenny gave us the clue we needed, but few see. We have to use a GOOD hex editor and look at what is happening, especially when using excellent programs such as TheDraw by Ian Davis. So what follows is to the best of my ability my explanation of the preperation and execution of ANSICMDS. The hex editors I have used are Norton's and PCTools. Both work quite well and are easy to use. page 3 Preparation: 1. Create your screen (Menu) in normal ANSI using TheDraw or a similar program, and after you have it where you feel comfortable with the design, then toggle TheDraw to the Animated Mode. Limit the screen to 21 lines maximum with the cursor in the lower right corner. 2. Select the Top to Bottom Mode as it works the cleanest for most menus to begin with. You can get more sophisticated later. 3. Move your cursor to the first spot where you wish to enter a Replacable Parameter Command (RPC). Move the cursor the number of spaces to the right from the colon or statement that you think will look good to the viewer. Usually one or two spaces will be correct. 4. Enter the ALT-255 parameter followed by the RPC using ALT-Number.... Always enter in CAPS... 5. Use the attached Table or the GAP Text File Control Commands card for your selection of commands.(RPC) 6. Continue entering the ALT-255 parameter followed by the RPC to each of the items you have selected and shown in your Normal ANSI screen or Menu. Remember to limit the screen you are designing to 21 lines maximum. 7. Once you have finished entering the RPC's move your cursor to the lower right corner of your screen and save in the Animated Mode. Save the drawing with the longest line length as is allowed by TheDraw. Usually 255 or more is acceptable. If you don't use the long line length you will get a bunch of "Press any Key to Continue" prompts in the middle of the screen when GAP displays them. 8. Remember.... Kenny gave us this clue, the animation sequence is stored at the VERY end of the file created by TheDraw. page 4 Execution: This is the hard part, but worth the effort. Using the Norton or PCTools hex editor put the editor in Hex/ASCII Mode. The ASCII characters are found on the right hand side of the editor screen. Read the ASCII characters and follow them with the cursor. Read to the first RPC and place the cursor over the blank space before the RPC. Toggle the editor to hex Mode and view the characters in the hex table. Compare them to the attached hex Table. If the characters do not agree, enter the correct characters from the hex Table. For example, when I use TheDraw and enter ALT-255, The Draw enters 20 to represent the blank space 255 ASCII entry. I then make sure the CAPS are toggled on and enter the proper hex for ASCII 255, which is FF. This shows up as a . in the ASCII Table on the right. Now if you had entered ALT-255 for the space and ALT-46 for RPC F (First Name) you would see 2046 prior to the change and would see FF46 after the change in the hex table. I have found that TheDraw usually enters the Alpha characters correctly. When GAP sees FF46 after saving it will display the users First Name. Remember, I said that you might get a situation where the screen goes bonkers and the Command Prompt ends up in the middle of the screen or other strange things happen like scrolling, etc. Well again, at the end of the file are the codes which seem to control this as well as the RPC. These codes appear to be the actual position of the cursor on the ANSI screen. What needs to be done is to change these codes that control the cursor to place it on the screen at the bottom of the ANSI screen. The sequence of codes in the ANSI version we are looking for at the end of the file in the hex area should resemble this string. 1B 5B 32 32 3B 31 48 This is approximately it.. page 5 We interpret this as meaning that the cursor is placed at Line 22, Column 1. _________________________________________________ 1B = Escape Code 5B = Escape code 32 = The 1st number 2 in 22 32 = The 2nd number 2 in 22 3B = The ; (Semi colon) is used to seperate the number 22 from number 1 of the row number. 31 = The number 1 for the row 48 = The hex for the letter H... ________________________________________________ 31 = 1 32 = 2 33 = 3 These numbers correspond to each individual 34 = 4 number that makes up the hex codes for rows 35 = 5 and columns. 36 = 6 37 = 7 For Example: 38 = 8 3232 = 32 39 = 9 3239 = 29 3139 = 19 The remaining positions at the end of the line which are left can be padded 0D0D for carriage returns. If there is a 0A it is for the extra line feed that you don't need. page 6 Following are GAP's list of RPC codes and their hex equivilent.... User Information: _________________ ALT255 ALT HEX RPC Displayed (Always Upper Case) ____________________________________________________ always F 46 Users First Name first L 4C Users Last Name U 55 Total Uploads for User D 44 Total Downloads for User X 58 Total UL Bytes for User Y 59 Total DL Bytes for User V 56 # of Files Avail. this session W 57 # of Bytes Avail. this session T 54 # of Times User has been on O 4F Total # of Doors Opened by User B 42 Total # of Bulletins read by User S 53 Users Security Level C 43 Users City H 48 Users Home Phone # P 50 Users Business/Data Phone # M 4D Users Subscription Date G 47 Users Birth Date I 49 Users Last New File Scan J 4A Total Messages Read by User K 4B Total Messages Left by User System Information: ___________________ ALT HEX Prompt Override Commands __________________________________________________ ALT064 = @ 40 Use "press any key to continue" instead of the "more" prompt ALT123 = { 7B Supress "more" prompt from inter- rupting display. Used for long ANSI screens. Note: The override character MUST be the First character in the file......... page 7 I hope these comments are clear enough and will assist those GAP system operators who are new to this method of generating ANSI screens. Similar screens may be generated in ASCII providing that the RPC's are NOT encased by any Graphic borders. Good Luck and Enjoy !!!!! TheDraw: Copyright: Ian Davis TheSoft Programming Services Nortons Utilitys: Copyright: Peter Norton Computing, Inc. PCTools: Copyright: Central Point Software