千家论坛_弱电智能化技术与工程讨论(建筑智能,家居智能,人工智能)

电话交换机(PABX)
收藏本版 (3) |订阅

电话交换机(PABX) 今日: 2023 |主题: 11205|排名: 45 

发新帖
打印 上一主题 下一主题

有谁见过用汇编语言写计费程序的吗?...

[复制链接]
pabxman 发布于: 2004-3-13 15:11 2491 次浏览 23 位用户参与讨论
跳转到指定楼层
以前见过一个女人,就是用汇编写计费程序,厉害! 我弄到了部分源程序,大家看看 STACK SEGMENT PARA STACK 'STACK' DB 0FFFFH DUP(0) STACK ENDS DATA SEGMENT PARA PUBLIC 'DATA' NAME1 DB 'FJFL.TXT',0,'$' db 20 dup(0) NAME2 DB 'FLFL.TXT',0,'$' db 20 dup(0) NAME3 DB 'GHFL.TXT',0,'$' db 20 dup(0) NAME4 DB 'IFLFL.TXT',0,'$' db 20 dup(0) NAME5 DB 'TAAAA.TXT',0,'$' db 20 dup(0) NAME6 DB 'FHFL.TXT',0,'$' db 20 dup(0) NAME7 DB 'TAAAA.TXT',0,'$' db 20 dup(0) NAMEB DB 'TOT.TXT',0,'$' DB 10 DUP(0) CODE1 DW 0 db 20 dup(0) CODE2 DW 0 db 20 dup(0) CODE3 DW 0 db 20 dup(0) CODE4 DW 0 db 20 dup(0) CODE5 DW 0 db 20 dup(0) CODE7 DW 0 db 20 dup(0) CODEB DW 0 DB 10 DUP(0) HH DB 3080 DUP(0) DB 20 DUP(0) GG DB 80 DUP(0) DB 20 DUP(0) II DB 20000 DUP(0) DB 20 DUP(0) DID DB 6000 DUP(0) DB 20 DUP(0) GWS DB 0 FLAG DB 0 FLAG1 DB 0 FLAG2 DB 0 FLAG3 DB 0 FHBUF DB 0 DB 14500 DUP(0) BUFFER4 DW 0 BUFFER5 DW 0 BUFFER6 DW 0 BUFFER3 DW 0 BUFFER2 DB 0 BUFFER7 DB 20 DUP(0) BUFFER1 DB 80 DUP(0) BUFFERA DB 20 DUP(0) MULT10 DW 1 DUP(01) TENWD DW 1 DUP(10) CCCC DB 10 DUP(0) CC DW 0 CCCCN DB 10 DUP(0) TENWDN DW 1 DUP(10) MULT10N DW 1 DUP(01) CCN DW 0 INTTFB DB 0 DB 2310 DUP(0) X2 DW 2 X3 DW 3 X4 DW 4 X9 DW 9 X14 DW 14 X40 DW 40 X70 DW 60 X30 DW 30 X36 DW 36 X42 DW 42 X53 DW 53 X60 DW 60 X100 DW 100 X145 DW 145 ZQ DB 0 EE DW 001EH EA DW 000AH EB DW 0100H RE DW 0 BJ DB 0 SJBUF DB 0 DB 16 DUP(0) SJMMS DW 0 SJDDS DW 0 SJMME DW 0 SJDDE DW 0 SJBUF1 DB 0 MMM DW 0 SSSM DW 0 SSSD DW 0 EEEM DW 0 EEED DW 0 LASTD DW 0 REC DW 0 HHS DW 0 MMS DW 0 HHE DW 0 MME DW 0 HS DW 0 MS DW 0 HE DW 0 ME DW 0 db 10 dup(0) weekk db 0 WEEK DB 0 FT DB 0 db 10 dup(0) RECO2 DB 0 RECO DB 70 DUP(0) RECO1 DB 70 DUP(0) db 20 dup(0) RECOO DB 0 GZZ DB 0ffh GZBUF DB 10 DUP(0) ZZ DB 0 TOTAL DW 0 TOTAL1 DB 30H DB 30H DB 30H DB 30H DB 30H DB 30H address dw 0 MESG DB '*** 交换机出帐系统 ***','$' MESG1 DB '1.工号登记','$' MESG2 DB '2.分机号登记, 修改','$' MESG3 DB '3.费率创建, 修改','$' MESG4 DB '4.出帐统计','$' MESG5 DB '请选择(1-4):','$' MESG6 DB '*** 工号登记 ***','$' MESG7 DB '1.工号输入','$' MESG8 DB '2.工号显示, 删除','$' MESG9 DB '3.返回','$' MESGA DB '请选择(1-3):','$' MESGB DB '请输入工号: ','$' MESGC DB '请输入密码: ','$' MESGD DB '中机号:','$' MESGE DB '城市名:','$' MESGF DB '区号:','$' MESG10 DB '费率:','$' MESG11 DB '*** 分机号登记,修改 ***','$' MESG12 DB '*** 费率输入 ***','$' MESG13 DB '需继续输入吗(Y/N)?','$' MESG14 DB '1.分机号输入','$' MESG15 DB '2.分机号显示','$' MESG16 DB '3.分机号删除','$' MESG17 DB '4.返回','$' MESG18 DB '1.费率输入','$' MESG19 DB '2.费率批量输入,修改','$' MESG20 DB '3.费率删除','$' MESG21 DB '*** 工号输入 ***','$' MESG22 DB '*** 费率输入 ***','$' MESG23 DB '输入正确吗(Y/N)?','$' MESG24 DB '*** 工号显示, 删除 ***','$' MESG25 DB 'Ctrl-D 删除, Ctrl-E 返回','$' MESG26 DB '输入被删除工号:','$' MESG27 DB '*** 分机号输入 ***','$' MESG28 DB '请输入中继号: ','$' MESG29 DB 'Ctrl-C 继续, Ctrl-E4结束','$' MESG2A DB '显示登记的分机','$' MESG2B DB 'Ctrl-E 结束, PgDw-下一屏, PgUP-上一屏 ','$' MESG2C DB '*** 分机号删除 ***','$' MESG2D DB '请输入被删除中继号:','$' MESG2E DB '*** 费率批量输入,修改 ***','$' MESG2F DB 'PgDn-下一屏, PgUp-上一屏','$' MESG30 DB '开放国内(Y/N) ','$' MESG31 DB '开放国际(Y/N) ','$' MESG32 DB '出错,重新输入,退出按Ctrl-E','$' MESG33 DB 'DDD','$' MESG34 DB 'IDD','$' MESG35 DB 'Ctrl-A 输入, Ctrl-F 修改','$' MESG36 DB 'Ctrl-P 显示, Ctrl-D 删除','$' MESG37 DB 'Ctrl-D DDD, Ctrl-J IDD','$' MESG38 DB 'Ctrl-E 结束','$' MESG39 DB 'Ctrl-S 新开, Ctrl-C 继续','$' MESG40 DB '序号:','$' MESG41 DB '*** 出帐系统 ***','$' MESG42 DB '1.附加费,服务费','$' MESG43 DB '2.法定假输入','$' MESG44 DB '3.分户统计','$' MESG45 DB '4.跟踪','$' MESG46 DB '5.出帐周期','$' MESG47 DB '6.随机出帐','$' MESG48 DB '附加费:','$' MESG49 DB '服务费:','$' MESG4A DB '公务电话(Y/N) ','$' MESG4B DB '分户统计','$' MESG4C DB '第 组名:','$' MESG4D DB '跟踪','$' MESG4E DB '出帐周期','$' MESG4F DB '*** 分户统计 ***','$' MESG50 DB '请输入(A:月出帐半 H:月出帐):','$' MESG51 DB '*** 输入 ***','$' MESG52 DB '请选择(1-7):','$' MESG60 DB '5.修改日期','$' MESG61 DB '6.修改时间','$' MESG63 DB '系统日期:','$' MESG64 DB '新日期:','$' MESG65 DB '系统时间:','$' MESG66 DB '新时间:','$' MESG67 DB '7.返回','$' MESG70 DB ' 月 日','$' MESG71 DB '需输入其它组吗(Y/N)?','$' MESG72 DB '*** 显示 ***','$' MESG73 DB '--- 按任一键继续 ---','$' MESG74 DB '修改第几组?','$' MESG75 DB '需继续修改吗(Y/N)? ','$' MESG76 DB ' 至 ','$' MESG77 DB '*** 随机出帐 ***','$' MESG78 DB '出帐分类(A-组,B-分机):','$' MESG79 DB '出帐户名(或分机号):','$' MESG7A DB '请输入被删除的组号:','$' MESG7B DB '分机号:','$' MESG7C DB '出账格式(A-统计,B-清单):','$' MESG80 DB 'LDD ' MESG81 DB 'CLD ' MESG82 DB 'DDD,IDD ' MESG83 DB 'Ctrl-A:全跟踪, Ctrl-B:公务跟踪','$' MESG84 DB 'Ctrl-C:分机跟踪, Ctrl-E:返回','$' MESG8A DB '打印机忙,无打印纸或出错!','$' mesg90 db '请输入星期(1-7):','$' MESG91 DB '7.话单打印','$' MESG92 DB '请输入:','$' MESG93 DB ' 月 日','$' MESG94 DB '流水号:','$' MESG95 DB '发票号:','$' MESG96 DB '无此记录,按任一键重新输入!','$' MESG9A DB '置半价按Ctrl-H','$' MESG9B DB '置全价按Ctrl-A','$' MESG9C db '全价','$' MESG9D db '半价','$' mesgbb1 db '送打','$' mesgbb2 db '停送','$' DDT DB 110 DB '721 723 724 725 731 732 735 736 737 ' DB '738 739 740 741 742 743 749 751 752 ' DB '753 754 755 756 757 758 759 761 763 ' DB '764 766 781 782 784 785 786 787 788 ' DB '789 801 802 803 804 805 807 808 809 ' DB '810 813 817 818 819 923 925 926 927 ' DB '931 934 935 941 943 944 946 950 951 ' DB '952 954 955 957 958 959 961 962 963 ' DB '964 965 967 968 970 971 972 973 974 ' DB '975 976 978 811 812 814 815 816 862 ' DB '863 864 865 891 892 893 894 895 896 ' DB '897 898 899 912 913 914 915 793 794 ' DB '953 956 ' BUFPRT1 DB 6 DUP(20H) T1 DB 5 DUP(20H) DB 1 DUP(20H) TT11 DB 6 DUP(20h) DB 5 DUP(20H) T2 DB 9 DUP(20H) DB 16 DUP(20H) TT1 DB 5 DUP(20H) DB 8 DUP(20H) TT2 DB 9 DUP(20H) DB 4 DUP(20H) T11 DB 6 DUP(20H) DB 2 DUP(20H) BUFPRT2 DB 0 T3 DB 16 DUP(20H) DB 3 DUP(20H) T10 DB 4 DUP(20H) DB 16 DUP(20H) T9 DB 4 DUP(20H) DB 4 DUP(20H) TT3 DB 16 DUP(20H) DB 2 DUP(20H) T4 DB 5 DUP(20H) DB 3 DUP(20H) TT10 DB 4 DUP(20H) DB 3 DUP(20H) BUFPRT3 DB 0 T5 DB 5 DUP(20H) DB 3 DUP(20H) T6 DB 5 DUP(20H) DB 7 DUP(20H) T7 DB 10 DUP(20H) DB 10 DUP(20H) TT5 DB 5 DUP(20H) DB 4 DUP(20H) TT6 DB 5 DUP(20H) DB 4 DUP(20H) T8 DB 5 DUP(20H) DB 5 DUP(20H) TT7 DB 10 DUP(20H) DB 4 DUP(20H) DB 10 DUP(20H) BPRINT DB 0 BP0 DB 5 DUP(20H) DB 2 DUP(20H) BP1 DB 5 DUP(20H) DB 1 DUP(20H) BP2 DB 4 DUP(20H) DB 2 DUP(20H) BP3 DB 16 DUP(20H) DB 1 DUP(20H) BP4 DB 5 DUP(20H) DB 2 DUP(20H) BP5 DB 5 DUP(20H) DB 4 DUP(20H) BP6 DB 5 DUP(20H) DB 2 DUP(20H) BP7 DB 5 DUP(20H) DB 2 DUP(20H) BP8 DB 5 DUP(20H) DB 2 DUP(20H) BP9 DB 7 DUP(20H) DB 26 DUP(0) DB 40 DUP(0) HOUR DB 0 MINT DB 0 SEND DB 0 YEAR DW 0 MONT DB 0 DATE DB 0 DB 20 DUP(0) SHHHH DW 0 SMMMM DW 0 SSSSS DW 0 SYEAR DW 0 DW 0 SMONT DW 0 SDATE DW 0 DB 20 DUP(0) ZZZZ DB 0FFH DB 20 DUP(0) DATA ENDS MEMORY SEGMENT PARA PUBLIC 'MEMORY' EEEE1 DW 1 EEEE2 DW 1 EEEE DB 9C40H DUP(0) MEMORY ENDS MEMORY1 SEGMENT PARA PUBLIC 'MEMORY1' HHHH1 DW 1 HHHH2 DW 1 HHHH DB 8500H DUP(0) HHHHA DB 70 DUP(0) HHHHB DB 7000H DUP(0) db 100 dup(0) MEMORY1 ENDS CODE SEGMENT PARA 'CODE' BEGIN PROC FAR ASSUME SS:STACK,CS:CODE,DS:DATA,ES:MEMORY PUSH DS SUB AX,AX PUSH AX MOV AX,DATA MOV ES,AX MOV DS,AX PUSH ES CLI MOV AX,0 MOV ES,AX MOV DI,30H MOV AX,OFFSET INTT STOSW MOV AX,CS STOSW POP ES JMP KK33 MOV AH,0 MOV AL,0DAH MOV DX,1 INT 14H KK33: MOV DX,3FBH MOV AL,80H call back OUT DX,AL MOV DX,3F8H MOV AL,60H call back JMP SHORT $+2 OUT DX,AL mov al,0 call back MOV DX,3F9H MOV AL,0 call back JMP SHORT $+2 OUT DX,AL MOV DX,3FBH MOV AL,03 call back JMP SHORT $+2 OUT DX,AL MOV DX,3F9H MOV AL,01 call back JMP SHORT $+2 OUT DX,AL MOV AL,09H MOV DX,3FCH call back JMP SHORT $+2 OUT DX,AL MOV DX,3C3H MOV AL,0B0H call back OUT DX,AL MOV AL,09 call back JMP SHORT $+2 OUT DX,AL call back jmp short $+2 mov dx,3f8h in al,dx mov al,0 LEA DX,NAME1 MOV AL,2 MOV AH,3DH INT 21H JNC LL40 CLC MOV AH,3CH MOV AL,0 MOV CX,0 LEA DX,NAME1 INT 21H MOV CODE1,AX MOV BX,AX LEA DX,HH MOV CX,3080 MOV AH,40H MOV AL,0 INT 21H JMP LL50 LL40: MOV CODE1,AX MOV BX,AX LEA DX,HH MOV CX,3080 MOV AH,3FH INT 21H LL50: LEA DX,NAME2 MOV AL,2 MOV AH,3DH INT 21H JNC LL60 CLC MOV AH,3CH MOV AL,0 MOV CX,0 LEA DX,NAME2 INT 21H MOV CODE2,AX MOV BX,AX LEA DX,II MOV CX,20000 MOV AH,40H MOV AL,0 INT 21H JMP LL70 LL60: MOV CODE2,AX LEA DX,II MOV BX,AX MOV CX,20000 MOV AH,3FH INT 21H LL70: LEA DX,NAME3 MOV AL,02H MOV AH,3DH INT 21H JNC LL10 CLC MOV AH,3CH MOV AL,0 MOV CX,0 LEA DX,NAME3 INT 21H MOV CODE3,AX MOV BX,AX LEA DX,GG MOV CX,80 MOV AH,40H MOV AL,0 INT 21H JMP LL20 LL10: MOV CODE3,AX MOV BX,AX MOV CX,80 LEA DX,GG MOV AH,3FH INT 21H LL20: LEA DX,NAME4 MOV AL,2 MOV AH,3DH INT 21H JNC LL21 CLC MOV AH,3CH MOV AL,0 mov cx,0 LEA DX,NAME4 INT 21H MOV CODE4,AX MOV BX,AX LEA DX,DID MOV CX,6000 MOV AH,40H mov al,0 INT 21H JMP LL23 LL21: MOV CODE4,AX MOV BX,AX MOV CX,6000 LEA DX,DID MOV AH,3FH INT 21H LL23: LEA DX,NAME6 MOV AL,2 MOV AH,3DH INT 21H JNC LL24 CLC MOV AH,3CH MOV AL,0 MOV CX,0 LEA DX,NAME6 INT 21H MOV BX,AX LEA DX,FHBUF MOV CX,14501 MOV AH,40H MOV AL,0 INT 21H MOV AH,3EH INT 21H JMP LL25 LL24: MOV BX,AX MOV CX,14501 LEA DX,FHBUF MOV AH,3FH INT 21H MOV AH,3EH INT 21H LL25: JMP LL22 LEA DX,NAMEB MOV AL,2 MOV AH,3DH INT 21H JNC LL28 CLC MOV AH,3CH MOV AL,0 MOV CX,0 LEA DX,NAMEB INT 21H MOV CODEB,AX MOV BX,AX LEA DX,TOTAL MOV CX,2 MOV AH,40H MOV AL,0 INT 21H JMP LL22 LL28: MOV CODEB,AX MOV BX,AX MOV CX,2 LEA DX,TOTAL MOV AH,3FH INT 21H LL22: MOV AL,0 OUT 21H,AL mov al,0ffh mov zzzz,al call cls10 lea bp,mesg90 mov dx,0810h mov cx,16 mov bl,14h call disp10 mov dx,0821h call set10 ll22b: mov ah,1 int 16h jz ll22b mov ah,0 int 16h push ax mov ah,14 int 10h pop ax cmp al,31h jl ll22b cmp al,37h jle ll22c jmp ll22b ll22c: sub al,30h mov weekk,al CMP WEEKK,7 JNZ LL22F MOV AL,0FFH MOV FT,AL LL22F: STI ll22a: CALL CLS10 CMP GZZ,0 JNZ ZZBB JMP ZZBB1 ZZBB: LEA BP,MESGBB1 MOV CX,4 MOV DX,1801H MOV BL,14H CALL DISP10 JMP ZZBB2 ZZBB1: LEA BP,MESGBB2 MOV CX,4 MOV DX,1801H MOV BL,14H CALL DISP10 ZZBB2: CMP FT,0 JZ ZZBB3 JMP ZZBB4 ZZBB3: LEA BP,MESG9C MOV CX,4 MOV DX,1806H MOV BL,14H CALL DISP10 JMP ZZBB5 ZZBB4: LEA BP,MESG9D MOV CX,4 MOV DX,1806H MOV BL,14H CALL DISP10 ZZBB5: LEA BP,MESG MOV CX,22 MOV DX,0304H MOV BL,14H CALL DISP10 LEA BP,MESG1 MOV CX,10 MOV DX,0404H MOV BL,14H CALL DISP10 LEA BP,MESG2 MOV CX,18 MOV DX,0504H MOV BL,14H CALL DISP10 LEA BP,MESG3 MOV CX,16 MOV DX,0604H MOV BL,14H CALL DISP10 LEA BP,MESG4 MOV CX,10 MOV DX,0704H MOV BL,14H CALL DISP10 LEA BP,MESG60 MOV CX,10 MOV DX,0804H MOV BL,14H CALL DISP10 LEA BP,MESG61 MOV CX,10 MOV DX,0904H MOV BL,14H CALL DISP10 LEA BP,MESG91 MOV CX,10 MOV DX,0A04H MOV BL,14 CALL DISP10 LEA BP,MESG52 MOV CX,12 MOV DX,0B04H MOV BL,14H CALL DISP10 call wangin MOV DX,0B11H CALL SET10 STI MAIN: LEA DI,EEEE1 PUSH ES MOV AX,MEMORY MOV ES,AX MOV AX,ES:[DI] MOV BX,ES:[DI+2] POP ES CMP AX,BX JZ MAIN30 CALL HDCL MAIN30:
回复

