ldi @0h, high(@1)
.endm
+;------------------------------------------------
+; load 16 bit direct from data space
+
+.macro ldsw
+ lds @0l, @1
+ lds @0h, @1+1
+.endm
+
+;------------------------------------------------
+; store 16 bit direct to data space
+
+.macro stsw
+ sts @0, @1l
+ sts @0+1,@1h
+.endm
+
;------------------------------------------------
; add 16 bit constant to register pair
; call @0
.ifdef @0
- .if abs(PC - @0) > 2048
+ .if abs(PC - @0) > 2047
call @0
.else
rcall @0
; printstring "String"
.macro printstring
- call printstr
+ .if FLASHEND > 0x0fff
+ call printstr
+ .else
+ rcall printstr
+ .endif
.if strlen(@0) % 2
.db @0,0
.else