📄 self_test.med
字号:
Copyright(C) TOSHIBA CORPORATION 1987-2003 All rights reserved
Mon Jul 09 16:03:00 2007
Toshiba Unified Macro processor (32) V1.0o [Page 1]
Runtime option : -T870C -l -I D:\yuanyy\5514T\5514T_TOSHIBA.BLD\USER\SOURCE -lf Self_test.med -$ -o C:\DOCUME~1\YUANYU~1\LOCALS~1\Temp\TAa03100 D:\yuanyy\5514T\5514T_TOSHIBA.BLD\USER\SOURCE\Self_test.mac
Line Source Statement
1 $nolist
2 ;*******************************************************************************
3 ;*******************************************************************************
4 ;* *
5 ;* (C)Copyright, CLOVER China Electronics Co.,LTD. *
6 ;* All Rigits Reserved *
7 ;* add:No.58-F Yang Dong Road, LuoFeng Demonstrative Zone Suzhou, China *
8 ;* Tel: 0512-67261886 Fax:0512-67261882 *
9 ;* http://www.clover.co.jp *
10 ;* *
11 ;*******************************************************************************
12 ;*******************************************************************************
13 ;
14 ; OILIVETTI summa20 source program
15 ; CPU: TOSHIBA TLC-870/C series TMP86CM74A
16 ; RAM: 2Kbytes(0040h - 083Fh)
17 ; ROM: 32Kbytes(8000h - FFFFh)
18 ;
19 ;Sub routines
=1 22 ;External symbol definition for RAM
=1 23 ;SFR................
=1 24 extern small P0DR,P1DR,P2DR,P3DR,P4DR,P5DR,P6DR,P7DR,P8DR,P9DR
=1 25 extern small P0CR,P1OUTCR,P4CR1,P5CR
=1 26 extern small ADCCR1,ADCCR2
=1 27 extern small TC3DRA,TC3DRB,TC3CR,TC2CR,TC4CR,P1PRD,P2PRD,P3PRD,TC4DR
=1 28 extern small SIOCR1,SIOCR2,SIOSR,SIOBUF,PDDR
=1 29 ;---------0020h
=1 30 extern small TC1DRAL,TC1DRAH,TC1DRBL,TC1DRBH,TC2DRL,TC2DRH
=1 31 extern small ADCDR2,ADCDR1,P4CR2,TC3SEL,VFTCR1,VFTCR2,VFTCR3,VFTSR
=1 32 ;---------0031h
=1 33 extern small STOPCR,TC1CR,WDTCR1,WDTCR2
=1 34 extern small TBTCR,EINTCR,SYSCR1,SYSCR2,EIRL,EIRH,ILL,ILH,INTSEL,PSTW
=1 35 ;port assignment
=1 36 extern small STB2,STB1,LAT;EP_DIO,EP_SK,EP_CS
=1 37 extern small IO_PF
=1 38 extern small IO_CHR
=1 39 extern small IO_MT,ENA2,ENA1,IN1,IN2
=1 40 extern small SLID_RT0,SLID_RT1,SLID_RT2,SLID_RT3
=1 41 extern small G1,G2,G3,G4,G5,G6,G7,G8
=1 42 extern small G9,G10,G11,G12,G13,G14,G15,SEG_dp
=1 43 extern small SEGMENT
=1 44 extern small SEG_g,SEG_f,SEG_e,SEG_d,SEG_c,SEG_b,SEG_a,SEG_COM,SEG_M,SEG_MIN,SEG_E
=1 45
=1 46 ;RAM (40-FFh).........
=1 47 extern small W1,W2,W3,TENKEY,DISP,ACC,CONST,COST,SELL,MARG,IC_A
=1 48 extern small FLG_1,FLG_E,FLG_C,FLG_K
=1 49 extern small RP_TIM,TPSC,RP_TIM,TP_CNT,CL_CNT,TC1_COUNT,TC3_COUNT,TW1,F_PCONT
=1 50 extern small MDBK,MDFLG_RT,MDFLG,MDCHK,TEN_CT,DP_POS_RT,DP_POS,DW_CT,PRE_KEY,PRE_KEY_BK,SYM
=1 51 ;RAM equation (40-FFh)...........
=1 52
=1 53 extern small LENG_WK,OFF_S,OFF_MSD,OFF_MSD12,OFF_LSD,OFF_DP,OFF_MSD10
=1 54 extern small D_PRN_MAX,PRN_MAX
=1 55
=1 56 extern small W1_S,W1_LSD,W1_MSD,W1_DP,W2_S,W2_LSD,W2_MSD,W2_DP,W3_S,W3_LSD,W3_MSD,W3_DP
=1 57 extern small MDSW_0,MDSW_1,MDSW_2,MDSW_3,MDSW_01,MDSW_11,MDSW_21,MDSW
=1 58 extern small MDFLG,MDFLG_0,MDFLG_1,MDFLG_2,MDFLG_3,MDFLG_01,MDFLG_11,MDFLG_21
=1 59 extern small TEN_S,TEN_LSD,TEN_DP
=1 60 ;RAM (100h -).........
=1 61 extern DISP,TO_DBR,TO_DBR_LSD,DISP_CT,DISP_TMP,FLG_2
=1 62 extern YEAR,MON,DAY,HOUR,MIN,SEC,BLK_CT,BLK_D,PTR,RTC_CK,COLOR_CT,DELAY_CT
=1 63 extern KEY_BUF,KEY_WPTR,KEY_RPTR,KEY_CT,KEYIN,SCAN_BK,KI_CT,RET_BK,SCAN_CT
=1 64 extern PRN_BUF,TAXRT,FC1RT,FC2RT,FC3RT,PF_CNT,DT_BUF,DT_CT,TEMP,WO_CLR,W1_CLR
=1 65 extern MEM1,MEMGT,IC_M,IC_G,FLG_ICON,TW1_BAK,DT_DOT_CNT,DT_CHR_CNT,IC_BK
=1 66 extern MDFLG_RT3,MDFLG_RT2,MDFLG_RT1,MDFLG_RT0,MDFLG_RT21,MDFLG_RT11,MDFLG_RT01
=1 67 extern FLG_MODE
=1 68 ;RAM equation (100h -)...........
=1 69 extern RAM_TOP,RAM_BOT
=1 70 extern T_YEAR,T_MON,T_DAY,T_HOUR,T_MIN,T_Y20,T_AMPM,BACKUP,BK_Y20,BK_HOUR,BK_AMPM
=1 71 extern DBR_SEG,DBR_TOP,DBR_BOT,MULSEL,DISP_MSD,DISP_LSD,STOPCR
=1 72 extern PRN_BUF_MSD,PRN_BUF_LSD,PRN_BUF_SYM,DT_BUF_MSD,DT_BUF_LSD,PRN_BUF_S,IC_SYM
=1 73 extern AVR_ITEM,AVR_BUF
=1 74 extern EP_ADDR,EP_TIM,FINANCE_1,FINANCE_0,OFF_CT
=1 75 extern TAX2RT,EURO_RATE1,EURO_RATE2,FLG_RTC
=1 76 extern F_PCONT_1,F_PCONT_2
=1 77 ;RAM bit...........
=1 78 extern E_MUL,E_DIV,E_DLT,E_MUP,E_CST,E_SEL,E_MAR,F_M2CAL
=1 79 extern C_MUL,C_DIV,C_DLT,C_MUP,C_CST,C_SEL,C_MAR,CSM_RECALL
=1 80 extern F_CALER,F_ZDIVER,F_PERCAL,F_WAKE
=1 81 extern ICON_MIN,ICON_M,ICON_E,ICON_GT,F_ICDSP,F_GTON,RTC_CHK
=1 82 extern F_KON,F_KOFF,F_TNKEY
=1 83
=1 84 extern F_INIT,F_FEED,F_PRINT,F_FDREQ,F_PRREQ,F_RUSH,F_REDBAK,P_MOVE
=1 85 extern F_EXFED,F_RVSE,F_RVSE,F_RVREQ,F_STBDLY,F_CHPOFF,F_REVCAN,F_STBON
=1 86 extern F_SSTB,F_BHLD,F_ACC,P_ERR,P_NP,P_RED,IO_MT,F_TRAN
=1 87
=1 88 extern F_MIN_TRA,F_DPIN,F_OFF,F_RATE,F_RTUPD
=1 89 extern SW_OFF_RT,SW_RAT_RT,SW_NP_RT,SW_FIN_RT,SW_FEED_RT,SW_DMY_RT,SW_24_RT,F_24ON
=1 90 extern F_HLD_FED,F_HLD_SET,PAPER_FEED
=1 91 extern RTC_ON,RTC_TIM,RTC_24,RTC_DMY,RTC_YMD,RTC_SET,F_ICPN,NO_CLK,MEQ_ENB,ERR_MES,ERR_CLR
=1 92 extern EP_FAIL,EP_ACCES,RATE_PROG,IC_PROG,EURO_PROG
=1 93 extern M_TX2,M_TX1,M_M2,M_HAND,M_FINANCE
=1 94 extern SW_LTP,F_DOFF;M_VIC,M_JET,M_NIL,
=1 95 extern SLID_RT0,SLID_RT1,SLID_RT2
=1 96 extern SW_DP0,SW_DP1,SW_DP2,SW_DP3,SW_DP4,SW_DP5,SW_DP6,SW_ADM,SW_ADM12,SW_DTST,M10,SW_SG;
=1 97 extern SW_RND54,SW_RNDUP,SW_GT,SW_NP,SW_EUTX,SW_MGT,SW_OFF,SW_IC,SW_ICPM,SW_SGT,SW_SGM,SW_SGG
=1 98 extern SW_SGK,SW_EUROS,SW_FEED,SW_A,SW_M2,SW_AC,M14,SW_DMY,SW_TA,SW_V15,SW_24,SW_FIN,SW_RATE
=1 99 extern SW_IC_RT,SW_ICPM_RT,F_ICPM,F_EQU,SW_RND54_RT,SW_RNDUP_RT,SW_GT_RT,F_PEREXE,SW_ADM_RT
=1 100 extern FEED_REQ,DP_UPDATE,EURO_DISPLY,F_COUNTRY,F_COUNTRY1,F_COUNTRY2,F_COUNTRY_EQU,F_WAITP,F_TX12,RATE_INI
=1 101 extern M_FX_SD,M_FX_SGM,M_TA,M_FX_54,M_FX_V15,F_POWER,F_BLINK,M_FX_AC
=1 102 extern FN_INTEREST,FN_AMOUNT,FN_MONTH,FN_PAYMENT,FN_MTHRATE,FN_TEMP,FN_TEMP1
=1 103 extern FN_MONTH_H,DEC_SET_CONT,AUTO_OFF_TIM
=1 104 extern FINANCE,W4,COUNTRY,COUNTRY1,COUNTRY2,COUNTRY_TEN
=1 105 extern DIAG_WK,FN_AMOUNT_MSD14,FN_AMOUNT_MSD,FN_AMOUNT_EXP,FN_MTHRATE_MSD,FN_PAYMENT_MSD14
=1 106 extern VPRN,STB_BAK,PHASE_CT,STEP_CT,LINE_PTR,DOT_CT,DOT_LINE,DIGIT_CT,HD_TEMP,STEP_BAK
=1 107 ;bit
=1 108 extern F_INTEREST,F_AMOUNT,F_MONTH,F_PAYMENT,F_MODIFIED,F_CAL_AMOUNT,F_CAL_MONTH,F_CAL_PAYMENT
=1 109 extern F_FNEABL,F_FINBUSY,F_FINAL,F_FINCAL,F_FNRECALL
=1 110 extern RTC_INIT,NO_PRINT
=1 112 ;External symbol definition for Sub routines
=1 113
=1 114 ;external symbol for general sub routines......................
=1 115 extern calc_add,calc_mult,calc_div
=1 116 extern w1_clear,w2_clear,w3_clear,w2_round,ten_clear,acc_clear,mem1_clear,gt_clear
=1 117 extern stg_sfl47,stg_sfr47,stg_sfl49,stg_sfr49,w1_zerock,ten_zerock,_spaceck
=1 118 extern edit_disp,disp_to_dbr,spc_prnbuf,spc_dt,spc_disp
=1 119 extern wk_update,ic_update,add_mode
=1 120 extern wk_round,exchg_w12
=1 121 extern wait_100ms,wait_50ms,wait_xms,wait_40c
=1 122 extern dp_adjust
=1 123 ;external symbol for print sub routine.........................
=1 124 extern print,w2_print,w2_round_print
=1 125 extern w1_print,w1_round_print,w1_round
=1 126 extern wk_print,kfeed_1,feed_1,prn_init,err_print,wkup_print,ic_print,ic_print00,sym_print_br,print_shpd,print_bk
=1 127
=1 128 extern ee_to_euro1,ee_to_euro2,ee_to_tax,ee_to_ten,ee_to_wreg,eeprom_check
=1 129 extern w2_to_ee,country_to_ee,ee_country_read,rate_init_check,ee_rate_init,fn_register_clear
=1 130 extern w1_to_w4,w1_to_ten,w1_to_w2,w1_to_const
=1 131 extern w2_to_ten,w2_to_tax,w2_to_euro,w2_to_w4,w2_to_eetx,w2_to_marg,w2_to_cost
=1 132 extern w2_to_sell,w2_to_const,w2_to_w1
=1 133 extern const_to_w1,ten_to_w1,w4_to_w1,cost_to_w1,sell_to_w1,marg_to_w1,tax_to_w1,ten_to_w1dp
=1 134 extern const_to_w2,cost_to_w2,sell_to_w2,marg_to_w2,w4_to_w2,tax_to_w2
=1 135 extern euro1_to_w2,euro2_to_w2,w2_to_euro1,w2_to_euro2,ten_to_euro1,ten_to_euro2,euro1_to_ten,euro2_to_ten
=1 136 extern acc_to_w2,ten_to_w2dp,gt_to_w2,ten_to_w2,mem1_to_w2
=1 137 extern _zerock,w2_to_tax2,w2_to_eetx2,tax2_to_w1,tax2_to_w2
=1 138 extern w1_to_acc,w2_to_acc,acc_to_ten
=1 139 extern ee_to_tax2,ic_print_y,wkrnd_zsp0
=1 140 extern equal_sub,wk_round_with_ten_dp
=1 141 extern const_clear,wk_round_with_const_dp,wk_round_with_2DP
=1 142 extern init_vft,vft_disable,vft_enable
=1 143 extern wk_round_down,wk_round_up
=1 144 extern w1_to_ftemp,ftemp_to_w2
=1 146 $nolist
=1 147 ;*******************************************************************************
=1 148 ;*******************************************************************************
=1 149 ;* *
=1 150 ;* (C)Copyright, CLOVER China Electronics Co.,LTD. *
=1 151 ;* (Company No:190077-X) *
=1 152 ;* All Rigits Reserved *
=1 153 ;* add:No.58-F Yang Dong Road, LuoFeng Demonstrative Zone Suzhou, China *
=1 154 ;* Tel: 0512-67261886 Fax:0512-67261882 *
=1 155 ;* http://www.clover.co.jp *
=1 156 ;* *
=1 157 ;*******************************************************************************
=1 158 ;*******************************************************************************
=1 159 ;
=1 160 ; OBS CPD3212T source program
=1 161 ; CPU: TOSHIBA TLC-870/C series TMP86CM74AF
=1 162 ; RAM: 2Kbytes(0040h - 083Fh)
=1 163 ; ROM: 32Kbytes(8000h - FFFFh)
=1 164 ;
=1 165 ;
=1 166 ;Macro difinition
=1 167 $list
=1 168 ;==============================================================================
=1 169 ; Push register
=1 170 ;==============================================================================
=1 179 ;==============================================================================
=1 180 ; Pop register
=1 181 ;==============================================================================
=1 190 ;==============================================================================
=1 191 ; Set bit Note: use WA registor
=1 192 ;==============================================================================
=1 197 ;==============================================================================
=1 198 ; Set bit Note: use WA registor
=1 199 ;==============================================================================
=1 204 ;==============================================================================
=1 205 ; Branch if bit set Note: use WA registor
=1 206 ;==============================================================================
=1 212 ;==============================================================================
=1 213 ; Branch if bit clear Note: use WA registor
=1 214 ;==============================================================================
=1 220 ;==============================================================================
=1 221 ; Set '1' to W2
=1 222 ;==============================================================================
=1 227 ;==============================================================================
=1 228 ; Set '100' to W2
=1 229 ;==============================================================================
=1 234
=1 235 ;==============================================================================
=1 236 ;V2.00@define(lcd_disable)(
=1 237 ;V2.00 ld (LCDCTL1),0y10000100 ;1/4 duty, REFV V4,=VDD, Booster circuit disable, LCD display enable
=1 238 ;V2.00 clr (P6DR).3
=1 239 ;V2.00 clr (P6DR).5
=1 240 ;V2.00 clr (FLG_MODE).6 ;indicate LED OFF
=1 241 ;V2.00)
=1 242
=1 243 ;V2.00@define(lcd_enable)(
=1 244 ;V2.00 ld (LCDCTL1),0y10000101 ;1/4 duty, REFV V4,=VDD, Booster circuit disable, LCD display enable
=1 245 ;V2.00 ld (LCDCTL2),0y00000001 ;base frequency for frame frequency 8M
=1 246 ;V2.00 set (FLG_MODE).6 ;indicate LED ON
=1 247 ;V2.00)
=1 248 ;==============================================================================
=1 252 ;----------------------------
=1 256 ;==============================================================================
=1 260 ;===============================================================================V1.21
=1 264 ;==============================================================================V1.21
=1 271 ;---------------------------------
=1 272 ;======================================
=1 277 ;----------------------------
=1 282 ;==========================================
=1 285 ;@set(D14,0) ;in case of 12digit model
=1 286 ;@set(UP_COM,1) ;in case of upper commma VFD
=1 290
=1 295 +1 MAX_DIGIT equ 12
=1 296 +1 MAX_DIGIT_DT equ 15
=1 298
=1 299 ;DISP character code................
=1 300 D_0 equ 0x00
=1 301 D_1 equ 0x01
=1 302 D_I equ 0x01
=1 303 D_2 equ 0x02
=1 304 D_3 equ 0x03
=1 305 D_4 equ 0x04
=1 306 D_5 equ 0x05
=1 307 D_S equ 0x05
=1 308 D_6 equ 0x06
=1 309 D_G equ 0x06
=1 310 D_7 equ 0x07
=1 311 D_8 equ 0x08
=1 312 D_9 equ 0x09
=1 313 D_A equ 0x0a
=1 314 D_B equ 0x0b
=1 315 D_C equ 0x0c
=1 316 D_D equ 0x0d
=1 317 D_E equ 0x0e
=1 318 D_F equ 0x0f
=1 319 D_P equ 0x10
=1 320 D_H equ 0x11
=1 321 D_HYPN equ 0x12
=1 322 D_MIN equ 0x12
=1 323 D_L equ 0x13
=1 324 D_M equ 0x14
=1 325 D_N equ 0x15
=1 326 D_EQU equ 0x16
=1 327 D_R equ 0x17
=1 328 D_U equ 0x18
=1 329 D_T equ 0x19
=1 330
=1 331 D_Lo equ 0x29
=1 332 D_Uo equ 0x2a
=1 333
=1 334 D_SPC equ 0x3f
=1 335 ;Key code............................
=1 336 K_ZERO equ 0x00
=1 337 K_NUM equ 0x09 ;0-9 key
=1 338 K_ZERO2 equ 0x0a
=1 339 K_ZERO3 equ 0x0b
=1 340 K_TEN equ 0x0b
=1 341 K_DP equ 0x0c
=1 342 K_CE equ 0x0d
=1 343 K_CEC equ 0x0e
=1 344 K_GT equ 0x0f
=1 345 K_PLS equ 0x10
=1 346 K_MIN equ 0x11
=1 347 K_ST equ 0x12
=1 348 K_TL equ 0x13
=1 349 K_ROUND equ 0x13
=1 350 K_SHS equ 0x14 ;#/S
=1 351 K_FIN equ 0x14
=1 352 K_PNP equ 0x15
=1 353
=1 354 K_TX2P equ 0x14
=1 355 K_TX2M equ 0x15
=1 356
=1 357 K_EQU equ 0x16
=1 358 K_PER equ 0x17
=1 359 K_MUL equ 0x18
=1 360 K_DIV equ 0x19
=1 361 K_MU equ 0x1a
=1 362 K_DLT equ 0x1b
=1 363 K_SGN equ 0x1c
=1 364 K_BS equ 0x1d
=1 365 K_SHD equ 0x1e ;#/D
=1 366 K_IC equ 0x1f
=1 367 K_MPL equ 0x20
=1 368 K_MMI equ 0x21
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -