xmodem question

This is a discussion on xmodem question within the C++ Programming forums, part of the General Programming Boards category; hello, i want to send more than 255 blocks with the xmodem protocol. what is happen with the block number ...

  1. #1
    Registered User
    Join Date
    Feb 2003
    Posts
    8

    xmodem question

    hello,

    i want to send more than 255 blocks with the xmodem protocol. what is happen with the block number after 255. Start the number with one again or anything else?

    thanks for your help.

    cu hick.hack

  2. #2
    Registered User
    Join Date
    Feb 2003
    Posts
    8
    I found it:

    The packet number sent is simply the number of the packet. If the packet
    number is greater than 255, then subtract 256 repeatly until the number is
    between 0 and 255. For example, if you were sending packet 731, then you
    would send 731 - 256 - 256 = 219.

    see you soon.

    hick.hack

  3. #3
    Registered User Azuth's Avatar
    Join Date
    Feb 2002
    Posts
    236
    Or use the modulus operator

    731 % 256 = 219
    Demonographic rhinology is not the only possible outcome, but why take the chance

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Debugging question
    By o_0 in forum C Programming
    Replies: 9
    Last Post: 10-10-2004, 05:51 PM
  2. Question about pointers #2
    By maxhavoc in forum C++ Programming
    Replies: 28
    Last Post: 06-21-2004, 12:52 PM
  3. Question...
    By TechWins in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 07-28-2003, 09:47 PM
  4. Question about linked lists.
    By cheeisme123 in forum C++ Programming
    Replies: 6
    Last Post: 02-25-2003, 12:36 PM
  5. Question, question!
    By oskilian in forum A Brief History of Cprogramming.com
    Replies: 5
    Last Post: 12-24-2001, 12:47 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21