Write comments

Port.h assembler messages

25. Aug 2017, 13:43

I have a problem with port.h i get two errors.
They aren't compiler errors, errors when trying to make the port.o from the makefile.

Port.h:70: error '%al' not allowed with 'outw'

The error is this line
__asm__ volatile ("outw %0, %1" : : "a" (_data), "Nd" (_port));

The second error is more or less the same

Port.h:94: error '%al' not allowed with 'outl'

__asm__ volatile ("outl %0, %1" : : "a" (_data), "Nd" (_port));


Then it fails to make the port.o file.

Any ideas?

25. Aug 2017, 13:43

Re: Port.h assembler messages

3. Mar 2018, 08:24

Hello,
Actually, I am not a AT&T syntax guy, so I am not pretty sure but outw command stands for out word. Since al is not a word-length register you cannot use with outw, you have to use it either with outb or you have to declare data variable as an uint16_t .

And then, since outl means out long, you have to use either outb if your data is a uint8_t variable or have to declare data as an uint32_t.

Regards,
Write comments




Bei iphpbb3.com bekommen Sie ein kostenloses Forum mit vielen tollen Extras
Forum kostenlos einrichten - Hot Topics - Tags
Beliebteste Themen: NES, Mode, Linux, Rap, Programm

Impressum | Datenschutz