C Program for testing Endian-ness with requirements

This is a discussion on C Program for testing Endian-ness with requirements within the C Programming forums, part of the General Programming Boards category; I need help writing a program that uses the functions: uint32_t htonl(uint32_t hostlong) uint32_t ntohl(uint32_t netlong) bool isBigEndian() //This is ...

  1. #1
    Registered User
    Join Date
    Feb 2012
    Posts
    1

    C Program for testing Endian-ness with requirements

    I need help writing a program that uses the functions:
    uint32_t htonl(uint32_t hostlong)
    uint32_t ntohl(uint32_t netlong)
    bool isBigEndian() //This is the function that will return a 1 if the host bye ordering is the same as the network byte ordering and will return a zero otherwise.

    Instructions state:
    -Write a function htonl in assembly that will accept an integer variable and covert it from host byte order to network byte order.
    -Write a function ntohl in assembly that will accept an integer in network byte order and return an integer in host byte order.

    Thank you!

  2. #2
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    I guess you had better get on it then.


    Quzah.
    Hope is the first step on the road to disappointment.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Little endian and Bit endian advantages and disadvantages
    By nkrao123@gmail. in forum C Programming
    Replies: 4
    Last Post: 09-11-2011, 04:40 AM
  2. Optimize the prime-ness for testing
    By kenryuakuma in forum C++ Programming
    Replies: 13
    Last Post: 12-15-2008, 03:08 PM
  3. big endian-small endian problem
    By kapil1089thekin in forum C Programming
    Replies: 3
    Last Post: 05-15-2008, 06:47 PM
  4. Big Endian Little Endian Complex- Converting Characters
    By bd02eagle in forum C Programming
    Replies: 3
    Last Post: 07-11-2006, 01:01 AM
  5. requirements to program under OpenGL
    By lambs4 in forum Game Programming
    Replies: 1
    Last Post: 12-06-2001, 09:00 PM

Tags for this Thread


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