Skip to content

propeller-mcu/propeller2_asm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

75 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Propeller 2 Assembly Beginner Guides

Welcome to the Propeller 2 Assembly Guides, a complete beginner-friendly repository to programming the Propeller 2 microcontroller in assembly.


Contents


Helpful Resources

  • Parallax Website – Official Propeller 2 info and documentation
  • Parallax Forums – Community discussion and support
  • Spin Tools IDE – a development environment for the Parallax Propeller 1 and 2.
  • FlexProp – a simple GUI for creating applications for the Parallax Propeller 1 and 2.

Updates

2026-04-23

Beginner guide updates

  • Improved overall document structure for consistency and readability

2026-04-21

Beginner guide updates

  • Corrected and standardized the IF_A conditional execution section
  • Removed outdated reference to the QFRAC command
  • Fixed inaccuracies related to DIV instruction behavior
  • Improved overall document structure for consistency and readability

2026-04-06

General updates

  • Fixed the initialization sequence for both transmission (TX) and reception (RX) pins when configuring SmartPins. Each pin is now placed into a safe inactive state using DIRL before applying WRPIN and WXPIN settings, then re-enabled with DIRH. This prevents unintended or partial signals during setup and ensures more reliable serial communication.

2026-04-02

General updates

  • Appendix B changed to Propeller 2 Assembly Reference. This appendix provides a categorized reference of Propeller 2 assembly instructions and directives included in this manual, each with a brief description. It is not a complete listing of all instructions, directives, or features supported by the Propeller 2 architecture.

2026-03-16

General updates

  • Appendix A: DEBUG commands that work universally across compilers
  • Appendix B: Index of all instructions used in the manual
  • Added RQPIN as an alternative to RDPIN
  • Added exercises for each chapter

2026-03-12

Compiler testing

Verified the examples work with the following:

  • FlexProp
  • PNut
  • Spin Tools IDE
  • Propeller Tool IDE

2026-03-05

Cog Control → Hub & Process Control Updates

  • Split the original “Cog Control” chapter into two focused sections: Cog Control and Process Control.
  • Cog Control now emphasizes starting, stopping, and managing individual cogs.
  • Process Control introduces safe multi-cog coordination using hub memory locks.
  • Added example program to demonstrate proper lock acquisition and release, done counters, and independent cog termination.
  • Clarified the role of hub memory as the central communication medium between cogs and the main program.

2026-03-03

General updates

  • Fixed all code so res variables for RAM storage are now consistently placed below byte/word/long declarations.
  • Tested all programs with FlexProp and the Spin IDE to ensure full compatibility.
  • Updated the comparison / if_* Instructions chapter to include the new if_a instruction.
  • Added explanation of the wcz flags in the comparison section for clarity.
  • Revised the Decimal to String section to include an explanation of the ptra register and its role in memory operations

2026-02-25

Simclk Removal Update

References to the obsolete simclk variable have been removed from all examples. Timing in spin-wait loops and SmartPin routines now relies entirely on real instruction cycles and the system clock (_CLKFREQ), as handled automatically by the compiler or, optionally, asmclk.

WAITX / NOP Instruction Timing Correction

In the “WAITX vs NOP” topic, the previous statement that instructions execute in one clock cycle has been corrected. On final Propeller 2 hardware, all base instructions take two clock cycles. This affects timing calculations for spin-wait loops, SmartPin delays, and bit-banging routines.

2026-02-24

Safe Program Termination Update

All examples now explicitly terminate with:

endprog
    jmp #$

This prevents execution into variable (res) memory and ensures stable PST behavior.

Releases

No releases published

Packages

 
 
 

Contributors