亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? 196npa.cod

?? mcs51,2051,x86系列MCU
?? COD
?? 第 1 頁 / 共 4 頁
字號:
DIRECTION_T1_OVFL  set    010h
QUADRATURE_CLOCK   set    038h
DIVIDE_BY_1        set    000h
DIVIDE_BY_2        set    001h
DIVIDE_BY_4        set    002h
DIVIDE_BY_8        set    003h
DIVIDE_BY_16       set    004h
DIVIDE_BY_32       set    005h
DIVIDE_BY_64       set    006h
$$ifp$80c196nu
DIVIDE_BY_128      set    007h
$$end$
cseg

; Configure Timer @@TIMER_NUMBER@
$$if$ TIME_CON.7
;    - Enable timer @@TIMER_NUMBER@
$$end$
$$ifn$ TIME_CON.4
;    - Counting direction = $%TTIME_CON.6$up$down$
$$end$
$$ifn$ TIME_CON.3 |! TIME_CON.4 |! TIME_CON.5
;    - Clock source = $%7TIME_CON.3-5$XTAL/4$TxCLK$XTAL/4$TxCLK$TxCLK$Timer 1 Overflow$Timer 1 Overflow$
$$end$
$$if$  TIME_CON.3 && TIME_CON.4 && TIME_CON.5
;    - Clock mode = Quadrature Clocking
$$end$
$$ifn$ TIME_CON.3 |! TIME_CON.4 |! TIME_CON.5
;    - Counting Direction Source = $%7TIME_CON.3-5$UD bit$UD bit$TxDIR$TxDIR$UD bit$UD bit$same as timer 1$
$$end$
$$ifn$ TIME_CON.3 |! TIME_CON.4 |! TIME_CON.5
;    - Prescale = divide_by_$%8TIME_CON.0-2$1$2$4$8$16$32$64$128$
$$end$

init_timer@@TIMER_NUMBER@:
     ldb  wsr, #1fh   ;  select 128byte window @ 1f80h
     ld   t@@TIMER_NUMBER@control_1F, #0$$TIME_CON$h
$$if$ TIME_CON.5 && TIME_CON.4 && TIME_CON.3
     ;*  enable the pins to inputs  *

     orb  p1_dir_1F, #$%3TIMER_NUMBER$$30h$0C0h$; 
     orb  p1_mode_1F, #$%3TIMER_NUMBER$$30h$0C0h$; 
$$end$
$$else$
     $$if$ TIME_CON.4
     ;*  enable the direction pin to input  *
     orb  p1_dir_1F, #$%3TIMER_NUMBER$$20h$080h$; 
     orb  p1_mode_1F, #$%3TIMER_NUMBER$$20h$080h$; 
     $$end$
     $$if$  TIME_CON.3
     ;*  enable the clock pin to input  *
     orb  p1_dir_1F, #$%3TIMER_NUMBER$$10h$040h$; 
     orb  p1_mode_1F, #$%3TIMER_NUMBER$$10h$040h$; 
     $$end$
$$end$

$$if$ TIMER_INTERRUPT
     orb  int_mask, #$%XTIMER_NUMBER$ 
$$end$
     ret
$$ifn$ TIME_CON.3-5

; delay@@TIMER_NUMBER@:
;     routine to delay at least (Xtal * 4 * ($$TIME_CON.0-2$+1)) * 'time'
;     units of time.

delay@@TIMER_NUMBER@:
     ld   tmpreg0+2, 4[sp]
     ld   tmpreg0, timer@@TIMER_NUMBER@[0]       ;load start time
read_timer@@TIMER_NUMBER@_again:
     ld   tmpreg0+4, timer@@TIMER_NUMBER@[0]     ;read current time
     sub  tmpreg0+4, tmpreg0       ;calculate elapsed time
     cmp  tmpreg0+4, tmpreg0       ;is elapsed > parameter
     bnc  read_timer@@TIMER_NUMBER@_again
     ret
$$end$

$$if$ TIME_CON.5 && TIME_CON.4 && TIME_CON.3
     rseg
speed:    dsw 1

