What do the dollar ($) and percentage (%) signs represent in x86 assembly?

后端 未结 5 1194
耶瑟儿~
耶瑟儿~ 2020-12-15 03:01

I am trying to understand how the assembly language works for a micro-computer architecture class, and I keep facing different syntaxes in examples:

sub $48,         


        
5条回答
  •  囚心锁ツ
    2020-12-15 03:55

    This is AT&T syntax for x86. In AT&T % generally denotes a register while $ is reserved for immediates. If you omit th $ the assembler would interpret the 48 as an address.

提交回复
热议问题