Announcement

Collapse
No announcement yet.

Finding Out Current (HIAdd, LOAdd)?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Finding Out Current (HIAdd, LOAdd)?

    Hi All,
    I've got another question. I don't see it in the documentation under Media Function but is there a way to know what position I'm currently at after some data on the uSD? Something like C's ftell(FILE *pfile) or int fgetpos(FILE *pfile, fpos_t *position)?
    Thanks.

  • #2


    Are you looking for the file_Tell function?
    Mark

    Comment


    • #3


      Yes!!! Are there such function?? I don't see it... Please show me

      Comment


      • #4


        I have no idea where you are looking.

        In my copy of the Shortcut to PICASO-GFX2-4DGL-Internal-Functions manual it's on Page 206
        Mark

        Comment


        • #5


          I thought I've placed in the wrong part of the forum but I checked, its correct. I'm using GOLDELOX-GFX2 and documentation GOLDELOX-GFX2 Internal 4DGL Functions dated 19th March 2010, Rev 2.0. Is this the wrong file I'm using? If so, please advice a newer revision. Thanks!

          Comment


          • #6


            Sorry you confused me by referring to file functions, there is no concept of a file on Goldelox.

            So I'm not quite sure what you are after. Could you perhaps be after MEDIA_ADDR_LO and MEDIA_ADDR_HI 'registers'?
            Mark

            Comment


            • #7


              I think I'll create my own pointer then. Basically, what I'm doing is:
              var rxByte := $FF;
              media_SetSector(0, 3);rxByte := serin():while (rxByte != $A0) media_WriteByte(rxByte); rxByte := serin():wendmedia_flush();//Now which sector or address was the last byte written on uSD?
              Thanks!

              Comment


              • #8


                SECTOR_ADDR_LO and SECTOR_ADDR_HI should also come in handy, see page 172
                Mark

                Comment


                • #9


                  OK, fantastic. That should help. Thanks!

                  Comment

                  Working...
                  X