使用道具 举报

已有23人评论

新浪微博达人勋

千家认证

沙发
pabxman 发表于 2004-3-13 15:15:00
这儿只是一小部分,全部程序一万行左右。程序很好用,就是在 8088 的机器上,也跑得飞快。
回复 支持 反对

使用道具 举报

新浪微博达人勋

千家认证

板凳
fanco 发表于 2004-3-13 15:33:00
果真是高手中的高手,能给过来读一下吗?
回复 支持 反对

使用道具 举报

新浪微博达人勋

千家认证

地板
pabxman 发表于 2004-3-13 15:57:00
有兴趣的拿回去看吧: [upload=rar]viewfile.asp?ID=13076[/upload]
回复 支持 反对

使用道具 举报

新浪微博达人勋

千家认证

5#
fanco 发表于 2004-3-13 15:59:00
Ths!
回复 支持 反对

使用道具 举报

新浪微博达人勋

千家认证

6#
pabxman 发表于 2004-3-13 16:02:00
找个编译器,编译一下,再 Link,放到最差的机器跑跑看。 用 Masm 5/6 编译。
回复 支持 反对

使用道具 举报

新浪微博达人勋

千家认证

7#
fanco 发表于 2004-3-13 16:04:00
OK
回复 支持 反对

使用道具 举报

