01.05.2025, 20:42 UhrDeutsch | English
Hallo Gast [ Registrierung | Anmelden ]

Neues Thema eröffnen   Neue Antwort erstellen
Vorheriges Thema anzeigen Druckerfreundliche Version Einloggen, um private Nachrichten zu lesen Nächstes Thema anzeigen
Autor Nachricht
RBernatchez
Titel: inb outb not working with Kanotix 64 live on Intel dual-core  BeitragVerfasst am: 23.10.2006, 20:55 Uhr



Anmeldung: 23. Okt 2006
Beiträge: 1

Unable to get inb/outb to work with Kanotix 64 live, although identical code works properly on Suse 9.3 (32-bit version).

#include <stdio.h>
#include <asm/io.h> // Also tried <sys/io.h>
#include <unistd.h

int main()
{
int dataport = 0x378; // Also tried 0x3bc and 0x278
int success;
unsigned char data;

success = ioperm( dataport, 3, 1 ); //returns '0' for success
outb( 0xaa, dataport );
data = inb( dataport );

// On next line data always equals on 0xff on Kanotix 64 Live, but
// returns 0xaa for port 0x378 on Suse 9.3 (32-bit)
printf("data value read from port 0x%x = 0x%x\n", dataport, data);
}

The above code (test.c) is compiled using the following command:
gcc -O2 -o test test.c

The resulting application is run as root by first running 'su'
 
 Benutzer-Profile anzeigen Private Nachricht senden  
Antworten mit Zitat Nach oben
slh
Titel: RE: inb outb not working with Kanotix 64 live on Intel dual-  BeitragVerfasst am: 23.10.2006, 21:02 Uhr



Anmeldung: 16. Aug 2004
Beiträge: 1905

No need to post your homework questions everywhere, I deleted your identical posts from the other categories.
 
 Benutzer-Profile anzeigen Private Nachricht senden  
Antworten mit Zitat Nach oben
Beiträge vom vorherigen Thema anzeigen:     
Gehe zu:  
Alle Zeiten sind GMT + 1 Stunde
Neues Thema eröffnen   Neue Antwort erstellen
Vorheriges Thema anzeigen Druckerfreundliche Version Einloggen, um private Nachrichten zu lesen Nächstes Thema anzeigen
PNphpBB2 © 2003-2007 
 
Deutsch | English
Logos and trademarks are the property of their respective owners, comments are property of their posters, the rest is © 2004 - 2006 by Jörg Schirottke (Kano).
Consult Impressum and Legal Terms for details. Kanotix is Free Software released under the GNU/GPL license.
This CMS is powered by PostNuke, all themes used at this site are released under the GNU/GPL license. designed and hosted by w3you. Our web server is running on Kanotix64-2006.