PNut/Spin2 Latest Version (v52)

This is PNut_v52, which is the Parallax ongoing work-in-progress Spin2/PASM2 development tool.

Share this object
<

Overview

Content

Latest PNut Documentation:
https://docs.google.com/document/d/16qVkmA6Co5fUNKJHF6pBfGfDupuRwDtf-wyieh_fbqw/edit

Propeller 2 Silicon Documentation:
https://docs.google.com/document/d/1gn6oaT5Ib7CytvlZHacmrSbVBJsD9t_-kmvjd7nUR6o/edit?usp=sharing

Propeller 2 Assembly Language Instructions:
https://docs.google.com/spreadsheets/d/1_vJk-Ad569UMwgXTKTdfJkHYHpc1rZwxB-DcIiAZNdk/edit?usp=sharing

General Propeller 2 Documentation:
https://www.parallax.com/propeller-2/documentation/

PNut GitHub Repository:
https://github.com/parallaxinc/P2_PNut_Public

Version 52

MOVBYTS-based methods added.

MOVBYTS(longvalue, pattern) 'returns byte-moved/copied long value
ENDIANL(longvalue) 'returns reverse-endian long value
ENDIANW(wordvalue) 'returns reverse-endian word value

NEXT and QUIT can now be followed by an integer 1..16 to indicate which REPEAT level to act within.

NEXT 'do the next iteration in the current REPEAT block
NEXT 1 'do the next iteration in the current REPEAT block (same as NEXT)
NEXT 2 'do the next iteration in the 1st-outer REPEAT block
NEXT 3 'do the next iteration in the 2nd-outer REPEAT block

QUIT 'quit the current REPEAT block
QUIT 1 'quit the current REPEAT block (same as QUIT)
QUIT 2 'quit the 1st-outer REPEAT block
QUIT 3 'quit the 2nd-outer REPEAT block

DEBUG(DEBUG_END_SESSION) added for facilitating AI-assisted code development.

When DEBUG(DEBUG_END_SESSION) executes:
Any open DEBUG.LOG file and DEBUG window(s) get closed.
If 'PNut -rd' was used to launch PNut, PNut closes, as well.
The P2 continues executing.

An AI programming assistant can do the following, in order:

  1. Make strategic edits to the code being developed.
  2. Delete the DEBUG.LOG file, so it can detect when the new DEBUG.LOG file closes.
  3. Compile and run the code with DEBUG enabled via 'PNut -rd'.
  4. Wait for the DEBUG.LOG file to both exist and have a length greater than 0, since this indicates that "DEBUG_END_SESSION" was encountered and the file was closed and is now ready for reading.
  5. Peruse the DEBUG.LOG file for results of interest.
  6. Repeat the edit/compile/run/wait/peruse process until some goal is achieved.

TERM Debug Display has new color controls during updating.

text_color {back_color}
BACKCOLOR color

There is a bug in the "NEXT/QUIT {level}" compilation. This will be fixed soon. For now, only use NEXT/QUIT without a level value.


Downloads

Leave a Reply