Useful POKE, PUT and OPEN Statements

POKE51,1 Switches Screen OFF (VF Display Still available)
POKE51,0 Switches Screen ON (if switched off)

PUT#8,12 Form Feed for Printer
PUT#8,27,30 An Escape Sequence for Printer
PUT12 MOVE CURSOR TO HOME
PUT22,12 Cursor Position
PUT23,25 High Resolution Screen
PUT23,67 Background colour screen changes from Black to white(Green on Emulator)
PUT23,68 Background colour screen changes from White(Green on Emulator) to Black
PUT31 Clear Screen
PUT48 TO PUT57 PRINTS 0 TO 9 ON Screen
PUT65 TO PUT90 PRINTS A TO Z ON Screen

OPEN#0,0,”L40″ 80 CHRS Screen
OPEN#8,8,”2400″ LIST#8 Listing to 2400 Baud Printer
OPEN#15,8 LIST#15 Output Basic Program listing to file for Emulator
OPEN#0,0 Screen Display only
OPEN#0,3 Line Display only
OPEN#0,4 Display Screen and Line Display

Other useful BASIC Statements

INPUT (“Text”);N$

PRINT TOP – Prints the Top of the RAM available to Basic Programs

PRINT FREE – Prints the available memory to screen (30376 Bytes for Unexpanded NewBrain)

10 Y=1:RANDOMIZE:LET Z=RNDY6+1:PRINT Z
20 GOTO 10

Graphics on Keyboard

Sign Wave – Right CTRL /
UK Pound Sign – Shift * (on Key Pad)
Arrow down at 45 Degree – Right CTRL –
Switch from Graphics mode back to Text mode – CTRL(left) W THEN f

Screen to read letters “Digitized by colin appleby”

5 PUT 27,68,73,71,73,84,73,90,69,68,32,66,89,32
10 PUT 27,67,79,76,73,78,32,65,80,80,76,69,66,89:END

Print Screen Character Set

FOR I=1 TO 255:PUT27,I:NEXTI

Leave a Reply