$$end$
cseg at 0ff2080h
main_timer@@TIMER_NUMBER@:
     ld   sp, #STACK
     call init_timer@@TIMER_NUMBER@

; If the EPA unit is to be used with the timers, then the init
; EPA code should be called.

$$if$ TIMER_INTERRUPT
     ei                            ;globally enable interrupts
$$end$
$$if$ (TIME_CON.3-5 == 7)

; In Quadrature clocking mode, reading the timer@@TIMER_NUMBER@
; at fixed intervals of time can give speed and
; direction.  example:

     ld   tmpreg0, timer@@TIMER_NUMBER@[0]
     push tmpreg0        ; save time value

     ; User's routine to delay some time
     ;    push #10h                ;some amount of time

     ;    call delay@@TIMER_NUMBER@   ;routine to delay 10 timer ticks
     ;    add  sp, #2              ;clear stack

     ld   speed,  timer@@TIMER_NUMBER@[0]
     pop  tmpreg0
     sub  speed, tmpreg0

; Speed now contains direction and magnitude of the quadrature
; clocked device.
$$end$

$$if$ (TIME_CON.3-5 <> 7)
; The timer@@TIMER_NUMBER@ can now be used by the EPA or read at any time to
; obtain information on counting speed and or direction.

$$end$
     ret
$$if$ TIMER_INTERRUPT
cseg at 0ff200$%XTIMER_NUMBER - 1 * 2$h
timer$$TIMER_NUMBER$_isr_vector:  dcw  LSW  timer$$TIMER_NUMBER$_isr

cseg
timer$$TIMER_NUMBER$_isr:
     pusha
;  User's code to handle a timer overflow.
     popa
     ret
$$end$
end
##80C196NP Serial#
##80C196NU Serial#
$$ifp$80c196np
$model(NP)
$include (80C196NP.INC)
$$end$
$$ifp$80c196nu
$model(NU)
$include (80C196NU.INC)
$$end$
SP_MODE0           set        000h
SP_MODE1           set        001h
SP_MODE2           set        002h
SP_MODE3           set        003h
REC_ENABLE         set        008h
REC_DISABLE        set        000h
EVEN_PARITY        set        008h
ODD_PARITY         set        028h
NO_PARITY          set        000h
$$ifp$80c196nu
CLK_PRESCAL_ENAB   set        040h
CLK_PRESCAL_DISAB  set        000h
$$end$
SET_BIT_8          set        010h
SP_INTERNAL_CLK    set      08000h
SP_EXTERNAL_CLK    set      00000h
TXD_INTERRUPT      set        020h
RXD_INTERRUPT      set        040h
TI_BIT             set        005h
RI_BIT             set        006h
FE_BIT             set        004h
OE_BIT             set        002h
RPE_BIT            set        007h
RB8_BIT            set        007h
TXE_BIT            set        003h

rseg
sp_status_image:      dsb  1

$$ifn$ INT_MASK.6 |! INT_MASK.5
     $$ifn$ INT_MASK.5 && P2_MODE.0
cseg
putchar:
     clr_bit sp_status_image, TXE_BIT
check_TXE_ready:
     orb   sp_status_image, sp_status[0]
     jbc   sp_status_image, TXE_BIT, check_TXE_ready
     clr_bit sp_status_image, TXE_BIT
          $$if$ SP_CON.4

; If bit 8 needs to be set, then the following line needs to
; be inserted:
;    ldb   tmpreg0, sp_con[0]
;    orb   tmpreg0, #SET_BIT_8
;    stb   tmpreg0, sp_con[0]

          $$end$
     ld    tmpreg0, 4[sp]
     stb   tmpreg0, sbuf_tx[0]
     ret
     $$end$
     $$ifn$ INT_MASK.6 && P2_MODE.1
cseg
getchar:
     ldb   sp_status_image, sp_status[0]
     jbc   sp_status_image, RI_BIT, getchar
     jbc   sp_status_image, FE_BIT, no_frame_error

     ; User code for framing error

     CLR_BIT_REG sp_status_image, FE_BIT
no_frame_error:
     jbc   sp_status_image, OE_BIT, no_overrun_error

     ; User code for overrun error

     CLR_BIT_REG sp_status_image, OE_BIT 