新浪微博达人勋

千家认证

8#
xxcsz 发表于 2006-12-20 18:11:00
88年,就用汇编写md110的计费!!!!!
回复 支持 反对

使用道具 举报

新浪微博达人勋

千家认证

9#
goodlily 发表于 2006-12-26 22:29:00
88年,就用汇编写md110的计费!!!!!哈哈,我还在小学呢
回复 支持 反对

使用道具 举报

新浪微博达人勋

千家认证

10#
ztlhua 发表于 2006-12-26 23:00:00
只能说:没必要!
回复 支持 反对

使用道具 举报

新浪微博达人勋

千家认证

11#
gong_chan 发表于 2006-12-28 12:57:00

偶读书的时候汇编是5分1桶水,唉……

怎么编译都忘记咯!

用DEBUG可以编译吗?

回复 支持 反对

使用道具 举报

新浪微博达人勋

千家认证

12#
zylee0816 发表于 2007-3-1 11:32:00
真是太强了,我学习汇编的时候也没有编过这么长的程序。
回复 支持 反对

使用道具 举报

新浪微博达人勋

千家认证

13#
seehu550 发表于 2007-3-4 22:53:00
汇编中的指针太麻烦了
回复 支持 反对

使用道具 举报

新浪微博达人勋

千家认证

