-
Notifications
You must be signed in to change notification settings - Fork 0
/
newinter.txt
66 lines (66 loc) · 1.47 KB
/
newinter.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
COPY START 0000
FIRST STL RETADR 0000 0003
!! LDB #LENGTH 0003 0006
!! BASE LENGTH
CLOOP +JSUB RDREC 0006 000A
!! LDA LENGTH 000A 000D
!! COMP #0 000D 0010
!! JEQ ENDFIL 0010 0013
!! +JSUB WRREC 0013 0017
ABC LDB =X'07' 0017 001A
!! LDA =C'DF' 001A 001D
!! J CLOOP 001D 0020
ENDFIL LDA EOF 0020 0023
!! STA BUFFER 0023 0026
!! LDA #3 0026 0029
!! STA LENGTH 0029 002C
!! +JSUB WRREC 002C 0030
!! J @RETADR 0030 0033
!! LTORG !!
* =X'07' !! 0033 0034
* =C'DF' !! 0034 0036
EOF BYTE C'EOF' 0036 0039
RETADR RESW 1 0039 003C
LENGTH RESW 1 003C 003F
BUFFER RESB 4096 003F 103F
BUFEND EQU * 103F 103F
MAXLEN EQU BUFEND+BUFFER 107E 103F
VALUE EQU MAXLEN+200 1146 103F
.
. SUBROUTINE TO READ RECORD FROM BUFFER
.
RDREC CLEAR X 103F 1041
!! CLEAR A 1041 1043
!! CLEAR S 1043 1045
!! +LDT #MAXLEN 1045 1049
RLOOP TD INPUT 1049 104C
!! JEQ RLOOP 104C 104F
!! RD INPUT 104F 1052
!! COMPR A,S 1052 1054
!! LDA =C'FKF' 1054 1057
!! JEQ EXIT 1057 105A
!! STCH BUFFER,X 105A 105D
!! TIXR T 105D 105F
!! JLT RLOOP 105F 1062
EXIT STX LENGTH 1062 1065
!! RSUB !! 1065 1068
INPUT BYTE X'F1' 1068 1069
.
. subroutinE TO WRITE RECORDS FROM BUFFER
.
WRREC CLEAR X 1069 106B
!! LDT LENGTH 106B 106E
WLOOP TD OUTPUT 106E 1071
!! JEQ WLOOP 1071 1074
!! LDCH BUFFER,X 1074 1077
!! WD OUTPUT 1077 107A
!! TIXR T 107A 107C
!! LDA =C'ADD' 107C 107F
!! LDB =C'ADD' 107F 1082
!! JLT WLOOP 1082 1085
!! RSUB !! 1085 1088
OUTPUT BYTE X'05' 1088 1089
!! END FIRST 1089
* =C'FKF' !! 1089 108C
* =C'ADD' !! 108C 108F
. End Of File