no_overrun_error:
          $$if$ SP_CON.2
     jbc   sp_status_image, RPE_BIT, no_parity_error

     ; User code for Parity error

     CLR_BIT_REG sp_status_image, RPE_BIT 
no_parity_error:
          $$end$
          $$if$ SP_CON.4
     jbc   sp_status_image, RB8_BIT, no_8th_bit

     ; User code for Receiving BIT 8

     CLR_BIT_REG sp_status_image, RB8_BIT
no_8th_bit:
          $$end$
     ldbze tmpreg0, sbuf_rx[0]
     ret
     $$end$
$$end$
$$if$ INT_MASK.5-6
     $$if$ INT_MASK1.6

cseg at 0FF2038h
rx_vector:     dcw  LSW receive
     $$end$
     $$if$ INT_MASK1.5

cseg at 0FF2036h
tx_vector:     dcw  LSW transmit
     $$end$

     $$if$ INT_MASK.5
TRANSMIT_BUF_SIZE   set  20
     $$end$
     $$if$ INT_MASK.6
RECEIVE_BUF_SIZE    set  20
     $$end$
     $$if$ INT_MASK.5

; transmit buffer and it's indexes

dseg
trans_buff:    dsb  TRANSMIT_BUF_SIZE

rseg
begin_trans_buff:   dsb  1
end_trans_buff:     dsb  1
     $$end$
     $$if$ INT_MASK.6

; receive buffer and it's indexes

dseg
receive_buff:  dsb  RECEIVE_BUF_SIZE

rseg
end_rec_buff:       dsw 1
begin_rec_buff:     dsw 1
     $$end$

cseg
     $$if$ INT_MASK.5

transmit:                            ;serial interrupt routine
     pusha
     push  tmpreg0

; image sp_status into sp_status_image

     ldb   sp_status_image, sp_status[0]

; transmitt a character if there is a character in the buffer
; else leave TI_BIT set in image for putchar to enable interrupts

     cmpb  begin_trans_buff,  end_trans_buff
     je    no_char_to_send
          $$if$ SP_CON.4

; If bit 8 needs to be set, then the following line needs to
; be inserted:
;     SET_BIT  sp_con, SET_BIT_8

          $$end$
     ldbze tmpreg0, begin_trans_buff
     ldb   tmpreg0, trans_buff[tmpreg0]
     incb  begin_trans_buff
     stb   tmpreg0, sbuf_tx[0]               ;tranmit character

; The next statement makes the buffer circular by starting over when the
; index reaches the end of the buffer.

     cmpb  begin_trans_buff, #TRANSMIT_BUF_SIZE-1
     bnh   not_at_end_of_buffer
     clrb  begin_trans_buff
not_at_end_of_buffer:
     CLR_BIT sp_status_image,TI_BIT         ;clear TI bit in sp_status_image.
no_char_to_send:
     pop   tmpreg0
     popa
     ret

putchar:

; Remain in loop while the buffer is full.  This is done by checking
; the end of buffer index to make sure it does not overrun the
; beginning of buffer index. The while instruction checks the case
; when the end index is one less then the beginning index and at the
; end of the buffer when the beginning index may be equal to 0 and
; the end buffer index may be at the buffer end.

wait_for_buffer_ready:
     addb  tmpreg0, end_trans_buff, #1
     cmpb  tmpreg0, begin_trans_buff
     je    wait_for_buffer_ready
     cmpb  end_trans_buff, #TRANSMIT_BUF_SIZE-1
     jne   ready_to_send
     cmpb  begin_trans_buff, zero_reg
     je    wait_for_buffer_ready
ready_to_send:
     ldb   tmpreg0, 4[sp]

; put character in buffer

     ldbze tmpreg0+2, end_trans_buff
     stb   tmpreg0, trans_buff[tmpreg0 + 2]
     incb  end_trans_buff

; make buffer circular.

     cmpb  end_trans_buff, #TRANSMIT_BUF_SIZE - 1
     bnh   not_at_end_of_buffer2
     clrb  end_trans_buff
