Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / Programming / Mac Programming / February 2008



Tip: Looking for answers? Try searching our database.

x86_64 assembler "movb" instruction

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
mhz - 14 Feb 2008 15:50 GMT
The as assembler accept "movb %al,0(%rsi)"
but not "movb %r8,0(%rsi)"   (invalid r8 register...)

Why ?

How to put (least significative) byte in r8 to memory 0(%rsi) ?  (with a single instruction...)
mhz - 19 Feb 2008 12:18 GMT
> The as assembler accept "movb %al,0(%rsi)"
> but not "movb %r8,0(%rsi)"   (invalid r8 register...)
>
> Why ?
>
> How to put (least significative) byte in r8 to memory 0(%rsi) ?  (with a single instruction...)

Solved: add b suffix to register name

 movb %r8d,0(%rsi)

It is a little bit redundant...

 mov %r8d,0(%rsi)

is also valid.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.