Results 1 to 3 of 3

Thread: Writing Binary Files

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2000
    Posts
    2

    Post

    Using the put statement writes to 1 byte.

    How can I write to 2 bytes (1 word)

    Example, i want to write 00 67 at offset 00.

    IT would look like this in a hex editor
    0067

    But if you do this:
    put #1, &H00, &H67
    it writes to the first byte...

    There has to be a simple way around this but I can't figure it out...

    Any ideas?

    Thanks

  2. #2
    Lively Member
    Join Date
    Dec 1999
    Location
    Karlsruhe, Germany
    Posts
    122

    Post

    Hi,

    the second parameter in the put command is the offset in the file.
    Try

    Code:
    Put #llFH, , Chr$(&H0) & Chr$(&H67)
    Roger

  3. #3

    Thread Starter
    New Member
    Join Date
    Feb 2000
    Posts
    2

    Post

    Thanks for that Roger, yeah I realise the second parameter is the offset, 00H is where i wanted to write 0067H. It was the Chr$() that did the trick. Thanks again for your help!

    [This message has been edited by Ryno (edited 02-19-2000).]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width