We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
These macros specific for the AVR microcontrollers add a switch construct
;;;----------------------------------------------------------------- ;;; Switch ;;; _sw_case R16-31,Value ;;; _case R16-31,Value ;;; _break_sw ;;; _default ;;; _end_sw ;;;----------------------------------------------------------------- .macro _sw_case REG VALUE cpi \REG,\VALUE .set __ST_IFNEST, __ST_IFNEST+2 _st_mkjmp _st_jmp_not_eq, %__ST_IFNEST, f .endm
.macro _break_sw _st_mkjmp _st_jmp_always, %__ST_IFNEST+1, f .endm
.macro _case REG VALUE _st_label %__ST_IFNEST cpi \REG,\VALUE _st_mkjmp _st_jmp_not_eq, %__ST_IFNEST, f .endm
.macro _default _st_label %__ST_IFNEST .endm
.macro _end_sw _st_label %__ST_IFNEST _st_label %__ST_IFNEST+1 .set __ST_IFNEST, __ST_IFNEST-2 .endm
The text was updated successfully, but these errors were encountered:
No branches or pull requests
These macros specific for the AVR microcontrollers add a switch construct
;;;-----------------------------------------------------------------
;;; Switch
;;; _sw_case R16-31,Value
;;; _case R16-31,Value
;;; _break_sw
;;; _default
;;; _end_sw
;;;-----------------------------------------------------------------
.macro _sw_case REG VALUE
cpi \REG,\VALUE
.set __ST_IFNEST, __ST_IFNEST+2
_st_mkjmp _st_jmp_not_eq, %__ST_IFNEST, f
.endm
.macro _break_sw
_st_mkjmp _st_jmp_always, %__ST_IFNEST+1, f
.endm
.macro _case REG VALUE
_st_label %__ST_IFNEST
cpi \REG,\VALUE
_st_mkjmp _st_jmp_not_eq, %__ST_IFNEST, f
.endm
.macro _default
_st_label %__ST_IFNEST
.endm
.macro _end_sw
_st_label %__ST_IFNEST
_st_label %__ST_IFNEST+1
.set __ST_IFNEST, __ST_IFNEST-2
.endm
The text was updated successfully, but these errors were encountered: