! ( value addr -- ) Store a value into memory at the given address. $REPEAT ( s n -- s ) Repeat string s n times +! ( n addr -- ) Adds a number to the contents of the address . ( n -- ) Display n .S ( -- ) Copy and display the values currently on the data stac .TASKS ( -- ) List the words in the dictionary 0<> ( n -- flag ) True if top number is not zero 0= ( n -- flag ) True if top number zero 1+ ( n -- n+1 ) Increments top of stack by 1 1- ( n -- n-1 ) Decrements top of stack by 1 2+ ( n -- n+2 ) Increments top of stack by 2 2- ( n -- n-2 ) Decrements top of stack by 2 2>R ( x1 x2 -- ) ( R: -- x1 x2 ) Move two items to return stack 2DROP ( x1 x2 -- ) 2DUP ( x1 x2 -- x1 x2 x1 x2 ) 2OVER ( x1 x2 x3 x4 -- x1 x2 x3 x4 x1 x2 ) 2R> ( -- x1 x2 ) ( r: x1 x2 -- ) Retrieve two items from return stack 2R@ ( -- x1 x2 ) ( r: x1 x2 -- x1 x2 ) Copy two items from return stack to data stack 2SWAP ( x1 x2 x3 x4 -- x3 x4 x1 x2 ) :: ( list x -- list' ) Add an element to the front of a list < ( n1 n2 -- flag ) True if second word less than top word <0 ( n -- flag ) True if top number less than zero <= ( n1 n2 -- flag ) True if second word less than or equal to top word <> ( n1 n2 -- flag ) True if top two words are not equal = ( n1 n2 -- flag ) True if top two words equal > ( n1 n2 -- flag ) True if second word greater than top word >0 ( n -- flag ) True if top number greater than zero >= ( n1 n2 -- flag ) True if second word greater than or equal to >NUMBER ( s -- n ) Convert string s to number n >R ( x -- ) ( R: -- x ) Move top item to return stack for temporary storage ? ( addr -- ) Prints the contents of the address, followed by one space ?DUP ( x -- 0 | x x ) Duplicate top of stack if not zero ?JMP ( cond addr -- ) Jump if zero @ ( addr -- value ) Fetch a value from memory at the given address. ABORT ( i * x -- ) ( R: j * x -- ) Empty the data stack and the return stack ABS ( n -- abs(n) Absolute value ) ALLOCATE-CELL ( -- addr ) Allocate a cell from memory and return its address. AND ( n1 n2 -- flag ) Logical AND BEGIN (immediate) ( -- ) Begin a loop Store the current position in the return stack BETWEEN ( n low high -- flag ) BL ( -- char ) Character value for a space CALC-SURPRISE ( -- ) calculate next surprise time CALC-TAICHI ( -- ) Calculate next taichi time CASE (immediate) ( -- ) Begin a case statement CLEAR-INFO ( -- ) Clear all information CONSTANT (immediate) ( x "name" -- ) Define a constant with the given name and value COUNT ( list/str -- n ) Get the length of a list or a string CR ( -- ) Display CR CRONTAB ( -- ) Crontab DAYTIME ( -- ) (UTC) Display the current time DEFINED? (immediate) ( "name" -- flag ) Check if a word is defined in the dictionary DEPTH ( -- count ) Count number of items on stack DROP ( n -- ) Discard top of stack DUP ( n -- n n ) Duplicate top of stack EAIQ>INFO ( n -- n ) Convert European Air Quality Index to info code EARS ( -- left-pos right-pos ) Return the current ears positions ELSE (immediate) ( -- ) Begin the else part of a conditional Compile an unconditional jump to the matching THEN Update the previous conditional jump to point to the instruction after the ELSE EMIT ( char -- ) Emit character ENDCASE (immediate) ( -- ) End a case statement ENDOF (immediate) ( -- ) End a case option EVAL-TRAME ( str -- ) Evaluate a trame EVALUATE ( str -- ) Evaluate a string as Forth code EXIT ( -- ) Return control to the caller FALSE ( -- false ) FREE-CELL ( addr -- ) Free a cell in memory at the given address. GC ( -- mem% ) Perform garbage collection and return the memory usage percentage GET-HOUR ( -- hour ) Get the current hour GET-MINUTE ( -- minute ) Get the current minute HD ( list -- list x ) Get the head of a list HELP ( -- ) HTTP-GET ( url -- content header ) Perform an HTTP GET request and return the content as a string HTTPS is not supported HTTP-POST ( payload url -- content header ) Perform an HTTP POST request and return the content as a string HTTPS is not supported IF (immediate) ( cond -- ) Begin a conditional Compile a conditional jump to the matching ELSE or THEN INTERPRETER ( -- ) Interactive Forth interpreter INVERT ( n -- flag ) Logical NOT IP ( -- ip ) Push the IP address of the WIFI interface onto the stack JMP ( addr -- ) Unconditional jump JSON-GET ( w path -- x ) (e.g., "daily.weathercode[0]") Get an element from a dictionary or list by path JSON-PARSE ( str -- list/dict ) Parse a JSON string into a list or dictionary LOAD-INFO-ANIMATION ( filename anim_num -- ) Load info animation from the server LOAD-INFO-ANIMATION ( filename anim_num -- ) Load info animation from the server LOAD-INFO-ANIMATIONS ( -- ) Load info animations from the server LOAD-SRV ( filename -- ) Load a forth file from the server LOCAL>STRING ( -- str ) Push the current local time and date as a string onto the stack LOGIN ( -- ) Login LOWER ( s -- s ) Convert string s to lowercase MAC ( -- mac ) Push the MAC address of the WIFI interface onto the stack MD5 ( str -- hash ) Compute the MD5 hash of a string METEO>INFO ( n -- n ) Convert weather code to info code MOVE-EAR ( ear dir pos -- ) (0=left, 1=right) (0=left, 1=right) (0..16) Move an ear ear in direction dir to position pos MS ( delay -- ) Sleep for the specified number of milliseconds NIL ( -- list ) Push empty list onto the stack NIP ( n1 n2 -- n2 ) Drop the first item below the top of stack NTH ( list/str n -- x ) Get the n-th element of a list or the n-th character of a string OF (immediate) ( value -- ) Begin a case option ON-CLICK ( -- ) Click hook ON-CONNECT ( -- ) ON-DBL-CLICK ( -- ) Double click hook ON-EARS ( -- ) Ears hook ON-HALFTIME ( -- ) Half-hour hook ON-RFID ( rfid -- ) RFID hook ON-TIME ( -- ) Hour hook OR ( n1 n2 -- flag ) Logical OR OVER ( n1 n2 -- n1 n2 n1 ) Make copy of second item on top PAD_LEFT ( s n c -- s ) Pad string s on the left to length n with character c PAD_RIGHT ( s n c -- s ) Pad string s on the right to length n with character c PLAY-CHOR ( chor_data -- ) Play a choreography PLAY-MIDI ( i -- ) (i-100) Play a MIDI sound/note If i>=100, play note If 0<=i<100, play sound i If i<0, play a random note PLAY-URL ( url -- ) Play a WAV file from an HTTP URL HTTPS is not supported PROMPT ( -- ) Display the Forth interpreter prompt R> ( -- x ) ( R: x -- ) Retrieve item from return stack R@ ( -- x ) ( R: x -- x ) Copy top of return stack onto data stack RANDOM ( max -- n ) Return a pseudo-random number n between 0 and max-1 RDEPTH ( -- count ) Count number of items on return stack RDROP ( n -- ) Discard top of return stack READ-LINE ( -- line ) Read a line from the current socket RELOAD-INIT ( -- ) Reload init.forth RESUME-TASK ( task-id -- flag ) Resume the task with the given task id. REVISION ( -- str ) Push the revision string onto the stack ROT ( n1 n2 n3 -- n2 n3 n1 ) Rotate third item to top SAY ( text -- ) Text to speech SET-INFO-ANIMATION ( data n -- ) Set info animation n from json SLEEP ( -- ) Put the Nabaztag into sleep mode SLEEPING-TIME? ( -- flag ) Check if current hour is in the sleep interval SLEEPING? ( -- flag) Return true if the Nabaztag is in sleep mode SPACE ( -- ) Display space START-TASK ( text delay name -- ) Start a new task with the given name, delay, and text to execute. STOP-TASK ( task-id -- flag ) Stop the task with the given task id. STR-JOIN ( list -- str ) Join a list of strings into a single string SURPRISE ( -- ) Surprise SURPRISE-TIME? ( -- flag ) Check if it's time for a surprise SUSPEND-TASK ( task-id -- flag ) Suspend the task with the given task id. SWAP ( n1 n2 -- n2 n1 ) Exchange top two stack items TAICHI ( -- ) Do Tai Chi exercise TAICHI-TIME? ( -- flag ) check if it's time for taichi TCP-LISTEN ( text port name -- ) Start a TCP server listening on the given port with the given name THEN (immediate) ( -- ) End a conditional Update the previous conditional jump or unconditional jump to point to the instruction after THEN TIME&DATE ( -- sec min hour day month year) Push the current time and date onto the stack TIME-MS ( -- ms ) Push the current time in milliseconds onto the stack TIME? ( -- flag ) Check if the system time has been received from the time server TL ( list -- list' ) Get the tail of a list TRUE ( -- true ) TUCK ( n1 n2 -- n1 n2 n1 ) (top) Copy the first stack item below the second stack item UNTIL (immediate) ( x -- ) End a loop Compile a conditional jump back to the matching BEGIN UPDATE-TIME ( -- ) Update the system time from the time server UPDATE-WEATHER ( -- ) Update weather and air quality information UPPER ( s -- s ) Convert string s to uppercase UPTIME ( -- s ) Push the system uptime in seconds onto the stack URL-DECODE ( s -- s ) URL decode string s URL-ENCODE ( s -- s ) URL encode string s UTC>STRING ( -- str ) Push the current UTC time and date as a string onto the stack VARIABLE (immediate) ( -- addr ) Define a variable and allocate a word for it. VOLUME ( -- vol ) Get the audio volume WAKE-UP ( -- ) Wake up the Nabaztag from sleep mode WORDS ( -- ) List the words in the dictionary XOR ( n1 n2 -- flag ) Logical XOR Variables --------- CITY-CODE City code (timezone) CRONTAB-LAST-MINUTE Crontab last checked minute DST Daylight Saving Time EAIQ European Air Quality Index GO-TO-BED-AT Go to bed at (hour) INFO-DURATION Info display duration (seconds) INFO-MAIL Info mail INFO-MESSAGES Info messages INFO-PALETTE Info LED palette (16 cells) INFO-POLLUTION Info pollution INFO-SERVICE4 Info service 4 INFO-SERVICE5 Info service 5 INFO-STOCK Info stock INFO-TRAFFIC Info traffic INFO-WEATHER Info weather LANGUAGE Language LATITUDE Latitude (weather/air quality) LED-BASE Base LED color override LED-BASE-BREATHING Base LED breathing effect LED-CENTER Center LED color override LED-LEFT Left LED color override LED-NOSE Nose LED color override LED-RIGHT Right LED color override LONGITUDE Longitude (weather/air quality) MD5-PASSWORD Login password (MD5 hashed) NTP-SERVER NTP server SERVER-URL Server URL SURPRISE-NEXT-TIME Next surprise time TAICHI-FREQ Tai Chi frequency TAICHI-NEXT-TIME Next taichi time USERNAME Login username WAKE-UP-AT Wake up at (hour) WEATHER-CODE Weather code