Reputation: 1036
I am doing programming in PIC based micro controller (microchip). The PIC model that I used is PIC16.
I have issue on classifying the data type
e.g. MOVLW xxxx
where xxxx
are the following:-
0x23
: hexadecimal
23
: decimal
D'20'
:
hexadecimal
1Bh
: hexadecimal
b'00101100'
:
binary
Why are 1Bh
, D'20'
, 0x23
hexadecimal? Is there any other way to show hexadecimal in PIC assembly
Upvotes: 3
Views: 2138
Reputation: 99
0x23
hexadecimal
23
hexadecimal
D'20'
decimal
1Bh
hexadecimal
b'00101100'
binary
This is the correct combination. In assembly, by default 23
is hexadecimal. D in D'20'
indicates that the data type is decimal. Same to 1Bh
where h indicates hexadecimals.
Upvotes: 4