system.asm
来自「spce061单片机的一些程序!C语言和汇编语言都有」· 汇编 代码 · 共 45 行
ASM
45 行
//////////////////////////////////////////////////////////////////
// Function: System commander
// Service for H/W, keyboard scan
// Input: None
// Output: None
// Functions:
// (In Assembly view)
// call F_System_Initial;
// (In C language view)
// System_Initial();
//////////////////////////////////////////////////////////////////
.include hardware.inc;
.include key.inc;
.CODE
.public _System_Initial;
.public F_System_Initial;
_System_Initial:
F_System_Initial:
call F_Key_Scan_Initial; // For keyboard scan
retf
//****************************************************************
// Function: Main Loop of system
// Input: None
// Output: None
// Using:
// call F_System_ServiceLoop; (in assembly domain)
// System_ServiceLoop(); (in C domain)
//****************************************************************
.public _System_ServiceLoop;
.public F_System_ServiceLoop;
_System_ServiceLoop:
F_System_ServiceLoop:
push r1 to [sp]
call F_Key_DebounceCnt_Down; // calling debounce subroutine for key scan subroutine
call F_Key_Scan_ServiceLoop; // calling key scan subroutine
R1 = 0x0001; // Clear watch dog
[P_Watchdog_Clear] = R1; //
pop r1 from [sp]
retf;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?