Discussion:
Assembly Code
(too old to reply)
Earl Colby Pottinger
2005-04-21 19:02:04 UTC
Permalink
Hello,
I am presently using a library to access the parallel port of my
computer for a program I am writting. The library calls tend to be slow
since they always check for ownership and have additional overhead.

Result on my 233 MHz computer the parallel port can only be read about
174,000 times per second.

In contrast on my old Amiga the operating system only granted permission to
use the hardware, and you read the port directly, thus my old 8 MHz Amiga
1000 could read almost 900,000 times per second and my 25 MHz Amiga 4000
almost 2,000,000 times per second (clocking to the CIA chip limited speed).

If I am reading the specs correctly, I should be able to read the parrallel
port of an Intel machine up to 5,000,000 per second, and atleast 1,000,000
min. It looks like I need a small asm patch to read the port directly and
put on the stack to return directly to my C++ program. Does anyone have any
pointers?

Earl Colby Pottinger
--
I make public email sent to me! Hydrogen Peroxide Rockets, OpenBeos,
SerialTransfer 3.0, RAMDISK, BoatBuilding, DIY TabletPC. What happened to
the time? http://webhome.idirect.com/~earlcp
Alexander G. M. Smith
2005-05-05 01:10:03 UTC
Permalink
Post by Earl Colby Pottinger
It looks like I need a small asm patch to read the port directly and
put on the stack to return directly to my C++ program. Does anyone have
any pointers?
Canibalize something from the Linux world?

- Alex
Earl Colby Pottinger
2005-05-07 16:54:30 UTC
Permalink
Post by Alexander G. M. Smith
Post by Earl Colby Pottinger
It looks like I need a small asm patch to read the port directly and
put on the stack to return directly to my C++ program. Does anyone have
any pointers?
Canibalize something from the Linux world?
I have found Linux code, what I have not found is a good programming example
of adding asm to BeOS code using the BeIDE.

Luckly, I now think I can get the job done in C++ so the assembly code is on
the back burner.

This is for the scope program I posted to BeBits, I think if I move the
buffer reading into the driver the speed will be there. Before I found the
driver I thought I needed to add the asm code my program to read the I/O
ports. My old BeOS programming books were very porly written on how to
access the I/O ports.

Earl Colby Pottinger
--
I make public email sent to me! Hydrogen Peroxide Rockets, OpenBeos,
SerialTransfer 3.0, RAMDISK, BoatBuilding, DIY TabletPC. What happened to
the time? http://webhome.idirect.com/~earlcp
Alexander G. M. Smith
2005-05-11 01:45:05 UTC
Permalink
Post by Earl Colby Pottinger
This is for the scope program I posted to BeBits, I think if I move the
buffer reading into the driver the speed will be there.
Usually a good idea - bunch up larger blocks of data and avoid the overhead
of calling the driver for each individual byte.

- Alex

Continue reading on narkive:
Loading...