led_ia.asm

来自「本光盘提供了 嵌入式系统一些通用模块源代码」· 汇编 代码 · 共 50 行

ASM
50
字号
;********************************************************************************************************
;                                    Embedded Systems Building Blocks
;                                 Complete and Ready-to-Use Modules in C
;
;                                     Multiplexed LED Display Driver
;                                            LED Multiplex ISR
;                                        Intel 80x86 (LARGE MODEL)
;
;                            (c) Copyright 1999, Jean J. Labrosse, Weston, FL
;                                          All Rights Reserved
;
; File : LED_IA.ASM
; By   : Jean J. Labrosse
;********************************************************************************************************

            PUBLIC _DispMuxISR

            EXTRN  _DispMuxHandler:FAR
            EXTRN  _OSIntExit:FAR
            EXTRN  _OSIntNesting:BYTE

.MODEL      LARGE
.CODE
.186

;*********************************************************************************************************
;                          OUTPUT NEXT SEGMENTS PATTERN TO LED DISPLAY MATRIX
;                                         void DispMuxISR(void)
;*********************************************************************************************************

_DispMuxISR PROC FAR
;
            PUSHA                                ;Save processor's context
            PUSH   ES
            PUSH   DS
;
            INC    BYTE PTR _OSIntNesting        ; Notify uC/OS-II of ISR
            CALL   FAR  PTR _DispMuxHandler      ; Call C routine to handle multiplexing
            CALL   FAR  PTR _OSIntExit           ; Exit through uC/OS-II scheduler
;
            POP    DS                            ;Restore processor's context
            POP    ES
            POPA
;
            IRET                                 ;Return to interrupted code
;
_DispMuxISR ENDP

            END

⌨️ 快捷键说明

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