14#
newhong 发表于 2007-3-12 13:30:00
我学汇编只编过交通灯
回复 支持 反对

使用道具 举报

新浪微博达人勋

千家认证

15#
chenggong 发表于 2007-3-14 12:05:00
看不懂,程控交换机不会都是用汇编写的吧!真是强呀!
[此贴子已经被作者于2007-3-14 12:05:28编辑过]
回复 支持 反对

使用道具 举报

新浪微博达人勋

千家认证

16#
liaofan 发表于 2007-3-15 16:10:00

90年我做计费软件,用汇编+dBase,汇编写通讯接口,那时dBase没有带COM口控件。

回复 支持 反对

使用道具 举报

新浪微博达人勋

千家认证

17#
yuki 发表于 2007-3-20 11:15:00

 厉害,这个学期正好学到汇编,可以学习一下!

回复 支持 反对

使用道具 举报

新浪微博达人勋

千家认证

18#
pabxman 发表于 2007-3-21 16:18:00
你也学汇编啊
回复 支持 反对

使用道具 举报

新浪微博达人勋

千家认证

19#
petermk 发表于 2007-3-21 16:39:00

前一阵子才知道Procomm的好,最近也在捣腾,不过还没有什么正式成果!

不知道,老大有没有比较好的范例,学习学习!呵呵!

