OpenBoot 3.x Command Reference Manual

Activating the Script

Use the following steps to create and activate the script:

  1. At the ok prompt, type nvedit.

Edit the script using editor commands.

  1. Type Control-C to get out of the editor and back to the ok prompt.

If you have not yet typed nvstore to save your changes, you may type nvrun to execute the contents of the temporary edit buffer.

  1. Type nvstore to save your changes.

  2. Enable the interpretation of the script by typing:


    setenv use-nvramrc? true
    

  3. Type reset-all to reset the system and execute the script, or type:


    nvramrc evaluate
    

to execute the contents directly.

The following example shows you how to create a simple colon definition in the script.


ok nvedit 
0: : hello ( -- ) 
1: ." Hello, world. " cr 
2: ; 
3: ^C 
ok nvstore 
ok setenv use-nvramrc? true 
ok reset-all 
...
ok hello 
Hello, world.
ok 

Notice the nvedit line number prompts (0:, 1:, 2:, 3:) in the above example. These prompts are system-dependent.