OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 8:30 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Assembly '%al' not allowed with 'inw' Error
PostPosted: Sat Apr 30, 2022 4:01 am 
Offline

Joined: Fri Apr 01, 2022 10:06 am
Posts: 23
Location: Türkiye, Uşak/Merkez
Assembly '%al' not allowed with 'inw' How to Solve the Error I'm Sharing the Screenshot And The Code That Caused The Error.

Error Caused Code:
Code:
__asm__ volatile("inw %1, %0" : "=a" (result) : "Nd" (portnumber));


Attachments:
Hata.png
Hata.png [ 6.68 KiB | Viewed 1266 times ]

_________________
M. Alp
Top
 Profile  
 
 Post subject: Re: Assembly '%al' not allowed with 'inw' Error
PostPosted: Sat Apr 30, 2022 4:53 am 
Offline
Member
Member

Joined: Thu Sep 27, 2018 5:10 pm
Posts: 28
Location: Turkey
inw works with 16 bit operands, you are giving it a 8 bit operand, hence the error.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 33 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group