回复 支持 反对

使用道具 举报

新浪微博达人勋

千家认证

20#
pabxman 发表于 2007-3-21 17:57:00
; CHG_LD81.WAS              Meridian Extn change program
;                   For use on Analogue & Digital sets (With counter)
;                       This will apply from version 16 onwards!

; NOTE!
;     This program will only work with a WINDOWS version of Procomm Plus.

;     All information has to be taken from a source file in LD 81 "FEAT = SETS". 

; You can also use e.g FEAT = CFXD, USRD, NCOS, etc to list out the data required.             
;          Capture the data in a "*.TXT" Format such as e.g. "SETS.TXT"

;  It's best to save this file in "C:\TEMP"  ; ##(Change the path if reqd!)

; Edit the "SETS.TXT" file first as follows.... (Two examples are shown below)

;SETS     00 60031           TN  028 0 07 15  500       M500       2 NOV 2001
;SETS     00 1       18401   TN  044 0 08 00  3905      AGENT      2 NOV 2001

; NOTE!
;          Change "2500" to "500" for all Analogue sets

;          Change "2000" to "2616" for all M2616,M3820,M3110 & M3310 sets
;          Change "2000" to "2216" for all M2216 sets
;          Change "2000" to "2008" for all M2008 sets
;          Change "2000" to "2006" for all M2006 sets

