forked from virtualagc/virtualagc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathValidateLXCH.agc
113 lines (108 loc) · 2.1 KB
/
ValidateLXCH.agc
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
# Copyright 2004 Ronald S. Burkey <info@sandroid.org>
#
# This file is part of yaAGC.
#
# yaAGC is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# yaAGC is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with yaAGC; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# Filename: ValidateLXCH.agc
# Purpose: This is the part of the Validation suite used for checking
# the LXCH instruction.
# Mod history: 07/04/04 RSB. Began.
INCR ERRNUM
# First we'll swap L and TEMPI
INCR ERRSUB # 1
CA ONE
TS TEMPI
CA NEGONE
TS L
LXCH TEMPI
CA TEMPI
AD ONE
EXTEND
BZF LXCHOK1
TCF VLXERROR
LXCHOK1 INCR ERRSUB # 2
CA L
AD NEGONE
EXTEND
BZF LXCHOK2
TCF VLXERROR
LXCHOK2
# Now we'll swap A and L (without overflow)
INCR ERRSUB # 3
CA NEGONE
TS L
CA ONE
LXCH A
AD ONE
EXTEND
BZF LXCHOK3
TCF VLXERROR
LXCHOK3 INCR ERRSUB # 4
CA L
AD NEGONE
EXTEND
BZF LXCHOK4
TCF VLXERROR
LXCHOK4
# Now we'll swap A and L with + overflow.
INCR ERRSUB # 5
CA NEGONE
TS L
CA MAXP
AD ONE
OVSK
TCF VLXERROR
INCR ERRSUB # 6
OVSK
TCF VLXERROR
INCR ERRSUB # 7
LXCH A
AD ONE
EXTEND
BZF LXCHOK5
TCF VLXERROR
LXCHOK5 INCR ERRSUB # 10 octal
CA L
EXTEND
BZF LXCHOK6
TC VLXERROR
LXCHOK6
# Now we'll swap A and L with - overflow.
INCR ERRSUB # 11
CA NEGONE
TS L
CA MAXN
AD NEGONE
OVSK
TCF VLXERROR
INCR ERRSUB # 12
OVSK
TCF VLXERROR
INCR ERRSUB # 13
LXCH A
AD ONE
EXTEND
BZF LXCHOK7
TCF VLXERROR
LXCHOK7 INCR ERRSUB # 14
CA L
EXTEND
BZF LXCHOK8
TC VLXERROR
LXCHOK8
TCF +2
VLXERROR TC ERRORDSP
CA ZEROES
TS ERRSUB