st870.mac

来自「一个桥接器87ch47仿真器的c的源程序」· MAC 代码 · 共 29 行

MAC
29
字号
module st870
extern  medium _main            ;Defined in "MAIN.C"
StartUp     section     code    abs=0xc000
    public  __startup           ; Used in "MAIN.C"
__startup:

    di                          ; For disable interrupt
                                ; before setting SP
    ld      SP,0x23f            ; Initialize Stack Pointer

    ldw     (0x34),0x0B101      ; For Stop the Watchdog Timer
    ld      (0x38), 0x00        ; SYSCR1 = 0x00;
    ld      (0x39), 0x80        ; SYSCR2 = 0x80;




    ld      hl,0x48             ; Loading the top of RAM address
    ld      bc,0x1f0            ; Loading the size of RAM
ram_clear:
    clr     (hl)                ; 0 clear of RAM
    inc     hl                  ; Increment of pointer to RAM
    dec     bc                  ; Decrement of loop counter
    j       f,ram_clear         ; Loop until loop counter is 0.

    j       _main               ; Jump to main function in "MAIN.C"

    end

⌨️ 快捷键说明

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