首页 > 其他 > 详细

仿bctc测fdda时间。

时间:2014-06-10 18:12:07      阅读:474      评论:0      收藏:0      [点我收藏+]

clear

reset

auto_response on
prompt on

fdda_type = 00

sss = timer()

aaa = 00000000

00 A4 04 00 0E 32 50 41 59 2E 53 59 53 2E 44 44 46 30 31
bbb = apdutime()
aaa = add( $aaa, $bbb )
ccc = hex2int( $bbb )
speed_select_ppse = $ccc

00 A4 04 00 07 A0 00 00 03 33 01 01
bbb = apdutime()
aaa = add( $aaa, $bbb )
ccc = hex2int( $bbb )
speed_select_pboc = $ccc

80 A8 00 00 ( 83 ( A6 00 00 $fdda_type 00 00 00 00 00 01 00 00 00 00 00 00 01 56 00 00 00 00 00 01 56 06 10 31 01 93 6D FA 05  ) )
bbb = apdutime()
aaa = add( $aaa, $bbb )
ccc = hex2int( $bbb )
speed_gpo = $ccc

set resp
afl = gettlv( $resp, 77 94 )

call read_all_record( $afl )

eee = timer()

ttt = sub( $eee, $sss )
ttt = hex2int( $ttt )
speed_run = $ttt

speed_apdu = hex2int( $aaa )
speed_bctc = sub( $aaa, 014ff0 )
speed_bctc = hex2int( $speed_bctc )

prompt off
for a = 0 to 20
    tt = $a
    tt = hex2int( $a )
    data[ $tt ] = hex2int( $data[ $tt ] )
next a
prompt on
? "+==================================================================+"
? "|  fdda 00 rsa 速度表                                              |"
? "|------------------------+-----------------------------------------|"
? "| select ppse            | "  $speed_select_ppse " 微秒                             |"
? "|------------------------+-----------------------------------------|"
? "| select pboc            | "  $speed_select_pboc " 微秒                             |"
? "|------------------------+-----------------------------------------|"
? "|    GPO                 | "  $speed_gpo " 微秒                             |"
? "|------------------------+-----------------------------------------|"
? "|  第 01 条读记录        | "  $data[ 00 ] " 微秒                             |"
? "|------------------------+-----------------------------------------|"
? "|  第 02 条读记录        | "  $data[ 01 ] " 微秒                             |"
? "|------------------------+-----------------------------------------|"
? "|  第 03 条读记录        | "  $data[ 02 ] " 微秒                             |"
? "|------------------------+-----------------------------------------|"
? "|  第 04 条读记录        | "  $data[ 03 ] " 微秒                             |"
? "|------------------------+-----------------------------------------|"
? "|  第 05 条读记录        | "  $data[ 04 ] " 微秒                             |"
? "|------------------------+-----------------------------------------|"
? "|  第 06 条读记录        | "  $data[ 05 ] " 微秒                             |"
? "|------------------------+-----------------------------------------|"
? "|  第 07 条读记录        | "  $data[ 06 ] " 微秒                             |"
? "|------------------------+-----------------------------------------|"
? "|  第 08 条读记录        | "  $data[ 07 ] " 微秒                             |"
? "|------------------------+-----------------------------------------|"
? "|  第 09 条读记录        | "  $data[ 08 ] " 微秒                             |"
? "|------------------------+-----------------------------------------|"
? "|  第 10 条读记录        | "  $data[ 09 ] " 微秒                             |"
? "|------------------------+-----------------------------------------|"
? "|------------------------+-----------------------------------------|"
? "|------------------------+-----------------------------------------|"
? "|------------------------+-----------------------------------------|"
? "|  apdu总时间和          | "  $speed_apdu " 微秒                             |"
? "|------------------------+-----------------------------------------|"
? "|  bctc 估算时间         | "  $speed_bctc " 微秒                             |"

? "|------------------------------------------------------------------|"

end

read_all_record:
    prompt off
    for a = 0 to 20
        tt = $a
        tt = hex2int( $a )
        data[ $tt ] = 00
    next a
    prompt on

    tt = 00
    afl = pop()
    ? "取得afl的长度"
    afl_len = strlen( $afl )
    afl_len = sub( $afl_len, 01 )
    ? $afl_len
    afl_len = hex2int( $afl_len )

    for a = 0 to $afl_len step 4
        aa = $a
        offset = hex2int( $aa )
        sfi = mid( $afl, $offset, 01 )
        ? "sfi  = " $sfi
        offset1 = add( $aa, 01 )
        offset2 = add( $aa, 02 )
        offset1 = hex2int( $offset1 )
        offset2 = hex2int( $offset2 )
        start = mid( $afl, $offset1, 01 )
        endx = mid( $afl, $offset2, 01 )
        start = hex2int( $start )
        endx = hex2int( $endx )
        for b = $start to $endx
            bb = $b
            xx = add( $sfi, 04 )
            00 b2 $bb $xx 00
            if sw != 9000
                pause
            endif
            time = apdutime()
            data[ $tt ] = $time
            tt = add( $tt, 01 )
            aaa = add( $aaa, $time )
        next b
    next a

return

仿bctc测fdda时间。,布布扣,bubuko.com

仿bctc测fdda时间。

原文:http://blog.csdn.net/jennyvenus/article/details/29826527

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!