brownc@utah-cs.UUCP (Eric C. Brown) (09/08/85)
*** READ THIS BEFORE FLAMING *** This is posted for a friend of mine who has an ST and the developer's package; I have neither and am doing this as a public (dis)service. *** Begin Forwarded Message *** I am sending a portion of the Hitchhikers Guide to the Bios. This is a confidential document that Atari has sent to all of the developers. However since most of the teminal escape functions have alread been figured out this will clear up any problems. Also I see no reason for this to be confidential. These are the escape functions interpreted by the BIOS' conout() function. For the most part they emulate a VT-52 terminal [that's the easy one to do]. There are extensions to hack screen colors, control screen wrap, and a few other simple functions. ESC A Cursor Up This sequence moves the cursor up one line. If the cursor is already on the top line of the screen, this sequence has no effect. ESC B Cursor Down This moves the cursor down one line. If the cursor is already on the last line of the screen, this escape sequence has no effect. ESC C Cursor Forward This moves the cursor one position to the right. If this function would move the cursor off the screen, this sequence has no effect. ESC D Cursor Backward This move the cursor one position to the left. This is a non- destructive move because the character over which the cursor now rests is not replaced by a blank. If the cursor is already in column O, this escape sequence has no effect. ESC E Clear Screen (and Home Cursor) This moves the cursor to column O, row I (the top left-hand corner of the screen), and clears all charac- ters from the screen. ESC H Home Cursor This move the cursor to column O, row O. The screen is NOT cleared. ESC I Reverse Index Moves the cursor to the same horizontal position on the preceding lines. If the cursor is on the top line, a scroll down is performed. ESC J Erase to End of Page Erases all the information from cursor (including cur- sor position) to the end of the page. ESC K Clear to End of Line This sequence clears the line from the current cursor position to the end of the line. ESC L Insert Line Inserts a new blank line by moving the line that cursor is on, end all following lines, down one line. Then, the cursor is moved to the beginning of the new blank line. ESC M Delete Line Deletes the contents of the line that the cursor is on, places the cursor at the beginning of the line, moves all the following lines up one line, and adds a blank line at the bottom. ESC Y Position Cursor The two characters that follow the "Y" specify the row and column to which the cursor is to be moved. The first character specifies the row, the second specifies the colum. Rows and columns number from 1 up. ESC b Set Foreground Color The Foreground Color is the color in which the charac- ter is displayed. Escape-b must be followed by a color selection charac- ter. Only the four least significant bits of the color character are used: Bit Pattern of Control Byte: 7 6 5 4 3 2 1 0 +-----+-----+-----+-----+-----+-----+-----+-----+ | | | | | | | X | X | X | X | color index | | | | | | | +-----+-----+-----+-----+-----+-----+-----+-----+ (X = "don't care") ESC c Set Background Color This function selects Background Color, the color of the cell that contains the characters. Escape-c must be followed by a color selection charac- ter. Only the four least significant bits of the color character are used. (See diagram for ESC-b function) ESC d Erase Beginning of Display This sequence erases from beginning of the display to the cursor position. The cursor position is erased also. ESC e Enable Cursor This sequence causes the cursor to be invisible. The cursor may still be moved about on the display, using escape sequence defined in this appendix. ESC f Disable Cursor This sequence causes the cursor to be invisible. The cursor may still be moved about on the display, using escape sequences defined in this appendix. ESC j Save Cursor Position This sequence preserves the current cursor position. You can restore the cursor to the previously saved position with ESC-k. ESC k Restore Cursor Position This sequence restores the cursor to a previously saved position. If you use this sequence without having pre- viously saved the cursor position, then the cursor is moved to the home position, the top left-hand corner of the screen. ESC l Erase Entire Line This sequence erases an entire line and moves the cur- sor to the leftmost column. ESC o Erase Beginning of Line Erases from the beginning of the line to the cursor and includes the cursor position. ESC p Enter Reverse Video Mode Enters the reverse video mode so that characters are displayed as background color characters on a fore- ground colored cell. ESC q Exit Reverse Video Mode Exits the reverse video mode. ESC v Wrap at End of Line This sequence causes the first character past the last displayable position on a line to be automatically placed in the first character position on the next line. The page scrolls up if necessary. ESC w Discard at End of Line Following invocation of this sequence, after the last displayable character on a line has been reached, the characters overprint. Therefore, only the last charac- ter received is displayed in the last column position. I realy recommend that anyone interested in working on the ST become a registered developer. The software developers package costs $300. It includes 8 diskettes: TOS, Logo, Resource editor, C compiler & assembler, linker, Mince, Micro Emacs, and a utilities disk. You also get over 2000 pages of documentation. There is also a number you can call and get information (It really works too). TOS and Logo are same ones that come when you by the system. The resource editor disk has a couple of sample resources. There seems to be several problems with the resource editor. The main one, is it displays things differently than a program does. Alerts in the editor do not look anything line they do in a progam. This is not really a problem since alerts are really a "black box". The major problem is with menus and dialogs. Both of them are squished vertically. You need to resize every object so that it looks right. This is something of a pain since you have to leave the resource editor and execute your application to see if they look right. The Compiler disk containes the 3 Pass Digital Research Compliler and their Assembler. The compiler puts out assembler code so it really takes 4 passed to complile a program. The documentation for the compiler is the standard CP/M-68K documentation. This can cause some really problems since the ST is not really running CP/M-68K but GEM-DOS. However the major problem is with the libraries. All of the routines in the libraries appear to be there, but they do not all seem to work. sprintf is there, but when you link it in you get several undefined symbols from the linker. The program still works though. I have not tried printf or fprintf. Open, close, read, write, malloc, and free are there but they do not seem to work at all. However Atari provided a include file "osbind.h" that provides macros called Fopen, Fclose, Fread, Malloc, and Mfree that do work but have a slightly different set of parameters. There are 10 .h files included on the complier disk. You almost have to read each one to figure out which ones you need to include. Another problem, if you only have a single disk drive system. You run out of room on your compiler disk if your file is larger than about 15K. The linker disk has five separate libraries that you need to include for most application. Using the linker is a lot easier than using the compiler. The utilities disk contains: command.prg the command line interpeter dump.prg a hex dumper find.prg similar the the MSDOS find high.prg puts the ST into medium res low.prg puts the ST into low res kermit.prg A poor but usable version of kermit nm68.prg A symbol table dumper sid.prg A debuger size68.prg A segment size utility There is a way to make the ST come up into the command line mode on boot. You create a folder called "auto" on your boot disk. Then the ST will execute any program with a .prg extenction that is in that folder. (I have not tried this.) Rumors: The roms will not be available until December. Hard disks from Atari will not be available until december. A 512K internal expansion board for $300 will be available from a third party vendor in the next few months. Atari is going to try and get royalties from Commodor for each Amiga that they sell. Requests: Has anyone written a program that will allow transfer of binary files for the ST over the net? *** End Forwarded Message ***