not_at_end_of_buffer2:
     jbc   sp_status_image, TI_BIT, dont_set_interrupt

; if transmitt buffer was empty, then cause an interrupt
; to start transmitting.

     orb   int_pend1, #TXD_INTERRUPT  
dont_set_interrupt:
     ret
     $$end$
     $$if$ INT_MASK.6

receive:                              ;serial interrupt routine
     pusha
     push  tmpreg0                    ;image sp_status into sp_status_image
     ldb   sp_status_image, sp_status[0]

; If the input buffer is full, the last character can be handled
; as desired.

     add   tmpreg0, end_rec_buff, #1
     cmp   tmpreg0, begin_rec_buff
     je    handle_overrun
     cmp   end_rec_buff, #RECEIVE_BUF_SIZE-1
     jne   ready_to_receive
     cmpb  begin_rec_buff, zero_reg
     jne   ready_to_receive           ;not 0 so okay to receive
handle_overrun:                       ;input overrun code
    
ready_to_receive:

; The next statement makes the buffer circular by starting over when the
; index reaches the end of the buffer.

     inc   end_rec_buff

; Make a circular buffer.

     cmp   end_rec_buff, #RECEIVE_BUF_SIZE - 1
     bnh   not_at_end_rec_buffer
     clr   end_rec_buff
not_at_end_rec_buffer:
     ldb  tmpreg0, sbuf_rx[0]
     stb  tmpreg0, receive_buff[end_rec_buff]

; Check for errors.

     jbc  sp_status_image, FE_BIT, no_frame_error

     ; User code for framing error

     CLR_BIT_REG sp_status_image, FE_BIT     
no_frame_error:
     jbc  sp_status_image, OE_BIT, no_overrun_error

     ; User code for overrun error

     CLR_BIT_REG sp_status_image, OE_BIT 
no_overrun_error:
     $$if$ SP_CON.2
     jbc  sp_status_image, RPE_BIT, no_parity_error

     ; User code for Parity error

     CLR_BIT_REG sp_status_image, RPE_BIT 
no_parity_error:
     $$end$
     $$if$ SP_CON.4
     jbc  sp_status_image, RB8_BIT, no_8th_bit

     ; User code for Receiving BIT 8

     CLR_BIT_REG sp_status_image, RB8_BIT
no_8th_bit:
     $$end$
 CLR_BIT_REG sp_status_image,RI_BIT     ;clear RI bit in sp_status_image.
     pop  tmpreg0
     popa
     ret

getchar:
     cmp  begin_rec_buff, end_rec_buff
     je   getchar
     inc  begin_rec_buff
     cmp  begin_rec_buff, #RECEIVE_BUF_SIZE - 1
     bne  not_at_end_rec_buf2

; Make buffer circular.

     clr  begin_rec_buff

; Return the character in buffer.

not_at_end_rec_buf2:
     ldb  tmpreg0,  receive_buff[begin_rec_buff]
     ret
     $$end$
$$end$

cseg
init_serial:
     ldb  tmpreg0, #0$$SP_CON$h
     stb  tmpreg0, sp_con[0]

     ld   tmpreg0, #0$$SP_BAUD$h
     st   tmpreg0, sp_baud[0]
$$if$ P2_MODE.0

 SET_BIT p2_reg,0            ;init txd pin output
 CLR_BIT p2_dir,0            ;make txd pin output
 SET_BIT p2_mode,0           ;enable txd mode on p2.0
$$end$
$$if$ P2_MODE.1

 SET_BIT p2_reg,1            ;init rxd pin input
 SET_BIT p2_dir,1            ;make rxd pin input
 SET_BIT p2_mode,1           ;enable rxd mode on p2.1
$$end$
$$ifn$  SP_BAUD.15

 SET_BIT p6_reg,2            ;init t1clk pin input
 SET_BIT p6_dir,2            ;make t1clk pin input
$$end$

$$if$ INT_MASK.5-6
     orb int_mask, #$%TINT_MASK.5$TXD_INTERRUPT +$$$%TINT_MASK.6$ RXD_INTERRUPT$0$;
     $$if$  INT_MASK.6
     clr   end_rec_buff      ;init buffer pointers
     clr   begin_rec_buff
     $$end$
     $$if$  INT_MASK.5
     clrb end_trans_buff
     clrb begin_trans_buff
     $$end$
