Generic routines
Programming Features - Generic Routines
The following is a table of generic routines that are present in all overlays unless otherwise specified.
| Line | Function |
|---|---|
| 1 | REM line -- This is the save and replace overlay routine |
| 105 | Print "." to screen (no carriage return), drop to next line |
| 110 | Get input character and put in A$ |
| 155 | Print two carriage returns (C2$) |
| 160 | Print A$ with carriage return |
| 202 | Open file (F$) on SYSTEMS drive |
| 203 | Open file (F$) on default (current) drive |
| 205 | Open and read file (F$) on SYSTEMS drive (not in Network overlays) |
| 210 | Open and read file (F$) on default (current) drive |
| 220 | Read open file (F$) - Will not print PRESS ANY KEY if needed |
| 265 | Read open file (F$) - Will print PRESS ANY KEY if needed |
| 280 | PRESS ANY KEY routine |
| 300 | Plain ASCII string input to I$, no prompt |
| 302 | Uppercase only string input to I$, with prompt |
| 303 | Plain ASCII string input to I$, with prompt |
| 305 | Commodore graphics allowed string input to I$, with prompt |
| 310 | Commodore graphics allowed string input to I$, no prompt |
| 360 | Timeout/Carrier/Abort/Time Limit Exceeded routine |
| 390 | Removes leading and trailing spaces from I$ |
| 460 | Select files group. See "File Group Numbers" |
| 480 | Select Password File drive (not in all overlays) |
| 481 | Select System Files drive (not in all overlays) |
| 482 | Select Help Files drive (not in all overlays) |
| 483 | Select default download directory (not in all overlays) |
| 484 | Select default upload directory (not in all overlays) |
| 485 | Select Public Messages drive (not in all overlays) |
| 486 | Select Private Messages drive (not in all overlays) |
| 487 | Select Text Files drive (not in all overlays) |
| 488 | Select Caller Log drive (not in all overlays) |
| 489 | Select Program Files drive |
| 490 | Select group 10, used for misc. drive group (not in all overlays) |
| 505 | Read error channel and close logical file 8 |
| 510 | Read error channel into ER, ER$, ES, ET |
| 605 | Get line of input and convert to numeric (not in all overlays) |
| 610 | Convert I$ to numeric |
| 995 | Clear keyboard input buffer |
| 1005 | Ask ARE YOU SURE and get "Y" or "N" response |
| 1010 | Print box prompt and wait for "Y" or "N" response |
| 1020 | Wait for "Y" or "N" response from user |
| 1110 | Get current time in T$ |
| 1530 | Clear the array A$ from elements 0 to A-1 |
| 8003 | Put contents of I$ into caller log |
| 8004 | Put contents of A$ into caller log |
| 8010 | Clear contents of LG$ by dumping it to caller log buffer |
| 9991 | Crash routine / force shutdown |
| 9999 | Part of crash routine. Close files, then OV=5 and goto √bbs.init |
| 13600 | Print "Online" information about current user |
| 13630 | Time Limit Exceeded message |
| 13640 | Print box prompt if using Commodore or ANSI graphics |
| 13652 | Disconnect current user |
| 13680 | Reset screen if background not black or if in uppercase mode |
| 13695 | Wait for a response from modem for 2 seconds |
| 15915 | Print B$ init string to modem, and wait 3 seconds for OK response |
File Group Numbers
When you use the GOSUB460 routine to select a file group, the variable H must first be set to the group number. The table below provides the list of all the groups and their respective assignments:
| Group ID | Group Name |
|---|---|
| 0 | Password File |
| 1 | System Files |
| 2 | Help Files |
| 3 | Default Download Directory |
| 4 | Default Upload Directory |
| 5 | Public Messages |
| 6 | Private Messages |
| 7 | Text Files |
| 8 | Caller Log |
| 9 | Program Files |
| 10 | Used for temporary storage of drive information |
| 11 | Network files |
| 12 | Auxiliary 1 area (8.10a - User Profile) |
| 13 | Auxiliary 2 area |
| 14 | Auxiliary 3 area (8.10a - Games) |
| 15 | Unused |
Next Section: Command Branch Tables