system.asm
来自「spce061单片机的一些程序!C语言和汇编语言都有」· 汇编 代码 · 共 61 行
ASM
61 行
//////////////////////////////////////////////////////////////////
// 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 resource.inc;
.INCLUDE key.inc;
.PUBLIC R_SpeechType;
.RAM
.VAR R_SpeechType;
.CODE
.PUBLIC _System_Initial;
.PUBLIC F_System_Initial;
_System_Initial: .PROC
F_System_Initial:
//push BP,BP to [SP]; //add if some parameters in
//BP = SP + 1;
//r1 = [BP+3];
//r2 = [BP+4];
call F_Key_Scan_Initial; // For keyboard scan
// Add other general initialization here
//r1 =0x0001; // return value
//pop BP,BP from [SP];
retf;
.ENDP;
//****************************************************************
// 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: .PROC
F_System_ServiceLoop:
call F_Key_DebounceCnt_Down; // calling debounce subroutine for key scan subroutine
call F_Key_Scan_ServiceLoop; // calling key scan subroutine
// Add other general service functions here
//R1=0x0001; // Clear watch dog
// [P_Watchdog_Clear]=R1; //
retf;
.ENDP;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?