PEEKs 

--------------------------------------------------------------------------------
 
PEEK(23) Returns 1 if this version of NBASIC is a shareware version, otherwise returns 0 
PEEK(36) Release number of NBASIC 
PEEK(149) AND 1 Result is 1 if this version of NBASIC supports printing, otherwise 0 
PEEK(149) AND 4 Result is 1 if this version of NBASIC supports wildcards, otherwise 0 
PEEK(631) Zone width (Version 1.2 or later) 
PEEK(677) Returns 1 if the NBASIC window is minimized, 8 if maximized and 0 otherwise 
PEEK(706) Returns 1 if a file is attached to screen output, otherwise returns 0 (Version 1.5 or later) 
PEEK(788) Returns 1 if this program is being run as the startup program specified in the startup options dialog, otherwise returns 0 (Version 1.0.1 or later, standard version only) 
PEEK(828) Installed printers (Version 1.5 or later) 
PEEK(872) Printer font size (0-default, 6-24 font size) 
PEEK(875) Print style of line numbers when a program is printed (0-default, 1-right justifed with leading spaces, 2-right justified with leading 0s, 3-left justified with trailing spaces) 
PEEK(919) Returns 32 if the NBASIC window is in full screen mode, otherwise returns 0 (standard version only) 
PEEK(1107) Returns 255 if Num Lock is on, 0 if Num Lock is off 
PEEK(1210) Returns 255 if Scroll Lock is on, 0 if Scroll Lock is off 
PEEK(1967) Returns 0 if key autorepeat is on, 18 if key autorepeat is off 
PEEK(1994) Current foreground color 
PEEK(1995) Current background color 
PEEK(3943) * 256 + PEEK(3944) Current value of the 65535 millisecond timer (high byte of the 16bit millisecond timer) (Version 1.4 or later) 
PEEK(3944) Current value of the 255 millisecond timer (low byte of the 16bit millisecond timer) (Version 1.4 or later) 
PEEK(3998) Returns 255 if inverse mode is on, 0 if inverse mode is off 
PEEK(5025) Returns 1 if a key is in the type-ahead buffer, otherwise returns 0 
PEEK(5776) Returns 255 if Caps Lock is on, 0 if Caps Lock is off 
PEEK(5794) Returns 255 if BREAK key trapping is on, 0 if BREAK key trapping is off 
PEEK(7695) Returns 255 if tracing is on, 0 if tracing is off 
PEEK(9575) * 256 + PEEK(9576) Printer columns (if more than 255) (Version 1.1 or later, standard version only) 
PEEK(9576) Printer columns (Version 1.1 or later, standard version only) 
PEEK(9587) * 256 + PEEK(9588) Printer rows (if more than 255) (Version 1.1 or later, standard version only) 
PEEK(9588) Printer rows (Version 1.1 or later, standard version only) 
PEEK(9591) Last error number 
PEEK(11799) Returns 0 if the PAUSE key is enabled, 128 if the PAUSE key is disabled 
PEEK(14963) Returns 0 if OK was selected in the PRINTER? statement dialog, 255 if Cancel was selected (Version 1.4 or later, standard version only) 
PEEK(19140) Returns 1 if the program was loaded by the system, otherwise returns 0 
PEEK(19408) Returns 1 if a printer is open, otherwise returns 0 (Version 1.1 or later, standard version only) 
PEEK(19920) Returns 255 if automatic line numbering is on, 0 if automatic line numbering is off (standard version only) 
PEEK(21998) Screen rows 
PEEK(21999) Screen columns 
PEEK(22469) Returns 255 if upper case only is enabled, 0 if upper case only is disabled 
PEEK(23792) Returns 255 if confirmations are on, 0 if confirmations are off 
PEEK(27523) Returns 255 if profiling is on, 0 if profiling is off (standard version only) 
PEEK(27616) Default foreground color (0-15) 
PEEK(27617) Default background color (0-15) 
PEEK(29520) Returns 1 if the printer is at the beginning of a page, otherwise returns 0 (Version 1.5 or later, standard version only) 
PEEK(29538) Current character set (0-ANSI, 161-Greek, 162-Turkish, 177-Hebrew, 178-Arabic, 186-Baltic, 204-Russian, 238-East Europe, 255-OEM) (Version 1.2 or later) 
PEEK(29560) Current printer page or pages printed (Version 1.5 or later, standard version only) 
PEEK(31567) Returns 255 if debugging is on, 0 if debugging is off (standard version only) 
PEEK(32148) Graphics foreground (drawing) color (standard version only) 
PEEK(32149) Graphics background color (standard version only) 
PEEK(33307) Number of screens currently backed up (Version 1.4 or later) 
PEEK(38360) Returns 1 if there is data available to be read, otherwise returns 0 
PEEK(39038) Current tab size 
PEEK(41223) Returns 214 if control character sequences are disabled, otherwise returns 0 
PEEK(42510) Returns 4 if a log file is open, otherwise returns 0 (standard version only) 
PEEK(44638) Returns 128 if a printer is available, otherwise returns 0 
PEEK(46090) Returns 214 if escape sequences are disabled, otherwise returns 0 
PEEK(46966) Current printer character set (0-ANSI, 161-Greek, 162-Turkish, 177-Hebrew, 178-Arabic, 186-Baltic, 204-Russian, 238-East Europe, 255-OEM) (Version 1.2 or later, standard version only) 
PEEK(49549) Cross reference option (0-line numbers, 1-labels, 2-variables, 3-user-defined functions, 5-statements, 6-functions) used by EXEC &HD3F8 
PEEK(49565) Returns 1 if the cursor is on, 0 if the cursor is off 
PEEK(51520) Returns 1 if timer event trapping is enabled, 0 if timer event trapping is disabled, or 255 if there is no timer event trapping 
PEEK(54336) Open files 
PEEK(58875) Returns 1 if a log file is open and logging is on, 0 if logging is off, or 255 if there is no log file open (standard version only) 
PEEK(59125) Returns 128 if the screen is locked (LOCK #0), otherwise returns 0 
PEEK(59400) Returns 255 if graphics have been enabled with the GRAPH statement, otherwise returns 0 (standard version only) 
PEEK(61345) Returns 1 if the NBASIC application window has focus, otherwise returns 0 
PEEK(61803) Current font size 
PEEK(65104) Random number from 0 to 255 
PEEK(65260) Current graphics font size (standard version only) 


POKEs 

--------------------------------------------------------------------------------
 
POKE 847,n Sets the style of page numbers when a program is printed (0-no page numbers, 1-p, 2-Page p) 
POKE 872,n Sets the printer font size(0-default, 6-24 font size) 
POKE 875,n Sets the style of line numbers when a program is printed (0-default, 1-right justifed with leading spaces, 2-right justified with leading 0s, 3-left justified with trailing spaces) 
POKE 1032,n:EXIT Performs a cold reboot (3) 
POKE 1032,n:NEW Performs a warm reboot (3) 
POKE 1107,n Turns Num Lock on (255) or off (0) 
POKE 1210,n Turns Scroll Lock on (255) or off (0) 
POKE 1221,n Shows syntax errors when program lines are added or edited (255) or default (0) (standard version only) 
POKE 1966,n Shows the prompt after every command event (34) or default (0) 
POKE 1967,n Turns the key autorepeat on (0) or off (18) 
POKE 1969,n Restores a program erased by the NEW statement (224) (Version 1.3 or later) 
POKE 1993,n Causes a beep in the GETALNUM$, GETALPHA$, GETDIGIT$ and GETYN$ functions if an invalid character is pressed on the keyboard (255) or default (0) (standard version only) 
POKE 1994,n Sets the foreground color (0-15) or resets the foreground color to the default (255) 
POKE 1995,n Sets the background color (0-15) or resets the background color to the default (255) 
POKE 1999,n Clears the type-ahead buffer (117) 
POKE 3800,n Sets the case (64-lowercase, 128-uppercase) used by EXEC &HDA83 (change program case) 
POKE 3998,n Turns inverse mode on (255) or off (0) 
POKE 4879,n Disables all statement compatibility modes (5) (Version 1.4 or later) 
POKE 5776,n Turns Caps Lock on (255) or off (0) 
POKE 5794,n Turns trapping of the BREAK key on (255) or off (0) 
POKE 6023,n Temporarily disables the carriage return on the last row (scrolling) (128) 
POKE 6732,n Performs a warm reboot (4) (Version 1.4 or later) 
POKE 6817,n Causes the LIST statement to pause after each screenful of information (255) or disables pausing (0) 
POKE 7695,n Turns tracing on (255) or off (0) 
POKE 8204,n Scrolls the screen (2) 
POKE 10131,n Clears the screen when a program ends (8) (Version 1.4 or later) 
POKE 10516,n Enables (2) or disables (0) the LOCATE statement compatibility mode (LOCATE column,row) (Version 1.4 or later) 
POKE 11266,n Sets the screen border color (0-15 color, 255-default) 
POKE 11799,n Enables (0) or disables (128) the PAUSE key 
POKE 12393,n Causes the DIR statement to sort the directory list (255) or disables sorting (0) (NOTE: directory lists on Windows® NTFS and HPFS volumes are always sorted) 
POKE 12420,n Enables (15) or disables (0) the CLEAR statement compatibility mode (clears all variables) (Version 1.4 or later) 
POKE 13141,n Causes the DIR statement to pause after each screenful of information (255) or disables pausing (0) 
POKE 15041,n Enables (7) or disables (0) the GET statement compatibility mode (does not wait for a keypress) (Version 1.4 or later) 
POKE 17984,n Enables (0) or disables (2) clearing of the area saved by the SCREEN BACKUP statement (Version 1.4 or later) 
POKE 18450,n Sets the $XREF statement output to uppercase (0) or lowercase (4) (Version 1.4 or later) 
POKE 19096,n Causes the PROFILE statement to pause after each screenful of information (255) or disables pausing (0) (standard version only) 
POKE 19355,n Restores the default prompt (252) (standard version only) 
POKE 19920,n Enables (255) or disables (0) automatic line numbering (standard version only) 
POKE 20604,n Causes a formfeed (12) or a linefeed (13) on an open printer (Version 1.1 or later, standard version only) 
POKE 21493,n Restores the foreground and background colors when a program ends (128) 
POKE 21505,n Causes the KILL statement to us the recycle bin when deleting files (1), or disables using the recycle bin (0) (Version 1.0.1 or later) 
POKE 21568,n Causes the log file to be flushed to disk (1) (Version 1.5 or later) 
POKE 22469,n Enables upper case only (255) or disables upper case only (0) 
POKE 23028,n Causes the VOLUMES statement to pause after each screenful of information (255) or disables pausing (0) 
POKE 23168,n Blinking cursor (0) or non-blinking cursor (224) 
POKE 23792,n Turns confirmations on (255) or off (0) 
POKE 24352,n Clears the recall history (128) 
POKE 26435,n Shows syntax errors if error trapping is enabled (197) or traps syntax errors (0) 
POKE 27217,n Lists the destination line when a line is split (92) or default (0) (standard version only) 
POKE 27523,n Turns profiling on (255) or off (0) (standard version only) 
POKE 29538,n Selects character set (0-ANSI, 161-Greek, 162-Turkish, 177-Hebrew, 178-Arabic, 186-Baltic, 204-Russian, 238-East Europe, 255-OEM) (Version 1.2 or later) 
POKE 30809,n Sets the initial graphics foreground and background colors to the default graphics colors (0) or the current text foreground and background colors (5) (Version 1.4 or later, standard version only) 
POKE 31160,n Sets the initial graphics drawing position to the top left of the screen (0) or the center of the screen (127) (Version 1.4 or later, standard version only) 
POKE 31567,n Turns debugging on (255) or off (0) (standard version only) 
POKE 32148,n Sets the graphics foreground (drawing) color (0-15 color, 255-default) (standard version only) 
POKE 32149,n Sets the graphics background color (0-15 color, 255-default) (standard version only) 
POKE 32783,n Shows (0) or hides (5) the cursor in EXEC &H9305 (press any key to continue) 
POKE 34352,n Initializes the random number generator (5) 
POKE 37960,n Sets the format (0-auto, 1-"REM ", 2-"rem ", 14-"'", 15-"' ") used by the REMARK statement (Version 1.0.1 or later) 
POKE 38140,n Sets the fill color (0-15 color, 255-default) for the BOX, CHORD, CIRCLE, LINE and PIE statements (standard version only) 
POKE 38829,n Restores the default startup colors (4) 
POKE 39072,n Enables (1) or disables (0) renumbering of only numbered lines in the current program (Version 1.5 or later) 
POKE 41223,n Enables (0) or disables (214) control character sequences 
POKE 41307,n Displays the default volume as the prompt (10) or default (0) 
POKE 42302,n Causes the DIR statement to use wide list format (255) or disables wide list format (0) 
POKE 43113,n Causes a carriage return to be printed after the prompt (0) or disables printing a carriage return after the prompt (127) 
POKE 45254,n Enables (20) or disables (0) extended information in the ABOUT statement 
POKE 46090,n Enables (0) or disables (214) escape sequences 
POKE 46966,n Selects printer character set (0-ANSI, 161-Greek, 162-Turkish, 177-Hebrew, 178-Arabic, 186-Baltic, 204-Russian, 238-East Europe, 255-OEM) (Version 1.2 or later, standard version only) 
POKE 47952,n Enables (80) or disables (0) the VOLUMES statement verbose mode 
POKE 49542,n Sets a delay (in milliseconds) between statements during execution (0-255) 
POKE 49549,n Sets the option (0-line numbers, 1-labels, 2-variables, 3-user-defined functions, 5-statements, 6-functions) used by EXEC &HD3F8 (cross reference) 
POKE 49565,n Turns the cursor on (1) or off (0) 
POKE 49956,n Causes the READ statement to read data from the first line in the current program that contains a DATA statement (2) 
POKE 51520,n Enables timer event trapping (1), disables timer event trapping (0), or stops timer event trapping (255) 
POKE 53904,n Causes the DUMP statement to pause after each screenful of information (255) or disables pausing (0) 
POKE 58875,n If a log file is open, turns logging on (1), turns logging off (0), or stops logging and closes the log file (255) (standard version only) 
POKE 59250,n Sets the color (0-15) used by EXEC &H4812 (clear screen) 
POKE 59325,n If multiple screens are restored by the SCREEN RESTORE statement, updates screen after each restore (0) or updates screen only after last restore (255) (Version 1.4 or later) 


EXECs 

--------------------------------------------------------------------------------
 
EXEC &H44D0 Lists available printers 
EXEC &H4812 Clears the screen using the color in memory location 59250 
EXEC &H52BC Displays the startup message if specified (standard version only) 
EXEC &H9305 Displays "Press any key to continue" and waits for a keypress 
EXEC &HD3F8 Cross references the current program using the option in memory location 49549 
EXEC &HDA83 Changes the current program to uppercase if the value in memory location 3800 is 128 or lowercase if the value is 64 
