DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: how to create 2 bytes FIFO???

  1. #1
    Join Date
    Aug 2006

    how to create 2 bytes FIFO???

    The idea is:

    I have data in hexadecimal value (for example: 3F),this data is then pass to a memory location. Then the other data is in (for example: AA). Now,the '3F' should move to location to the right,and the 'AA' should be add in to become 'AA3F'(it is a FIFO concept).This process is continuing(the data is continue come in),the memory only store 2 bytes of data (for example: AA3F),more than 2 bytes will be throwing in FIFO basis.And the FIFO process is continue until it reach 'FFD8'.
    At this stage,all the data coming in will be stroe in another 512 bytes memory until 'FFD9' is reach then the whole process is restart.

    The simple idea is I wish to store the data between FFD8 and FFD9 into a memory buffer.I wish to do this in VB6.Anyone can help me?

  2. #2
    Join Date
    Sep 2006
    As far as I know, VB6 can't directly access memory locations (nor any other Visual Studio member that I know of for that matter).

    I think you want to try languages like assembly or C if you're into those things ..

  3. #3
    Join Date
    Nov 2003
    Alameda, CA
    store your "FIFO" using a Long (to avoid overflow problems)
    to "add" the value stored in "b" to the fifo, use:

    fifo = ((fifo And &HFF) * &H100) + (b And &hFF)

    the first And leaves only the first two bytes, the moltiplication shift them by two bytes, and then the new value is added (the AND makes sure that only two bytes are added)
    "There are two ways to write error-free programs. Only the third one works."

Similar Threads

  1. Attn: Daniel Reber
    By joe in forum Database
    Replies: 0
    Last Post: 04-04-2003, 06:25 PM
  2. Re: (No subject)
    By Joe in forum Database
    Replies: 0
    Last Post: 04-04-2003, 06:13 PM
  3. Can't create a PARADOX file and insert records using ODBC
    By Steve Oliver in forum VB Classic
    Replies: 0
    Last Post: 07-26-2002, 12:30 PM
  4. Create Procedure
    By YC Choo in forum Database
    Replies: 5
    Last Post: 09-03-2001, 01:42 PM
  5. Replies: 3
    Last Post: 05-11-2001, 06:04 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center