2005-11-22 06:48 PM
2005-11-21 10:17 PM
Is it possible to define a 16 Bit value as a constant
You can define a byte e.g. #define Name 255 Can you do the same but with a value of 03ff or do I #define High Byte & #define Lo byte Re Brian2005-11-22 12:16 AM
Hi Brian
I am not much of ST7 programmer, but I will try to contribute something here. If you use assembly, maybe you can do this: WORDS ; following addresses are 8 bit length segment 'ram0' .variable DS.W 0 ; reserve 16 bits end and you can use it like this (maybe) ld A, variable but A is 8 bit, so ... In C I don't know. yours Oren2005-11-22 12:19 AM
Hi I am using assembler
But its a constant I want to define i.e. a label with a value Re Brian2005-11-22 01:36 AM
Brian,
there are two ways to define a 16 bit constant (or label) for the assembler: * by using the EQU directive (though somewhat deprecated...) * by using the DC.W directive see Regards EtaPhi2005-11-22 01:58 AM
Thanks I will have a read!