📄 asm.asm
字号:
.include hardware.inc
.CODE
//=========================================================================================
//////////////////以下是A口设置/////////////////////////////////////
//=========================================================================================
.PUBLIC _set_a0;
_set_a0: .PROC
push r1 to [sp]
r1 = [P_IOA_Buffer];
r1 |= 0x0001
[P_IOA_Data] = r1;
pop r1 from [sp]
retf
.ENDP
.PUBLIC _clear_a0;
_clear_a0: .PROC
push r1 to [sp]
r1 = [P_IOA_Buffer];
r1 &= 0xfffe
[P_IOA_Data] = r1;
pop r1 from [sp]
retf
.ENDP
.PUBLIC _set_a1;
_set_a1: .PROC
push r1 to [sp]
r1 = [P_IOA_Buffer];
r1 |= 0x0002
[P_IOA_Data] = r1;
pop r1 from [sp]
retf
.ENDP
.PUBLIC _clear_a1;
_clear_a1: .PROC
push r1 to [sp]
r1 = [P_IOA_Buffer];
r1 &= 0xfffd
[P_IOA_Data] = r1;
pop r1 from [sp]
retf
.ENDP
.PUBLIC _set_a2;
_set_a2: .PROC
push r1 to [sp]
r1 = [P_IOA_Buffer];
r1 |= 0x0004
[P_IOA_Data] = r1;
pop r1 from [sp]
retf
.ENDP
.PUBLIC _clear_a2;
_clear_a2: .PROC
push r1 to [sp]
r1 = [P_IOA_Buffer];
r1 &= 0xfffc
[P_IOA_Data] = r1;
pop r1 from [sp]
retf
.ENDP
.PUBLIC _set_a3;
_set_a3: .PROC
push r1 to [sp]
r1 = [P_IOA_Buffer];
r1 |= 0x0008
[P_IOA_Data] = r1;
pop r1 from [sp]
retf
.ENDP
.PUBLIC _clear_a3;
_clear_a3: .PROC
push r1 to [sp]
r1 = [P_IOA_Buffer];
r1 &= 0xfff7
[P_IOA_Data] = r1;
pop r1 from [sp]
retf
.ENDP
.PUBLIC _set_a4;
_set_a4: .PROC
push r1 to [sp]
r1 = [P_IOA_Buffer];
r1 |= 0x0010
[P_IOA_Data] = r1;
pop r1 from [sp]
retf
.ENDP
.PUBLIC _clear_a4;
_clear_a4: .PROC
push r1 to [sp]
r1 = [P_IOA_Buffer];
r1 &= 0xffef
[P_IOA_Data] = r1;
pop r1 from [sp]
retf
.ENDP
.PUBLIC _set_a5;
_set_a5: .PROC
push r1 to [sp]
r1 = [P_IOA_Buffer];
r1 |= 0x0020
[P_IOA_Data] = r1;
pop r1 from [sp]
retf
.ENDP
.PUBLIC _clear_a5;
_clear_a5: .PROC
push r1 to [sp]
r1 = [P_IOA_Buffer]; //clear b6 output for sck
r1 &= 0xffdf
[P_IOA_Data] = r1;
pop r1 from [sp]
retf
.ENDP
.PUBLIC _set_a6;
_set_a6: .PROC
push r1 to [sp]
r1 = [P_IOA_Buffer]; //set b6 output for sck
r1 |= 0x0040
[P_IOA_Data] = r1;
pop r1 from [sp]
retf
.ENDP
.PUBLIC _clear_a6;
_clear_a6: .PROC
push r1 to [sp]
r1 = [P_IOA_Buffer]; //clear b6 output for sck
r1 &= 0xffbf
[P_IOA_Data] = r1;
pop r1 from [sp]
retf
.ENDP
.PUBLIC _set_a7;
_set_a7: .PROC
push r1 to [sp]
r1 = [P_IOA_Buffer]; //set b6 output for sck
r1 |= 0x0080
[P_IOA_Data] = r1;
pop r1 from [sp]
retf
.ENDP
.PUBLIC _clear_a7;
_clear_a7: .PROC
push r1 to [sp]
r1 = [P_IOA_Buffer]; //clear b6 output for sck
r1 &= 0xff7f
[P_IOA_Data] = r1;
pop r1 from [sp]
retf
.ENDP
.PUBLIC _set_a8;
_set_a8: .PROC
push r1 to [sp]
r1 = [P_IOA_Buffer];
r1 |= 0x0100
[P_IOA_Data] = r1;
pop r1 from [sp]
retf
.ENDP
.PUBLIC _clear_a8;
_clear_a8: .PROC
push r1 to [sp]
r1 = [P_IOA_Buffer];
r1 &= 0xfeff
[P_IOA_Data] = r1;
pop r1 from [sp]
retf
.ENDP
.PUBLIC _set_a9;
_set_a9: .PROC
push r1 to [sp]
r1 = [P_IOA_Buffer];
r1 |= 0x0200
[P_IOA_Data] = r1;
pop r1 from [sp]
retf
.ENDP
.PUBLIC _clear_a9;
_clear_a9: .PROC
push r1 to [sp]
r1 = [P_IOA_Buffer];
r1 &= 0xfDff
[P_IOA_Data] = r1;
pop r1 from [sp]
retf
.ENDP
.PUBLIC _set_a10;
_set_a10: .PROC
push r1 to [sp]
r1 = [P_IOA_Buffer];
r1 |= 0x0400
[P_IOA_Data] = r1;
pop r1 from [sp]
retf
.ENDP
.PUBLIC _clear_a10;
_clear_a10: .PROC
push r1 to [sp]
r1 = [P_IOA_Buffer];
r1 &= 0xfBff
[P_IOA_Data] = r1;
pop r1 from [sp]
retf
.ENDP
.PUBLIC _set_a11;
_set_a11: .PROC
push r1 to [sp]
r1 = [P_IOA_Buffer];
r1 |= 0x0800
[P_IOA_Data] = r1;
pop r1 from [sp]
retf
.ENDP
.PUBLIC _clear_a11;
_clear_a11: .PROC
push r1 to [sp]
r1 = [P_IOA_Buffer];
r1 &= 0xf7ff
[P_IOA_Data] = r1;
pop r1 from [sp]
retf
.ENDP
.PUBLIC _set_a12;
_set_a12: .PROC
push r1 to [sp]
r1 = [P_IOA_Buffer];
r1 |= 0x1000
[P_IOA_Data] = r1;
pop r1 from [sp]
retf
.ENDP
.PUBLIC _clear_a12;
_clear_a12: .PROC
push r1 to [sp]
r1 = [P_IOA_Buffer];
r1 &= 0xefff
[P_IOA_Data] = r1;
pop r1 from [sp]
retf
.ENDP
.PUBLIC _set_a13;
_set_a13: .PROC
push r1 to [sp]
r1 = [P_IOA_Buffer];
r1 |= 0x2000
[P_IOA_Data] = r1;
pop r1 from [sp]
retf
.ENDP
.PUBLIC _clear_a13;
_clear_a13: .PROC
push r1 to [sp]
r1 = [P_IOA_Buffer];
r1 &= 0xdfff
[P_IOA_Data] = r1;
pop r1 from [sp]
retf
.ENDP
.PUBLIC _set_a14;
_set_a14: .PROC
push r1 to [sp]
r1 = [P_IOA_Buffer];
r1 |= 0x4000
[P_IOA_Data] = r1;
pop r1 from [sp]
retf
.ENDP
.PUBLIC _clear_a14;
_clear_a14: .PROC
push r1 to [sp]
r1 = [P_IOA_Buffer];
r1 &= 0xbfff
[P_IOA_Data] = r1;
pop r1 from [sp]
retf
.ENDP
.PUBLIC _set_a15;
_set_a15: .PROC
push r1 to [sp]
r1 = [P_IOA_Buffer];
r1 |= 0x0400
[P_IOA_Data] = r1;
pop r1 from [sp]
retf
.ENDP
.PUBLIC _clear_a15;
_clear_a15: .PROC
push r1 to [sp]
r1 = [P_IOA_Buffer];
r1 &= 0xfBff
[P_IOA_Data] = r1;
pop r1 from [sp]
retf
.ENDP
//=========================================================================================
//////////////////以下是B口设置/////////////////////////////////////
//=========================================================================================
.PUBLIC _set_b0;
_set_b0: .PROC
push r1 to [sp]
r1 = [P_IOB_Buffer];
r1 |= 0x0001
[P_IOB_Data] = r1;
pop r1 from [sp]
retf
.ENDP
.PUBLIC _clear_b0;
_clear_b0: .PROC
push r1 to [sp]
r1 = [P_IOB_Buffer];
r1 &= 0xfffe
[P_IOB_Data] = r1;
pop r1 from [sp]
retf
.ENDP
.PUBLIC _set_b1;
_set_b1: .PROC
push r1 to [sp]
r1 = [P_IOB_Buffer];
r1 |= 0x0002
[P_IOB_Data] = r1;
pop r1 from [sp]
retf
.ENDP
.PUBLIC _clear_b1;
_clear_b1: .PROC
push r1 to [sp]
r1 = [P_IOB_Buffer];
r1 &= 0xfffd
[P_IOB_Data] = r1;
pop r1 from [sp]
retf
.ENDP
.PUBLIC _set_b2;
_set_b2: .PROC
push r1 to [sp]
r1 = [P_IOB_Buffer];
r1 |= 0x0004
[P_IOB_Data] = r1;
pop r1 from [sp]
retf
.ENDP
.PUBLIC _clear_b2;
_clear_b2: .PROC
push r1 to [sp]
r1 = [P_IOB_Buffer];
r1 &= 0xfffc
[P_IOB_Data] = r1;
pop r1 from [sp]
retf
.ENDP
.PUBLIC _set_b3;
_set_b3: .PROC
push r1 to [sp]
r1 = [P_IOB_Buffer];
r1 |= 0x0008
[P_IOB_Data] = r1;
pop r1 from [sp]
retf
.ENDP
.PUBLIC _clear_b3;
_clear_b3: .PROC
push r1 to [sp]
r1 = [P_IOB_Buffer]; //clear b6 output for sck
r1 &= 0xfff7
[P_IOB_Data] = r1;
pop r1 from [sp]
retf
.ENDP
.PUBLIC _set_b4;
_set_b4: .PROC
push r1 to [sp]
r1 = [P_IOB_Buffer]; //set b6 output for sck
r1 |= 0x0010
[P_IOB_Data] = r1;
pop r1 from [sp]
retf
.ENDP
.PUBLIC _clear_b4;
_clear_b4: .PROC
push r1 to [sp]
r1 = [P_IOB_Buffer]; //clear b6 output for sck
r1 &= 0xffef
[P_IOB_Data] = r1;
pop r1 from [sp]
retf
.ENDP
.PUBLIC _set_b5;
_set_b5: .PROC
push r1 to [sp]
r1 = [P_IOB_Buffer]; //set b6 output for sck
r1 |= 0x0020
[P_IOB_Data] = r1;
pop r1 from [sp]
retf
.ENDP
.PUBLIC _clear_b5;
_clear_b5: .PROC
push r1 to [sp]
r1 = [P_IOB_Buffer]; //clear b6 output for sck
r1 &= 0xffdf
[P_IOB_Data] = r1;
pop r1 from [sp]
retf
.ENDP
.PUBLIC _set_b6;
_set_b6: .PROC
push r1 to [sp]
r1 = [P_IOB_Buffer]; //set b6 output for sck
r1 |= 0x0040
[P_IOB_Data] = r1;
pop r1 from [sp]
retf
.ENDP
.PUBLIC _clear_b6;
_clear_b6: .PROC
push r1 to [sp]
r1 = [P_IOB_Buffer]; //clear b6 output for sck
r1 &= 0xffbf
[P_IOB_Data] = r1;
pop r1 from [sp]
retf
.ENDP
.PUBLIC _set_b7;
_set_b7: .PROC
push r1 to [sp]
r1 = [P_IOB_Buffer]; //set b6 output for sck
r1 |= 0x0080
[P_IOB_Data] = r1;
pop r1 from [sp]
retf
.ENDP
.PUBLIC _clear_b7;
_clear_b7: .PROC
push r1 to [sp]
r1 = [P_IOB_Buffer]; //clear b6 output for sck
r1 &= 0xff7f
[P_IOB_Data] = r1;
pop r1 from [sp]
retf
.ENDP
.PUBLIC _set_b8;
_set_b8: .PROC
push r1 to [sp]
r1 = [P_IOB_Buffer];
r1 |= 0x0100
[P_IOB_Data] = r1;
pop r1 from [sp]
retf
.ENDP
.PUBLIC _clear_b8;
_clear_b8: .PROC
push r1 to [sp]
r1 = [P_IOB_Buffer];
r1 &= 0xfeff
[P_IOB_Data] = r1;
pop r1 from [sp]
retf
.ENDP
.PUBLIC _set_b9;
_set_b9: .PROC
push r1 to [sp]
r1 = [P_IOB_Buffer];
r1 |= 0x0200
[P_IOB_Data] = r1;
pop r1 from [sp]
retf
.ENDP
.PUBLIC _clear_b9;
_clear_b9: .PROC
push r1 to [sp]
r1 = [P_IOB_Buffer];
r1 &= 0xfDff
[P_IOB_Data] = r1;
pop r1 from [sp]
retf
.ENDP
.PUBLIC _set_b10;
_set_b10: .PROC
push r1 to [sp]
r1 = [P_IOB_Buffer];
r1 |= 0x0400
[P_IOB_Data] = r1;
pop r1 from [sp]
retf
.ENDP
.PUBLIC _clear_b10;
_clear_b10: .PROC
push r1 to [sp]
r1 = [P_IOB_Buffer];
r1 &= 0xfBff
[P_IOB_Data] = r1;
pop r1 from [sp]
retf
.ENDP
.PUBLIC _set_b11;
_set_b11: .PROC
push r1 to [sp]
r1 = [P_IOB_Buffer];
r1 |= 0x0800
[P_IOB_Data] = r1;
pop r1 from [sp]
retf
.ENDP
.PUBLIC _clear_b11;
_clear_b11: .PROC
push r1 to [sp]
r1 = [P_IOB_Buffer];
r1 &= 0xf7ff
[P_IOB_Data] = r1;
pop r1 from [sp]
retf
.ENDP
.PUBLIC _set_b12;
_set_b12: .PROC
push r1 to [sp]
r1 = [P_IOB_Buffer];
r1 |= 0x1000
[P_IOB_Data] = r1;
pop r1 from [sp]
retf
.ENDP
.PUBLIC _clear_b12;
_clear_b12: .PROC
push r1 to [sp]
r1 = [P_IOB_Buffer];
r1 &= 0xefff
[P_IOB_Data] = r1;
pop r1 from [sp]
retf
.ENDP
.PUBLIC _set_b13;
_set_b13: .PROC
push r1 to [sp]
r1 = [P_IOB_Buffer];
r1 |= 0x2000
[P_IOB_Data] = r1;
pop r1 from [sp]
retf
.ENDP
.PUBLIC _clear_b13;
_clear_b13: .PROC
push r1 to [sp]
r1 = [P_IOB_Buffer];
r1 &= 0xdfff
[P_IOB_Data] = r1;
pop r1 from [sp]
retf
.ENDP
.PUBLIC _set_b14;
_set_b14: .PROC
push r1 to [sp]
r1 = [P_IOB_Buffer];
r1 |= 0x4000
[P_IOB_Data] = r1;
pop r1 from [sp]
retf
.ENDP
.PUBLIC _clear_b14;
_clear_b14: .PROC
push r1 to [sp]
r1 = [P_IOB_Buffer];
r1 &= 0xbfff
[P_IOB_Data] = r1;
pop r1 from [sp]
retf
.ENDP
.PUBLIC _set_b15;
_set_b15: .PROC
push r1 to [sp]
r1 = [P_IOB_Buffer];
r1 |= 0x8000
[P_IOB_Data] = r1;
pop r1 from [sp]
retf
.ENDP
.PUBLIC _clear_b15;
_clear_b15: .PROC
push r1 to [sp]
r1 = [P_IOB_Buffer];
r1 &= 0x7fff
[P_IOB_Data] = r1;
pop r1 from [sp]
retf
.ENDP
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -