I know, I know it's common at my age... :?
I'm trying to port some Atmel ASM code to GAS but I'm getting stuck on the following, for the moment at least. (forget about whether it will work for now).
The registers used are defined as follows
//Start register assignment ;Z register=R30 and R31 ;Y register=R28 and R29 ;X register=R26 and R27 #define zh 31 #define zl 30 #define yh 29 #define yl 28 #define xh 27 #define xl 26 #define temp 24 #define temp1 25 #define msg_status 23 ;Status of message being displayed #define timer_flags 22 ;Timers running/stopped flags #define row 14 ;This is the row bit holder #define char_save 11 ;Temp storage for message data #define scroll_cntl 9 ;scroll 0=stop <>0=go #define rownum 8 ;Row number #define scroll_n_bits 3 ;Number of bits to rotate dis buffer for scroll
but some lines bring up the following error:
../DISA-5S07_driver.S:75: Error: `,' required ../DISA-5S07_driver.S:75: Error: constant value required ../DISA-5S07_driver.S:75: Error: garbage at end of line
the lines in question are
mov char_save,temp ;save it for now . mov row,temp ;at bottom row again . mov rownum,temp
all with the mov instruction. 2 other lines come up with
../DISA-5S07_driver.S:83: Error: `,' required ../DISA-5S07_driver.S:83: Error: garbage at end of line
both line use the sbr instruction
sbr timer_flags,(1<<dwell_timer_flg) sbr msg_status, (1<<stop_dwell_flg)
the bits have been defined as
#define dwell_timer_flg 0 ;Dwell timer status #define stop_dwell_flg 5 ;Stop dwell timer running
Any clues? Going around in circles looking for answers. :roll:
Maybe it has nothing to do with those lines as it is the case with some C programs.
The above is working code by the way with the Atmel assembler.