⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 delay.asm

📁 凌阳unsp
💻 ASM
字号:
.INCLUDE hardware.inc


.code
.public _delay
_delay: .proc
    r1+=1;
    nop
    nop
    nop
    nop
    nop
    nop
    call ClearWatchDog
    retf;
    .endp

.public _SerialInit
_SerialInit: .proc
		R1=0x0480
	[P_IOB_Attrib]=R1
	R1=0x0400
	[P_IOB_Dir]=R1
	call ClearWatchDog
	R1=0x006b
	[P_UART_BaudScalarLow]=R1
	R1=0x00
	[P_UART_BaudScalarHigh]=R1
    R1=0x0000
    [P_UART_Command1]=R1
    R1=0x00c0
    [P_UART_Command2]=R1
    retf
    .endp

.public _Output
_Output: .proc
  //  INT OFF
    
	bp=sp
	R1=[bp+3]
	R2=[bp+4]
TxRDY:
    call ClearWatchDog
	R4=[P_UART_Command2]
	r4&=0x0040
	JZ TxRDY
	R3=[R1]
	[P_UART_Data]=R3
	R1+=1
	R2-=1
	JNZ TxRDY
	INT FIQ
	INT IRQ
	retf
    .endp
	
.code
.public _ClearWatchDog
.public ClearWatchDog
_ClearWatchDog: .proc
ClearWatchDog:
 push R1,R5 to [SP]
 R1 = 0x0001
 [0x7012] = R1
  pop R1,R5 from [SP]
 retf
.endp
	

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -