Shop OBEX P1 Docs P2 Docs Learn Events
SD card reading and writing? — Parallax Forums

SD card reading and writing?

msiriwardenamsiriwardena Posts: 301
edited 2013-12-02 13:03 in Propeller 1
I am trying to learn to write and read a SD Card.I am using the Object package -fsrw-andifriends-1.7(Attached to this post)

Iam trying to under stand the code in the - sdrw -VGA Demo.

In this the PUB start - has the following code :
pub start | r, sta, bytes
term.start(16, @array, @vgacolours, @cursor_x, 0, 0)
print($100)
ps(string("Mounting.", 13))
sd.mount(0)
ps(string("Mounted.", 13))
ps(string("Dir: ", 13))
sd.opendir
repeat while 0 == sd.nextfile(@tbuf)
ps(@tbuf)

What I dont understang is the code lines " ps(string("Mounting",13)
I under stand what it does but I do not understand the reference "ps"
When code reference to an oblect - sd.opendir - I know it refers to the Pub in the object "Term"
But there is no Oblect labelled "ps"

Please explain this reference so I will understand the code.

Thank you,

Siri

Comments

  • Dave HeinDave Hein Posts: 6,347
    edited 2013-12-02 08:43
    "ps" is referencing the method "PS" that is included in the top object. Since it is included within the object a separate object reference is not needed.
  • msiriwardenamsiriwardena Posts: 301
    edited 2013-12-02 13:03
    Dave,
    Thank you very much.I was going through the PUB methods and NOT the PRI methods. As PRI are not referenced in the objects.

    Thanks again

    Siri
Sign In or Register to comment.