#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2004
    Location
    Lithuania
    Posts
    64
    Rep Power
    0

    Question Rep Insw Assembler


    How to program with REP INSW command?

    I have Borland 3 compiler and Win98.

    The short description about this command:
    (from CIO-DAS16/330i )

    REP INSW (Repeat Input String) is a 286/386/486 class CPU
    instruction which allows the PC to transfer large amounts of data using one instruction. The data is transferred at the maximum rate allowed by the bus. On a typical 286 AT, this rate is 2Mbyte/sec or 1 sample every microsecond.

    In order to employ REP INSW the A/D board must have a FIFO
    buffer to accumulate sample data. The CIO-DAS16/330 has a 1024 sample buffer. When it is half full (512 samples), an interrupt generated by the DAS16/330 starts an interrupt service routine which executes the instruction REP INSW, transfers the data to PC memory and empties the FIFO buffer.

    The data is transferred completely in the background and no unrea-sonable demands are placed on the PC's resources. For example, screen updates need not be suspended! REP INSW is the same method LAN and disk controllers employ.

    Thanks in advance,

    gintare
  2. #2
  3. Banned ;)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Nov 2001
    Location
    Woodland Hills, Los Angeles County, California, USA
    Posts
    9,638
    Rep Power
    4247
    I'm not exactly sure what you're asking, but Borland's compilers have supported the asm keyword for a long time. You can use it to embed assembly language instructions in your C code.
    Code:
    void somefunc() {
       int x = 5;
       /* More C code up here */
       x++;
       /* Now for some asm code */
       asm {
           REP INSW;
       }
       /* More C code */
    }
    Up the Irons
    What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home.
    "Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest
    Down with Sharon Osbourne

    "I wouldn't hire a butcher to fix my car. I also wouldn't hire a marketing firm to build my website." - Nilpo
  4. #3
  5. fork while true;
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    May 2005
    Location
    England, UK
    Posts
    5,538
    Rep Power
    1051
    I found this on a quick google. It's an IDE driver for DamnSmallOS. It uses rep insw for input and rep outsw for output.

    They're rather similar to a windows thing called i/o completion ports where you can let things go on in the background and pick up the results when it lets you know they finished, or so i gather they are anyway

    Comments on this post

    • golliwog disagrees : hey man - you don't really claim that genius quote do you?
  6. #4
  7. fork while true;
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    May 2005
    Location
    England, UK
    Posts
    5,538
    Rep Power
    1051
    >>golliwog disagrees: hey man - you don't really claim that genius quote do you?

    WTF? o_O
  8. #5
  9. המבין יבין
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Jul 2001
    Location
    Haifa
    Posts
    2,085
    Rep Power
    1486
    Originally Posted by LinuxPenguin
    WTF?
    As far as I've been able to google, it's a Jonathan Price quote. Funny, I always thought that it was an Einstein quote.
  10. #6
  11. fork while true;
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    May 2005
    Location
    England, UK
    Posts
    5,538
    Rep Power
    1051
    meh, i'm not fussed, the person is an idiot if you look at his rep history...

    Comments on this post

    • dotancohen agrees : He's an idiot for giving you bad rep on your sig when you're trying to help someone. Here it is back.

IMN logo majestic logo threadwatch logo seochat tools logo