;          Change "3900" to "3905" for all M3905 Taurus sets
;          Change "3900" to "3904" for all M3904 Taurus sets
;          Change "3900" to "3903" for all M3903 Taurus sets  
;          Change "3900" to "3902" for all M3902 Taurus sets  
;          Change "3900" to "3901" for all M3901 Taurus sets  
;          Change "3900" to "3900" for all M3900 Taurus sets  
;                                                                etc

;    Remove any blocks of extn data that you don't require i.e. Mail Sets!.
;  If you are working on old Meridian software such as AS V16.xx or V18.xx,
;  Then you must split the data FIRST, into Two sections with a space between them.
;  (One section is to be for Analogue & another would be for Digital extns)

; Log out of LD 81 & access LD 10 or 11 (Which ever is first on the "SETS.TXT" file).

;   Make sure that the first line in the source file contains the start of the 
; extn sets data!.  

;   This program file should remain unaltered & only copies made from it for whatever 
; use is required. P.S. I suggest that you make it a "READ ONLY" file. & store it on 
; your P.C's "C:\" HARD DRIVE.

; NOTE!  
;  The " ; " denotes that the data on the program file line is ignored,
; when the script is run.

;   Go through the rest of this section & alter any settings that are required.
; This script will always put in the following info "CLS LNA DPUA GPUA" 
;                 You can change this if you want to!.  
;  Once you have made your changes, Then save this file in a different location.
;            i.e.  "C:\TEMP" 
;   Click on the BOX marked "COMPILE & RUN" & if successful, Then you will be asked for 
; the "SETS.TXT" file. Once you have found & clicked on it, The script will then start
; to run. 
         









; GENERAL NOTE!

;   After the script has mad the changes, It will exit the overlayT & go into LD 81 to 
; print out the extn's. The "DATE" will have changed on the sets that have been altered.
;   It will then reset any ALARMS in LD 32, Followed by a "EDD" in LD 43 & finally
; log you off the Meridian (If the ";" has been removed at the bottom of this file!).    

;   This script can be changed to do just about anything that involves Creating, 
; Deleting or changing DATA using a source file.
;   It can therefore be used on  different OVERLAYS "LD xx"!

;   The main thing to remember, is to change the STRING OPDATA settings that
; exists on the source file (Count from the Left hand side within "DOS EDITOR"
; & remember to start from " 0 ").
;   Then the next VALUE should be the Number of characters, spaces & Numbers
; etc that is needed.
;   A good example is the "TN" Number, Which is ...  SUBSTR OPDATA_D OPDATA 32 11
; This means that on line 32 & for 11 more lines the "TN" Number is used.

;   On all pre "C" Processors e.g V16.xx to 21.xx Meridian systems
; It's best to use the " ~ "  symbol (This will insert a short PAUSE!).
;  This is somtimes needed to give the Meridian time to process the command 
; entered!.

;                      This is the start of the program script

STRING S_Time
STRING readfile
STRING DIRECTORY
INTEGER LEN=0
INTEGER CUT_OFF=0
INTEGER EVENT
LONG COUNT=0
LONG TOTAL=0
LONG PERCENT=0
LONG BIT

