Hey Ted, The zero ("0") is put before the hex character (in your example "C") because it indicates to the assembler that it is a constant value. Without the zero, the assembler would encounter the string "Ch", which it would assume is a label. When I'm doing PC assembly language, this one always bites me on the bum - It's easy to write "10h" (which will be correctly interpreted as 16 decimal) and then follow with "AAh" which is going to be initially interpreted as a label. This is why I prefer a definite type prefix like "0x0" or "$". myke ----- Original Message ----- From: "Ted Mawson" To: Sent: Friday, January 18, 2002 8:47 PM Subject: [PIC]: Confusion on hex format? > I'm following the assembly code in worktime.asm to get me (back) up to > speed on assembly language. > > > > There's a bit where it goes. > > > > ; Macro > > EStrobe MACRO ; Strobe the "E" Bit > bsf E > bcf E > ENDM > > CBLOCK 0CH > sec ; seconds digit > sec10 ; 10's of second digit > mins ; minutes digit > min10 ; 10's of minutes digit > hr ; hours digit > hr10 ; 10's of hours digit > highlim ; high limit + 1 of digit > w_temp ; holds W during interrupt > status_temp ; holds STATUS during interrupt > fsr_temp ; holds FSR during interrupt > Dlay ; 8 Bit Delay Variable > working ; working flag 0 not working, 1 working > ptr ; used in displaying message > Temp ; a temporary variable > bin ; a temporary variable > oset ; offset of time register > oldtime ; holds last value of sec > ENDC > > > > Here's my question - CBLOCK defines a block of constants starting at a > given address. Problem is, 0CH isn't a valid address - or is it? If it > is, why does it have a '0' in the lead position? 0xCH isn't valid as H > is one too many for hex? I expect I'm being dumb but, can someone > please point me to my mistake? > > > > Ted Mawson > > www.portfoliopm.com > > -- > http://www.piclist.com hint: The list server can filter out subtopics > (like ads or off topics) for you. See http://www.piclist.com/#topics > > > -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics