Shop OBEX P1 Docs P2 Docs Learn Events
object symbols accessible from assembly? — Parallax Forums

object symbols accessible from assembly?

rokickirokicki Posts: 1,000
edited 2006-05-22 02:25 in Propeller 1
I'm curious why con and var symbols do not appear to be accessible in
the assembly sections. For instance,

var long x ;
dat
rdlong d0, x

I really would expect this to work! Any reason it doesn't? It seems odd
to have all this wonderful facility for declaring main memory storage and
constants, and then to just turn it all off in the assembly section.

(And I understand that var long x declares main memory and not fast
cog memory but still).

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2006-05-22 02:22
    You can pass the addresses of variables to an assembly routine. Keep in mind that addresses in assembly language are 0-511 (longs) with few exceptions. Any HUB addresses have to be in "registers" (COG locations) anyway.
  • SSteveSSteve Posts: 808
    edited 2006-05-22 02:25
    CON symbols are accessible in assembly sections. They are substituted by the compiler before any code is ever sent to the Propeller.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    OS-X: because making Unix user-friendly was easier than debugging Windows
Sign In or Register to comment.