以前见过一个女人,就是用汇编写计费程序,厉害!
我弄到了部分源程序,大家看看
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: |
|