public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] HAL_*_STRING
@ 2005-06-15 14:32 Leandro Fanzone
  2005-06-15 14:45 ` Gary Thomas
  0 siblings, 1 reply; 2+ messages in thread
From: Leandro Fanzone @ 2005-06-15 14:32 UTC (permalink / raw)
  To: ecos-discuss

Hello,
         I'm using ecos 2.0 under x86, and tried to use the HAL_*_STRING 
macros, both for reading and writing. They don't work properly; the 
assembly output shows that they lack the rep instruction preceding the 
insb/outsb instructions. So the macros would be:

#define HAL_READ_UINT8_STRING( _register_, _buf_, _count_)      \
CYG_MACRO_START                                                 \
    asm volatile ( "rep insb"                                       \
                   :                                            \
                   : "c" (_count_), "d"(_register_), "D"(_buf_) \
        );                                                      \
CYG_MACRO_END

#define HAL_WRITE_UINT8_STRING( _register_, _buf_, _count_)     \
CYG_MACRO_START                                                 \
    asm volatile ( "rep outsb"                                      \
                   :                                            \
                   : "c" (_count_), "d"(_register_), "S"(_buf_) \
        );                                                      \
CYG_MACRO_END

The same thing for the 16 bit and 32 bit versions.
Regards,

Leandro Fanzone

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-06-15 14:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-06-15 14:32 [ECOS] HAL_*_STRING Leandro Fanzone
2005-06-15 14:45 ` Gary Thomas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).