How do I write letter-initiated hexadecimal numbers in masm code?

前端 未结 1 1788
终归单人心
终归单人心 2021-01-26 12:30

I am currently editing several macros consisting of MASM code. They all look similar to this:

Primary MACRO
Key 0Bh,\'0\'
Key 29h,15h
Key 03h,\'2\'
Key 06h,\'5\'         


        
相关标签:
1条回答
  • 2021-01-26 13:17

    The correct format for hex AB is 0ABh.

    The reason you need to start it with a digit is so the assembler can easily distinguish it from a label or symbol such as ABh.

    And don't worry about the fact it has three digits. It doesn't magically turn into a twelve-bit number because of that, the number of bits used will depend on the addressing modes you're using.

    0 讨论(0)
提交回复
热议问题