$$end$
     clrb  sp_status_image
     ret

cseg at 0ff2080h
main_serial:
     ld   sp, #STACK
     call init_serial
$$if$ INT_MASK.5-6
     ei                          ;global interrupt enable
     $$if$ INT_MASK.6

; The following lines will loop until the letter 'Q' is
; received.

look_for_Q:
     call getchar
     cmpb tmpreg0, #'Q'
     jne  look_for_Q
     $$end$
     $$if$ INT_MASK.5

; The following line is used to initialize putchar routine,
; so that the first time putchar is called it will send the
; character.

 SET_BIT_REG int_pend1, 3           ;set the TXD interrupt bit
 SET_BIT  sp_status_image, TI_BIT

; Example of sending out buffered data.

     push #'H'                      ;example sequence to send 'Hello'
     call putchar
     add  sp, #2
     push #'e'
     call putchar
     add  sp, #2
     push #'l'
     call putchar
     add  sp, #2
     push #'l'
     call putchar
     add  sp, #2
     push #'o'
     call putchar
     add  sp, #2
     $$end$
     br   $
$$end$
$$ifn$ INT_MASK.5-6
     $$if$ P2_MODE.0 && P2_MODE.1
do_forever:
     call getchar
     push tmpreg0
     call putchar
     add  sp, #2
     br   do_forever                ;transmitt the character received
     $$end$

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
韩国成人福利片在线播放| 《视频一区视频二区| 中文字幕不卡在线| 精品在线亚洲视频| 正在播放一区二区| 亚洲第一福利视频在线| 91福利小视频| 一区二区三区四区视频精品免费 | 91在线视频官网| 国产精品久久久久aaaa樱花| 东方aⅴ免费观看久久av| 久久精品亚洲精品国产欧美kt∨| 美女精品自拍一二三四| 欧美日韩国产成人在线免费| 最好看的中文字幕久久| 91美女片黄在线观看91美女| 亚洲女人****多毛耸耸8| 91精彩视频在线观看| 一区二区三区影院| 3d动漫精品啪啪1区2区免费| 日韩激情视频在线观看| 精品日韩一区二区三区| 国产精品乡下勾搭老头1| 中文欧美字幕免费| 风间由美中文字幕在线看视频国产欧美| 久久婷婷综合激情| 成人激情免费网站| 欧美国产综合色视频| 国产成人综合精品三级| 1000精品久久久久久久久| 日本道免费精品一区二区三区| 亚洲最新视频在线观看| 日韩限制级电影在线观看| 理论电影国产精品| 欧美第一区第二区| 国产一区二区调教| 国产精品久久久久婷婷| 欧美日韩国产区一| 国内精品自线一区二区三区视频| 国产精品午夜春色av| 91极品美女在线| 久久精品国产秦先生| 国产精品的网站| 欧美日韩精品福利| 成人免费看片app下载| 亚洲国产另类av| 欧美一区二区国产| 九九九久久久精品| 欧美日韩一区二区三区高清 | 麻豆精品新av中文字幕| 在线播放91灌醉迷j高跟美女| 国产jizzjizz一区二区| 一区二区三区不卡视频在线观看 | 五月激情六月综合| 国产精品福利在线播放| 91精品国产福利| 欧美系列亚洲系列| 国产高清精品久久久久| 欧美精品一区在线观看| 成人综合在线网站| 精品国产伦一区二区三区免费| 中文字幕一区二区三区在线观看| 国产成人午夜视频| 亚洲乱码国产乱码精品精可以看| 91视频一区二区三区| 亚洲激情在线激情| 欧美日韩免费观看一区三区| 视频一区中文字幕国产| 精品日韩一区二区三区| 国产成人在线观看免费网站| 亚洲精选视频在线| 欧美电影影音先锋| 成人av资源站| 极品美女销魂一区二区三区| 亚洲色图一区二区| 久久久久久99久久久精品网站| 91在线观看成人| 免费观看日韩电影| 一区二区三区在线看| 欧美电视剧在线看免费| 在线亚洲欧美专区二区| 国产精品77777| 亚洲香肠在线观看| 久久久久久电影| 日韩欧美国产精品一区| 波多野结衣中文一区| 男女性色大片免费观看一区二区| 精品国产免费一区二区三区四区| 欧美综合色免费| 粉嫩av一区二区三区粉嫩| 国产在线不卡视频| 精品一二三四在线| 一个色妞综合视频在线观看| 国产无一区二区| 日本一区二区三级电影在线观看| 欧美成人性战久久| 精品国内片67194| 欧美本精品男人aⅴ天堂| 欧美一区二区三区视频在线| 日本高清不卡在线观看| 日韩欧美国产电影| 中文字幕一区在线| 麻豆传媒一区二区三区| 国产999精品久久久久久绿帽| 成人av电影观看| 久久久久久一级片| 日韩中文字幕区一区有砖一区| 91一区一区三区| 久久久久久久精| 精品一区二区在线播放| 欧美一区二区三区播放老司机| 亚洲国产精品激情在线观看| 日韩精品午夜视频| 91在线观看一区二区| 欧美国产乱子伦 | 久久免费视频色| 男人的j进女人的j一区| 日韩欧美国产系列| 久久se这里有精品| 国产精品蜜臀在线观看| 不卡av免费在线观看| 亚洲视频精选在线| 欧美在线观看18| 一区二区三区中文字幕在线观看| 色欧美片视频在线观看| 亚洲宅男天堂在线观看无病毒| 成人小视频免费观看| 亚洲欧美经典视频| 欧美一区二区美女| 波多野结衣欧美| 一区二区欧美精品| 欧美成人猛片aaaaaaa| 国产东北露脸精品视频| 综合分类小说区另类春色亚洲小说欧美| 国产精品18久久久久久久网站| 国产精品剧情在线亚洲| 色哟哟一区二区| 国产自产2019最新不卡| 亚洲精品中文在线观看| 日韩欧美一区中文| 91在线观看成人| 黑人巨大精品欧美黑白配亚洲| 最新中文字幕一区二区三区| 欧美日韩国产不卡| 99精品欧美一区| 国产成人亚洲精品狼色在线| 亚洲午夜久久久久久久久久久| 日韩免费成人网| 欧美揉bbbbb揉bbbbb| 成人av影视在线观看| 精品一区在线看| 三级在线观看一区二区| 国产精品久久午夜夜伦鲁鲁| 欧美大白屁股肥臀xxxxxx| 精品视频1区2区3区| 国产一区二区不卡| 亚洲特级片在线| 久久久91精品国产一区二区精品 | 国产性天天综合网| 91精品一区二区三区久久久久久| 91福利国产成人精品照片| 不卡在线观看av| gogogo免费视频观看亚洲一| 成人av电影免费在线播放| av不卡一区二区三区| 日本韩国视频一区二区| 欧美zozozo| 一区二区三区毛片| 久久99国内精品| 欧美在线视频日韩| 国产欧美在线观看一区| 亚洲在线观看免费视频| 国产精品99久久久久久久女警| 91色婷婷久久久久合中文| 91麻豆国产在线观看| 欧美精品成人一区二区三区四区| 欧美日韩一区二区三区不卡 | 欧美午夜片在线看| 色婷婷综合五月| 国产精品国产三级国产专播品爱网 | 91麻豆精品国产无毒不卡在线观看| 亚洲综合区在线| 欧美日韩激情在线| 欧美另类高清zo欧美| 在线观看亚洲一区| 不卡在线视频中文字幕| 国产自产2019最新不卡| 91传媒视频在线播放| 777久久久精品| 亚洲狠狠丁香婷婷综合久久久| 日韩电影免费在线观看网站| 99久久99久久免费精品蜜臀| 欧美成人video| 日日夜夜精品视频天天综合网| 91美女视频网站| 一区二区在线看| 91碰在线视频| 亚洲一区二区三区四区中文字幕| 成人av在线播放网站| 国产欧美日韩视频在线观看|