We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hello, I am having some problems with the following code: TODAY: DB __DATE__ MON1: DB TODAY MON2: DB TODAY+1 MON3: DB TODAY+2 DAY1: DB TODAY+4 DAY2: DB TODAY+5 YEAR1: DB TODAY+7 YEAR2: DB TODAY+8 YEAR3: DB TODAY+9 YEAR4: DB TODAY+10 I am trying to extract the bytes from the date to make my own formatting, it translates fine but then it will not link. It gives me IMPROPER FIXUP. I am not using C. Is there a way to get the individual bytes from a string using assembly? PS:This data will be going into a data variable with IF's so I cannot make it work after compile time (with mov's and DPTR) thanks, Mike
Since this is in XDATA you may just use:
MOV DPTR,#TODAY+4 ; access DAY1 MOVX A,@DPTR ; load DAY1