-
Notifications
You must be signed in to change notification settings - Fork 85
/
Copy pathcode17
157 lines (157 loc) · 1.83 KB
/
code17
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
;'CODE17'
GETBYT JSR FRMNUM
CONINT JSR POSINT
LDX FACMO
BNE GOFUC
LDX FACLO
JMP CHRGOT
VAL JSR LEN1
BNE *+5
JMP ZEROFC
LDX TXTPTR
LDY TXTPTR+1
STX STRNG2
STY STRNG2+1
LDX INDEX1
STX TXTPTR
CLC
ADC INDEX1
STA INDEX2
LDX INDEX1+1
STX TXTPTR+1
BCC VAL2
INX
VAL2 STX INDEX2+1
LDY #0
LDA (INDEX2)Y
PHA
LDA #0
STA (INDEX2)Y
JSR CHRGOT
JSR FIN
PLA
LDY #0
STA (INDEX2)Y
ST2TXT LDX STRNG2
LDY STRNG2+1
STX TXTPTR
STY TXTPTR+1
VALRTS RTS
GETNUM JSR FRMNUM
JSR GETADR
COMBYT JSR CHKCOM
JMP GETBYT
GETADR LDA FACSGN
BMI GOFUC
LDA FACEXP
CMP #145
BCS GOFUC
JSR QINT
LDA FACMO
LDY FACMO+1
STY POKER
STA POKER+1
RTS
PEEK JSR GETADR
LDY #0
CMP #$C0
BCC GETCON
CMP #$E1
BCC DOSGFL
GETCON LDA (POKER)Y
TAY
DOSGFL JMP SNGFLT
POKE JSR GETNUM
TXA
LDY #0
STA (POKER)Y
RTS
FNWAIT JSR GETNUM
STX ANDMSK
LDX #0
JSR CHRGOT
BEQ STORDO
JSR COMBYT
STORDO STX EORMSK
LDY #0
WAITER LDA (POKER)Y
EOR EORMSK
AND ANDMSK
BEQ WAITER
ZERRTS RTS
FADDH LDA #<FHALF
LDY #>FHALF
JMP FADD
FSUB JSR CONUPK
FSUBT LDA FACSGN
EOR #@377
STA FACSGN
EOR ARGSGN
STA ARISGN
LDA FACEXP
JMP FADDT
FADD5 JSR SHIFTR
BCC FADD4
FADD JSR CONUPK
FADDT BNE *+5
JMP MOVFA
LDX FACOV
STX OLDOV
LDX #ARGEXP
LDA ARGEXP
FADDC TAY
BEQ ZERRTS
SEC
SBC FACEXP
BEQ FADD4
BCC FADDA
STY FACEXP
LDY ARGSGN
STY FACSGN
EOR #@377
ADC #0
LDY #0
STY OLDOV
LDX #FAC
BNE FADD1
FADDA LDY #0
STY FACOV
FADD1 CMP #$F9
BMI FADD5
TAY
LDA FACOV
LSR 1,X
JSR ROLSHF
FADD4 BIT ARISGN
BPL FADD2
LDY #FACEXP
CPX #ARGEXP
BEQ SUBIT
LDY #ARGEXP
SUBIT SEC
EOR #@377
ADC OLDOV
STA FACOV
LDA 3+ADDPRC,Y
SBC 3+ADDPRC,X
STA FACLO
LDA ADDPRC+2,Y
SBC 2+ADDPRC,X
STA FACMO
LDA 2,Y
SBC 2,X
STA FACMOH
LDA 1,Y
SBC 1,X
STA FACHO
FADFLT BCS NORMAL
JSR NEGFAC
NORMAL LDY #0
TYA
CLC
NORM3 LDX FACHO
BNE NORM1
LDX FACHO+1
STX FACHO
LDX FACMOH+1
.FIL CODE18