;              THESE SETTINGS MIGHT NEED TO BE CHANGED!
;       (REMEMBER TO ADD / REMOVE ";" WHEN USING OPDATA STRINGS       

STRING OPDATA
;         STRING OPDATA_A          ; ### (OPTION 11 FIRST 3 DIGITS)
;         STRING OPDATA_B          ; ### (OPTION 11 LAST 2 DIGITS) 

 STRING OPDATA_C          ; ### (EXTN TYPE FIELD) 
 STRING OPDATA_D          ; ### "USE ON ALL MERIDIANS 11 TO 81"  (TN)

;         STRING OPDATA_E          ; ## "USE FOR DN NUMBER, SCPW ETC". 
;         STRING OPDATA_F          ; ###### "USE FOR CHANGING THE DES PROMPT"
;         STRING OPDATA_G          ; ###### "SPARE STRING!"
;         STRING OPDATA_H          ; ###### "SPARE STRING!"

PROC MAIN
STATMSG "Start"
dialogbox 0 236 63 205 200 2 "Extchg" 
dirpath 1 2 14 198 11 Directory
dirlistbox 2 2 29 201 140 "C:\TEMP\*.*" SINGLE readfile 1 SORT ; ##(Change path if reqd!)
pushbutton 3 110 173 40 13 "OK" OK DEFAULT
pushbutton 4 55 173 40 13 "Cancel" 
text 5 2 1 61 11 "Select READ file" left 
enddialog 

 set capture file "C:\PROGRAM FILES\PROCOMM PLUS\CAPTURE\*.*"  ; ##(Change path if reqd!)
 capture on

while 1
	dlgevent 0 event
	switch event
		case 0
		endcase
		
		case 1
		endcase
		
		case 3
		exitwhile
		endcase
		
		case 4
		exit
		endcase		
		
	endswitch
endwhile
    FOPEN 1 readfile read TEXT  ; *****************CHANGE IF NECESSARY

      WHILE NOT FEOF 1
        FGETS 1 OPDATA
        STRLEN OPDATA LEN
          IF LEN<3 
            EXITWHILE
          ENDIF
          
	TOTAL=TOTAL+1
	ENDWHILE

S_Time=$TIME
call counter

REWIND 1    

      WHILE NOT fEOF 1
        FGETS 1 OPDATA
        STRLEN OPDATA LEN
          IF LEN<3 
            EXITWHILE
          ENDIF

;              THESE SETTINGS MIGHT NEED TO BE CHANGED!
;       (REMEMBER TO ADD / REMOVE ";" WHEN USING OPDATA STRINGS       

; SUBSTR OPDATA_A OPDATA 32 3  ; ### (OPTION 11 FIRST 3 DIGITS)
; SUBSTR OPDATA_B OPDATA 41 2  ; ### (OPTION 11 LAST 2 DIGITS)

 SUBSTR OPDATA_C OPDATA 45 4  ; ### (EXTN TYPE FIELD)
 SUBSTR OPDATA_D OPDATA 32 11 ; ### "USE ON ALL MERIDIANS 11 TO 81"  (TN)

; SUBSTR OPDATA_E OPDATA 12 4  ;## "USE FOR DN NUMBER, HUNT & SCPW ETC" SET TO 4 DIGITS!
; SUBSTR OPDATA_F OPDATA 55 6 ; ###### "USE FOR CHANGING THE DES PROMPT"
; SUBSTR OPDATA_G OPDATA 11 5  ; ###### "SPARE STRING!"
; SUBSTR OPDATA_H OPDATA       ; ###### "SPARE STRING!"

          TRANSMIT "CHG^M"
          WAITFOR "TYPE" 5
          TRANSMIT OPDATA_C
          TRANSMIT "^M"
          WAITFOR "TN" 5

;      TRANSMIT OPDATA_A         ;###  (OPTION 11 FIRST 3 DIGITS)
;      TRANSMIT " "
;      TRANSMIT OPDATA_B         ;###  (OPTION 11 LAST 2 DIGITS)
;      TRANSMIT " "

  TRANSMIT OPDATA_D    ; ###  "FOR USE ON ALL MERIDIANS 11 TO 81" (TN NUMBER)
  TRANSMIT "^M"

          WAITFOR "ECHG" 5
	  IF success
          TRANSMIT "YES"
          TRANSMIT "^M"

;  WAITFOR "ITEM"
;  TRANSMIT "HUNT "  ; ## CHANGE THIS VALUE I.E. "12 5" IN OPDATA_E  DIGIT = LENGTH (5)
;  TRANSMIT OPDATA_E            ;#####  (DN NUMBER IN SETS LD 81)
;  TRANSMIT "^M~"

          WAITFOR "ITEM"
	  TRANSMIT "CLS LNA GPUA DPUA^M"
          WAITFOR "ITEM"

;  TRANSMIT "CLS CNDA^M"      ; ## "COMPANION / DIGITAL DISPLAY SETS ONLY!"
;  WAITFOR "ITEM"
;  TRANSMIT "CLS DNDA^M"      ; ## "DIGITAL DISPLAY SETS ONLY!"
;  WAITFOR "ITEM"

;  TRANSMIT "CLS CFHA^M"      ; ## "ONLY ON V19 ONWARDS!"
;  WAITFOR "ITEM"
;  TRANSMIT "CLS USRA^M"      ; ## "ONLY ON V19 ONWARDS!" 
;  WAITFOR "ITEM"

;  TRANSMIT "RNPG 0^M"
;  WAITFOR "ITEM"

;  TRANSMIT "NCOS 7^M"
;  WAITFOR "ITEM"

;  TRANSMIT "PLEV 0^M"
;  WAITFOR "ITEM"

;  TRANSMIT "TGAR 0^M"
;  WAITFOR "ITEM"

; TRANSMIT "SCPW "  ; ## CHANGE THIS VALUE I.E. "12 5" IN OPDATA_E DIGIT LENGTH = (5)
; TRANSMIT OPDATA_E            ;#####  (DN NUMBER IN SETS LD 81)
; TRANSMIT "^M~"
    ;  WAITFOR "SGRP"       ; ## "ON V16 TO V18 DIGITAL SETS ONLY!"   
    ;  TRANSMIT "^M~"       ; ## "ON V16 TO V18 DIGITAL SETS ONLY!"
    ;  WAITFOR "CLS"        ; ## "ON V16 TO V18 DIGITAL SETS ONLY!"
    ;  TRANSMIT "^M~"       ; ## "ON V16 TO V18 DIGITAL SETS ONLY!"
; WAITFOR "ITEM"

;        TRANSMIT "SCPW 1111^M"
    ;  WAITFOR "SGRP"       ; ## "ON V16 TO V18 DIGITAL SETS ONLY!"   
    ;  TRANSMIT "^M~"       ; ## "ON V16 TO V18 DIGITAL SETS ONLY!"
    ;  WAITFOR "CLS"        ; ## "ON V16 TO V18 DIGITAL SETS ONLY!"
    ;  TRANSMIT "^M~"       ; ## "ON V16 TO V18 DIGITAL SETS ONLY!"
;        WAITFOR "ITEM"

;      TRANSMIT "DES ~"
;      TRANSMIT OPDATA_F            ;###  (CHANGE "DES" IN SETS LD 81)
;      TRANSMIT "^M~"
;      WAITFOR "ITEM"

;      TRANSMIT "DES ~"
;      TRANSMIT "M500^M"            ;###  (CHANGE "DES" TO NUMBER REQUIRED)
;      WAITFOR "ITEM"

;      TRANSMIT "CLS HTA FNA CFTA HBTA SFA^M"  ; ## "ALL FORWARDING DETAILS!"
;      WAITFOR "ITEM"

;      TRANSMIT "~FTR FDN "          ;##### (ONLY ON 500 SETS)
;      TRANSMIT OPDATA_E              ;##### (DN NUMBER IN SETS LD 81)
;      TRANSMIT "^M~"

;     WAITFOR "FTR"                ;##### (ONLY ON 500 SETS)
;         WAITFOR "ITEM"             ; ## "DIGITAL SETS ONLY"

;      TRANSMIT "~~EHT "
;      TRANSMIT OPDATA_E              ;##### (DN NUMBER IN SETS LD 81)
;      TRANSMIT "^M~"

;      WAITFOR "FTR"              ;##### (ONLY ON 500 SETS)
;         WAITFOR "ITEM"             ; ## "DIGITAL SETS ONLY"

;      TRANSMIT "~~EFD "
;      TRANSMIT OPDATA_E              ;##### (DN NUMBER IN SETS LD 81)
;      TRANSMIT "^M~"

;      WAITFOR "FTR"              ;##### (ONLY ON 500 SETS)
;         WAITFOR "ITEM"             ; ## "DIGITAL SETS ONLY"

;      TRANSMIT "~~SCC "
;      TRANSMIT OPDATA_E              ;##### (DN NUMBER IN SETS LD 81)
;      TRANSMIT "^M~"

;      WAITFOR "FTR"              ;##### (ONLY ON 500 SETS)
;         WAITFOR "ITEM"             ; ## "DIGITAL SETS ONLY"
;      TRANSMIT "~~^M~"              
;         WAITFOR "ITEM"              

          TRANSMIT "^M"    ; DON'T CHANGE THIS SETTING!
          waitfor "REQ"    ; DON'T CHANGE THIS SETTING!

ELSE 
call error
USERMSG "Crapped Out"
exit
endif

count=count+1

CALL COUNTER        

      ENDWHILE
    
    FCLOSE 1
 
 ;               ######## TO LIST DATE CHANGE AFTER EASYCHG IS DONE

      TRANSMIT "****^M~~~~"
      TRANSMIT "LD 81^M"
      WAITFOR "REQ"
      TRANSMIT "~LST^M"
      WAITFOR "CUST"   
      TRANSMIT "~^M"
      WAITFOR "DATE"
      TRANSMIT "~~^M"
      WAITFOR "PAGE"   
      TRANSMIT "~^M"
      WAITFOR "DES"
      TRANSMIT "~^M"
      WAITFOR "FEAT"   
      TRANSMIT "~~SETS^M"
      WAITFOR "FEAT"
      TRANSMIT "~^M"
      WAITFOR "NACT" FOREVER
      TRANSMIT "^M"
      WAITFOR "REQ" FOREVER
      TRANSMIT "END^M"

;          ######## TO CANCEL ANY ALARMS IN LD 32 AFTER CHANGES ARE MADE      
      
 ;      TRANSMIT "****^M"
       TRANSMIT "~~LD 32^M~~"
       TRANSMIT "~~~~CMIN ALL^M~~~~~~~~~~"
       TRANSMIT "~~~~CDSP^M~~~~~~~~~~~~"
       TRANSMIT "****^M~~~~~~"

;   ######################   "VERSION 19.xx Onwards, Time Forward / Backward 1 Hour!"
;                                      "United Kingdom Settings!"

;  TRANSMIT "LD 2^M~~~~"
;  TRANSMIT "TTAD~~~~~~~"
;  TRANSMIT "TDST^M~~~~~"
;  TRANSMIT "FWTM 3 5 1 02^M"
;  TRANSMIT "BWTM 10 5 1 02^M"
;  TRANSMIT "SDST ON^M~~~~"
;  TRANSMIT "****^M~~~"

;               ######## TO DO A DUMP IN LD 43 AFTER CHANGES ARE MADE      
      
       TRANSMIT "~~LD 43^M~~"
       TRANSMIT "~~~~EDD^M~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
       TRANSMIT "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
       TRANSMIT "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
       WAITFOR "DATABASE"   
;      WAITFOR "DATADUMP" FOREVER      ; ### OPTION 11C ONWARDS!  

  MSPAUSE 100


  TRANSMIT "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~****^M~~~~~~~"
;  TRANSMIT "~~~~~~~LOGO^M"

  capture off

ENDPROC

PROC COUNTER
	BIT=COUNT*100
	PERCENT=BIT/TOTAL

   STATMSG "%i OF %i  -   %i %% Done    -    Start Time: %s" COUNT TOTAL PERCENT S_Time
ENDPROC

PROC ERROR
USERMSG "Crapped Out"
exit
ENDPROC
回复 支持 反对

使用道具 举报

12下一页
您需要登录后才可以回帖 登录 | 立即注册 新浪微博登陆 千家通行证登陆

本版积分规则

千家智客微信号
千家智客微信
玩物说商城
玩物说商城