Integer constants in PIC assembly: decimal and hexadecimal

I am doing programming on a microcontroller based on PIC (microchip). The PIC model I have used is PIC16.

I have a problem with data type classification

eg. MOVLW xxxx

where the xxxx

following: -

  • 0x23

    : hexadecimal

  • 23

    : decimal

  • D'20'

    : hexadecimal

  • 1Bh

    : hexadecimal

  • b'00101100'

    : binary

Why 1Bh

, D'20'

, 0x23

hex? Is there any other way to show hex in PIC assembly

+3


source to share


1 answer


0x23

hexadecimal

23

hexadecimal

D'20'

decimal



1Bh

hexadecimal

b'00101100'

binary

This is the right combination. In assembly, the default 23

is hexadecimal. D in D'20'

indicates that the data type is decimal. Same as in 1Bh

, where h denotes hexadecimal.

+4


source







All Articles