ABS(exp) Returns absolute value of exp. ADDRESS of BJ Gleason The American University CSIS (Thin Air Labs) 4400 Massachusetts Avenue, N.W. Washington, DC 20016 Compuserve : 73337,2011 ALARM Beep speaker, Wait for keypress. PORT ONLY ALTR.COM TSR to invoke P.EXE from editor to Execute ASC(x$) Returns ASCII value of the first character in x$. ATN(exp) Returns Arc Tangent of exp. BEEP Single beep from the speaker. PORT ONLY BIN$(n) Converts n to a binary string. BLOAD filename, offset Load Binary file to SEG:offset. BOX row1, col1, row2, col2, type Draw a box. Row1 and Col1 specify the upper left corner position of the box, Row2 and Col2 specify the lower right. Type 0 for single line, 1 for a double PORT ONLY BSAVE filename, offset, length Save binary image of length bytes at SEG:offset to filename. CALL address Transfer control to SEG:address. CALL INTERRUPT intnum Invoke interrupt intnum. CHAIN filename Load and execute filename.BAS. All variables are preserved. CHDIR pathname Change directory to pathname. CHR$(n) Returns ASCII char of the value n. CLICK Make the key click sound. PORT ONLY CLS Clears the screen. COMMAND$ Return the command line that started PBASIC. COS(exp) Returns Cosine of exp. CSRLIN Returns current cursor line. DATA list of numbers/strings MUST have a line number. Elements separted by commas Strings must be enclosed in quotes. 12 DATA 1,2,3,4,5,6 DATE$ Returns system date. DECR(n) Decrement n by 1. DEF SEG = exp Assigns a segment address for memory accessing via PEEK, POKE and CALL. DIAL string Dial the "number" through the speaker. Valid tones are: 0 1 2 3 4 5 6 7 8 9 A B C D * #. PORT ONLY DIM var(size,[size]){,var(size)} Dimension Float or String Arrays DISPLAY exp 0=Static, 1=Normal, 2=Tracked PORT ONLY EDITOR Name PBASIC.EXE P.EXE Returns to Editor on Error END ERL Returns the linenumber of the last error. ERR Returns the error number of the last error. ERROR errnum Simulate Error. ERRORLEVEL Code generated upon exit. 0 - Successful exit 1 - Program aborted 2 - STOP encountered ERRWIN row, col, "message" Display message at row, col. Beep and wait for keypress. PORT ONLY EVAL x$ Evaluate x$ as part of a PBASIC program. x$ MUST be a string variable. EXP(exp) Returns e to the power of exp. FALSE Returns 0. FIX(exp) Returns integer portion of exp. FORMFEED Send a formfeed to the printer. NOT GWBASIC. FOR var = exp TO exp [STEP exp] You can not use an array element for var. FRE(exp) Returns free amount of memory. Parameter exp is a dummy expression. GETDISPLAY Returns the current display mode. See DISPLAY for details. PORT ONLY GOSUB line number GOTO line number HEX$(n) Converts n to a hexidecmial string. IF exp THEN stmt [ ELSE stmt ] INCR(n) Increment n by 1. INKEY$ If a key is pressed, char is returned, otherwise, the empty string (""). INPUT ["prompt" (,|;)] varname [,] no ?, [;] ? is printed INP(port) Returns byte value from port. INSTR(x$,y$) Returns position of y$ in x$. INT(exp) Returns integer portion of exp. KILL filename Delete filename from disk. LCASE$ x$ Returns the lower case version of x$. LEFT$(x$,n) Returns leftmost n characters of x$. LEN(x$) Returns the length of x$. LOCATE row,col Move the cursor to row, col. 1,1 is top left. LOG(exp) Returns LOG of exp. LPOS(exp) Returns position of line printer head. Exp is a dummy expression. LPRINT list of expressions Send output to printer. See PRINT. MID$(x$,n,m) Returns string from x$, starting at position n for m characters. MKDIR pathname Make a directory called pathname. NEXT [var] OCT$(n) Converts n to an Octal string. OFF Tunr off until keypress. PORT ONLY ON ERROR GOTO line number Transfer to line number on error. ON ERROR GOTO 0 Disable error trapping. ON exp GOSUB list of line numbers ON exp GOTO list of line numbers OUT port, exp Send value to the indicated port. PBASIC filename.ext [-T] Use filename.ext Default .ext is .BAS -T turns on Line Trace PBASIC [-T] Use last file you were editing -T turns on Line Trace PBVER Returns the version number of PBASIC. PEEK(address) Returns byte from SEG:address. SEG is set via DEF SEG. PGLOAD filename Load a .PGC file into screen memory. PGSAVE filename Save screen memory as a .PGC file. PGSHOW filename, delay Load and Display a .PGC file. Delay is seconds, 0 is a keypress. PI Returns 3.14159. POINT(row,col) Returns value of pixel at row,col. POKE addr, exp Places value at SEG:addr. SEG is set via the DEF SEG statement. If you are doing Video Memory, use REFRESH. PORT Returns a 1 if running on a Portfolio, 0 if not. Portfolio BASIC, version 3.1 (c) 1990 BJ Gleason by BJ Gleason, American University POS(exp) Returns the current cursor column. Exp is a dummy expression. PRINTER All PRINT to the printer Will not wrap the output lines NOT GWBASIC. PRINT list of expressions [,] to tab, [;] or [ ] PRTSC Send copy to screen to printer NOT GWBASIC. PSET (row, col) [, exp] Set the pixel at row, col to exp. Port has mximum of 64x240 Exp can be 0 (off) or 1 (on). RANDOMIZE Initialize the random number generator. RAND(exp) Return a number between 0 and exp-1. NOT GWBASIC. READ list of variables Read the values of the variables from DATA statements. REFRESH Copy video memory to the LCD controller PORT ONLY REGS rn, value Sets rn to value. rn: 0=Flags, 1=AX, 2=BX, 3=CX, 4=DX, 5=SI, 6=DI, 7=BP, 8=DS, 9=ES REG(rn) Returns rn value. rn: 0=Flags, 1=AX, 2=BX, 3=CX, 4=DX, 5=SI, 6=DI, 7=BP, 8=DS, 9=ES REM Remark. The rest of line is ignored. You can also use the quote (') mark RESTORE [line number] Sets data pointer to the specified line number. If no line number is given, point to first data location. RESUME line number Resume at line number after an error. RETURN RIGHT$(x$,n) Returns rightmost n characters from x$. RMDIR pathname Remove an empty directory from disk. RND Return an number between 0 and 1. ROMVER Return the version number of the ROM. PORT ONLY RUN filename Load and execute filename.BAS. All variables are lost. SCREEN exp 4 graphics 320x200 5 graphics 320x200 6 graphics 640x200 7 text 80x25 8 graphics 160x200 10 graphics 640x200 SGN(exp) Returns the sign of exp. -1 exp < 0 0 exp = 0 1 exp > 0 SIN(exp) Returns Sine of exp. SOUND code, duration Duration is length of tone in 10 msec. PORT ONLY CODE NOTE Frequency (Hz) 48 D#5 622.3 49 E5 659.3 50 F5 698.5 51 F#5 740.0 52 G5 784.0 53 G#5 830.6 54 A5 880.0 55 A#5 932.3 56 B5 987.8 57 C6 1046.5 58 C#6 1108.7 41 D6 1174.7 59 D#6 1244.5 60 E6 1318.5 61 F6 1396.9 14 F#6 1480.0 62 G6 1568.0 44 G#6 1661.2 63 A6 1760.0 4 A#6 1864.7 5 B6 1975.5 37 C7 2093.0 47 C#7 2217.5 6 D7 2349.3 7 D#7 2489.0 SPACE$(n) Returns a string of n spaces. SQR(exp) Returns Square Root of exp. STATUS exp Enable or disable the Status line. 0 for off, 1 for on. PORT ONLY STOP Terminate and Display Line number. Point editor to location. STRING$(n,m) Returns a string composed of n chars. The ASCII value of the character is m. STR$(n) Returns string representation of n. SWAP varname, varname Exchange contents of the two vars. SYSTEM Terminate the program. TAN(exp) Returns Tangent of exp. TICK exp Sets the Clock tick speed. 0 is Normal, 1 tick every 128 seconds. 1 is Fast, 1 tick every second. PORT ONLY TIMER Returns number of seconds since midnight. TIME$ Returns the system time. TROFF Disable line tracing. TRON Enable line tracing. TRUE Returns 1. UCASE$(x) Returns the Uppercase version of x$ VAL(x$) Returns the numeric value of x$. VARPTR(x) Returns the location of variable x. VARSEG(x) Returns the segment of variable x. VCSRLIN Returns the current virtual cursor line. PORT ONLY VLOCATE row,col Move the virtual cursor to row, col. This location is position 1,1 on the physical screen. PORT ONLY VMOVE dir, dis Move screen in direction dir, dis number of characters. Works only in Static and Tracked modes. 1=Up,2=Down,3=Left,4=Right. PORT ONLY VPOS(exp) Returns current virtual cursor column. Exp is a dummy expression. PORT ONLY WAIT Wait for a keypress. NOT GWBASIC