************************************************
* FileName: ex9.asm *
* Description: 直流伺服电机定速控制实验 *
* Copyright(C) SanZhi Electronic, Author Zpin *
************************************************
.title "ex9"
.global _c_int00
.mmregs
DJ_ADDR .set 0b007h
VOL_POS .SET 0100H
VOL_NEG .SET 0200H
VOL_Z .SET 0000H
DIRECT .set 61h
RATIO_Z .set 62h
RATIO_K .set 63h
DJ_VOL .set 64h
DJ_STATUS .set 65h
.sect ".vectors"
reset: B _c_int00
NOP
NOP
.space 4*127
.text
_c_int00:
LD #0h,DP
STM #3000h,SP
SSBX INTM
RSBX SXM
STM #07FFFh,SWWSR
stm #0001h,2Bh
ST #0h,CLKMD
tst BITF CLKMD,#1h
BC t