2004-03-31 04:52 AM
How to define bytes in the upper ram bank (0x100-17F)?
2004-03-28 10:29 AM
Hi,
I am trying to define a byte wide variable in the 16 bit address area of the RAM. When I use ''label DS.B 1'' I get: ''Error 84: Byte Size label has val > 255! (need WORDS?)'' When I use ''DS.W'' it compiles but the variable is a word! Please advise......2004-03-28 06:38 PM
If you define the 16 bit RAM section as WORD, you can the registers define as byte!
The next code is working!Code:
WORDS segment 'ram1' ;Registers define in RAM1 location ;/* Next adresses are 16 bits */ ;/* Be carefull, the next RAM registers */ ;/* Do not proceed commands, like */ ;/* SLA, CLR, INC */ Message DS.B 1 ;Message2004-03-28 10:54 PM
Basically you have missed out the ''WORDS'' qualifier. It tells the assembler, ''the following bytes have to be addressed using 16-bits. You must have defined in the following way :
segment 'ram0' BYTES temp ds.b 1 segment 'ram1' label ds.b 1 The BYTES says that label uses 8-bit addressing while it is NOT in zer page, hence the error. Adding ''WORDS'' below ''segmnet 'ram1' '' will solve your problem.2004-03-31 04:52 AM
Thanks very much! it solved the problem.