ack/emtest/tests

3603 lines
29 KiB
Plaintext
Raw Normal View History

1985-01-01 19:30:24 +00:00
TEST 000: empty
MAIN 0
TEST 001: OK
MAIN 0
OK
TEST 002: test loc, bne
MAIN 0
loc 0
loc 0
bne *1
OK
loc 1
loc 1
bne *1
OK
loc -1
loc -1
bne *1
OK
loc 127
loc 127
bne *1
OK
loc -127
loc -127
bne *1
OK
loc -128
loc -128
bne *1
OK
#if WS > 1
loc 255
loc 255
bne *1
OK
loc 256
loc 256
bne *1
OK
loc 257
loc 257
bne *1
OK
loc 32767
loc 32767
bne *1
OK
loc -32767
loc -32767
bne *1
OK
loc -32768
loc -32768
bne *1
OK
#endif WS > 1
#if WS > 2
loc 65535
loc 65535
bne *1
OK
loc 65536
loc 65536
bne *1
OK
loc 65537
loc 65537
bne *1
OK
loc 2147483647
loc 2147483647
bne *1
OK
loc -2147483647
loc -2147483647
bne *1
OK
loc -2147483648
loc -2147483648
bne *1
OK
#endif WS > 2
TEST 003: test signed and unsigned loc
MAIN 0
#if WS == 1
loc 128
loc -128
bne *1
OK
loc 129
loc -127
bne *1
OK
loc 255
loc -1
bne *1
OK
#endif
#if WS == 2
loc 32768
loc -32768
bne *1
OK
loc 32769
loc -32767
bne *1
OK
loc 65535
loc -1
bne *1
OK
#endif
#if WS == 4
loc 2147483648
loc -2147483648
bne *1
OK
loc 2147483649
loc -2147483647
bne *1
OK
loc 4294967295
loc -1
bne *1
OK
#endif
TEST 004: test lol, stl
MAIN 8
loc 95
stl -4
lol -4
loc 95
bne *1
OK
lol 0
stl -4
loc 125
stl -8
loc 125
lol -8
bne *1
OK
lol 0
lol -4
bne *1
OK
TEST 005: test loe, ste
1987-03-09 12:42:42 +00:00
HOL 8
1985-01-01 19:30:24 +00:00
MAIN 0
loc 95
ste WS
loe WS
1985-01-01 19:30:24 +00:00
loc 95
bne *1
OK
loc 125
ste 0
loc 125
loe 0
bne *1
OK
loc 95
ste 0
loe WS
1985-01-01 19:30:24 +00:00
loe 0
bne *1
OK
TEST 006: test named global data: con, rom, bss
a006
bss 4,0,0
b006
con 35
c006
bss 4,0,1
d006
bss 4,35,1
e006
rom 57
MAIN 0
loc 0
loe c006
bne *1
OK
loe b006
ste a006
loe d006
loe a006
bne *1
OK
loe e006
ste b006
loc 57
loe b006
bne *1
OK
TEST 007: test lal, lil
MAIN 12
lal -8
#if WS == PS
stl -4
#endif
#if WS*2 == PS
sdl -4
#endif
loc 117
stl -8
lil -4
loc 117
bne *1
OK
TEST 008: test sil
MAIN 12
loc 29
stl -8
lal -8
#if WS == PS
stl -4
#endif
#if WS*2 == PS
sdl -4
#endif
loc 110
sil -4
lol -8
loc 110
bne *1
OK
TEST 009: test lof
MAIN 20
lal -16
loc 120
stl -12
lof 4
loc 120
bne *1
OK
TEST 010: test stf
MAIN 20
loc 180
lal -16
stf 8
lol -8
loc 180
bne *1
OK
TEST 011: test loi WS
MAIN 20
loc 140
stl -12
lal -12
loi WS
loc 140
bne *1
OK
TEST 012: test loi 1, sti 1
MAIN 20
#if WS > 1
loc 519
lal -10
sti 1
lal -10
loi 1
loc 7
bne *1
OK
#endif
TEST 013: test loi 2*WS
MAIN 20
loc 77
stl -12
loc 119
stl -12+WS
lal -12
loi 2*WS
loc 77
bne *1
loc 119
bne *1
OK
TEST 014: test loi 4*WS
MAIN 20
loc 150
stl -16+(3*WS)
loc 152
stl -16+(2*WS)
loc 154
stl -16+WS
loc 156
stl -16
lal -16
loi 4*WS
loc 156
bne *1
loc 154
bne *1
loc 152
bne *1
loc 150
bne *1
OK
TEST 015: test los WS with 1
MAIN 20
loc 7
lal -10
sti 1
lal -10
loc 1
los WS
loc 7
bne *1
OK
TEST 016: test los WS with 2
MAIN 20
#if WS == 1
loc 77
loc 78
stl -12
stl -11
lal -12
loc 2
los WS
loc 78
bne *1
loc 77
bne *1
#endif
#if WS > 1
loc 777
stl -12
lal -12
loc 2
los WS
loc 777
bne *1
#endif
OK
TEST 017: test los WS with 4
MAIN 20
#if WS == 1
loc 14
loc 15
loc 16
loc 17
lal -12
sti 4
lal -12
loc 4
los WS
loc 17
bne *1
loc 16
bne *1
loc 15
bne *1
loc 14
bne *1
#endif
#if WS == 2
loc 3001
loc 3002
stl -12
stl -10
lal -12
loc 4
los WS
loc 3002
bne *1
loc 3001
bne *1
#endif
#if WS > 2
loc 123001
stl -12
lal -12
loc 4
los WS
loc 123001
bne *1
#endif
OK
TEST 018: test ldl
MAIN 20
loc 77
stl -12
loc 123
stl -12+WS
ldl -12
loc 77
bne *1
loc 123
bne *1
OK
TEST 019: test lde
1987-03-09 12:42:42 +00:00
HOL 20
1985-01-01 19:30:24 +00:00
MAIN 0
loc 70
ste 12
loc 71
ste 12+WS
lde 12
loc 70
bne *1
loc 71
bne *1
OK
TEST 020: test ldf
MAIN 20
loc 123
loc 77
1987-04-28 15:09:39 +00:00
sdl -8
lal -13
1985-01-01 19:30:24 +00:00
ldf 5
loc 77
bne *1
loc 123
bne *1
OK
TEST 021: test ldf
MAIN 20
loc 75
stl -12
loc 77
stl -12+WS
lal -20
ldf 8
loc 75
bne *1
loc 77
bne *1
OK
TEST 022: test sdl
MAIN 20
loc 30
loc 31
sdl -12
lol -12+WS
loc 30
bne *1
lol -12
loc 31
bne *1
OK
TEST 023: test sde
1987-03-09 12:42:42 +00:00
HOL 24
1985-01-01 19:30:24 +00:00
MAIN 0
loc 40
loc 41
sde 16
loe 16
loc 41
bne *1
loe 16+WS
loc 40
bne *1
OK
TEST 024: test sdf
1987-03-09 12:42:42 +00:00
HOL 24
1985-01-01 19:30:24 +00:00
MAIN 0
loc 51
loc 50
lae 6
sdf 10
loe 16
loc 50
bne *1
loc 51
loe 16+WS
bne *1
OK
TEST 025: test sti 1
MAIN 20
loc 4136
lal -11
sti 1
loc 1034
lal -10
sti 1
lal -10
loi 1
loc 10
bne *1
lal -11
loi 1
loc 40
bne *1
OK
TEST 026: test sti 1 and lol
MAIN 20
1985-01-01 19:30:24 +00:00
loc 257
stl -12+WS
loc 514
stl -12-WS
loc 50
lal -12
sti 1
#if WS > 1
loc -50
lal -11
sti 1
#endif
#if WS > 2
loc 49
lal -10
sti 1
loc -49
lal -9
sti 1
#endif
loc 257
lol -12+WS
bne *1
loc 514
lol -12-WS
bne *1
OK
TEST 027: test sti 2
MAIN 20
#if WS == 1
1985-02-11 14:33:04 +00:00
ldc 90
#else
1985-01-01 19:30:24 +00:00
loc 90
1985-02-11 14:33:04 +00:00
#endif
1985-01-01 19:30:24 +00:00
lal -12
sti 2
1985-02-11 14:33:04 +00:00
#if WS != 2
lal -12
loi 2
#else
1985-01-01 19:30:24 +00:00
lol -12
1985-02-11 14:33:04 +00:00
#endif
#if WS == 1
ldc 90
#else
1985-01-01 19:30:24 +00:00
loc 90
1985-02-11 14:33:04 +00:00
#endif
1985-01-01 19:30:24 +00:00
bne *1
OK
TEST 028: test sti 4
MAIN 20
#if WS == 1
loc 100
loc 101
#endif
#if WS <= 2
loc 102
#endif
loc 103
1987-04-28 15:09:39 +00:00
lal -16
1985-01-01 19:30:24 +00:00
sti 4
1987-04-28 15:09:39 +00:00
lol -16
1985-01-01 19:30:24 +00:00
loc 103
bne *1
OK
TEST 029: test sts WS with 1
MAIN 20
loc 57
lal -13
sti 1
loc 123
lal -11
sti 1
loc 20
lal -12
loc 1
sts WS
lal -12
loi 1
loc 20
bne *1
lal -11
loi 1
loc 123
bne *1
lal -13
loi 1
loc 57
bne *1
OK
TEST 030: test sts WS with WS
MAIN 20
loc 210
lal -12
loc WS
sts WS
lol -12
loc 210
bne *1
OK
TEST 031: test sts WS with 4
MAIN 20
#if WS == 1
loc 100
loc 101
#endif
#if WS <= 2
loc 102
#endif
loc 103
1987-04-28 15:09:39 +00:00
lal -16
1985-01-01 19:30:24 +00:00
loc 4
sts WS
1987-04-28 15:09:39 +00:00
lol -16
1985-01-01 19:30:24 +00:00
loc 103
bne *1
OK
TEST 032: test adi WS
MAIN 0
loc 1
loc 1
adi WS
loc 2
bne *1
OK
loc 5
loc -6
adi WS
loc -1
bne *1
OK
#if WS >= 2
loc -1007
loc +999
adi WS
loc -8
bne *1
OK
loc -1300
loc +1405
adi WS
loc 105
bne *1
OK
loc -30000
loc -20
adi WS
loc -30020
bne *1
OK
#endif
#if WS >= 4
loc -100007
loc +99999
adi WS
loc -8
bne *1
OK
loc -1300
loc +140567
adi WS
loc 139267
bne *1
OK
loc -30000000
loc -20
adi WS
loc -30000020
bne *1
OK
#endif
TEST 033: test sbi WS
MAIN 0
loc 1
loc 1
sbi WS
loc 0
bne *1
OK
loc 5
loc -6
sbi WS
loc +11
bne *1
OK
#if WS >= 2
loc -1007
loc +999
sbi WS
loc -2006
bne *1
OK
loc -1300
loc +1405
sbi WS
loc -2705
bne *1
OK
loc -30000
loc -20
sbi WS
loc -29980
bne *1
OK
#endif
#if WS >= 4
loc -100007
loc +99999
sbi WS
loc -200006
bne *1
OK
loc -1300
loc +140567
sbi WS
loc -141867
bne *1
OK
loc -30000000
loc -20
sbi WS
loc -29999980
bne *1
OK
#endif
TEST 034: test mli WS
MAIN 0
loc 5
loc 9
mli WS
loc 45
bne *1
OK
loc 0
loc 10
mli WS
loc 0
bne *1
OK
#if WS > 1
loc -99
loc 7
mli WS
loc -693
bne *1
OK
loc -100
loc -90
mli WS
loc 9000
bne *1
OK
#endif
#if WS > 2
loc 123456
loc 200
mli WS
loc 24691200
bne *1
OK
#endif
TEST 035: test dvi WS
MAIN 0
loc 15
loc 5
dvi WS
loc 3
bne *1
OK
loc 100
loc -7
dvi WS
loc -14
bne *1
OK
loc -100
loc 7
dvi WS
loc -14
bne *1
OK
#if WS >= 2
loc -1000
loc -201
dvi WS
loc 4
bne *1
OK
#endif
#if WS >= 4
loc 1234567
loc -100
dvi WS
loc -12345
bne *1
OK
#endif
TEST 036: test rmi WS
MAIN 0
loc 100
loc 7
rmi WS
loc 2
bne *1
OK
loc -100
loc 7
rmi WS
loc -2
bne *1
OK
loc 100
loc -7
rmi WS
loc 2
bne *1
OK
loc -100
loc -7
rmi WS
loc -2
bne *1
OK
#if WS >= 2
loc -1000
loc -201
rmi WS
loc -196
bne *1
OK
#endif
#if WS >= 4
loc 1234567
loc -100
rmi WS
loc 67
bne *1
OK
#endif
TEST 037: test ngi WS
MAIN 0
loc 100
ngi WS
loc -100
bne *1
OK
loc -100
ngi WS
loc 100
bne *1
OK
TEST 038: test sli,slu WS
MAIN 0
loc 5
loc 3
sli WS
loc 40
bne *1
OK
loc -2
loc 4
sli WS
loc -32
bne *1
OK
loc 5
loc 3
slu WS
loc 40
bne *1
OK
loc -2
loc 4
slu WS
loc -32
bne *1
OK
TEST 039: test sri,sru WS
MAIN 0
loc 64
loc 5
sri WS
loc 2
bne *1
OK
loc -3
loc 2
sri WS
loc -1
bne *1
OK
loc -16
loc 3
sri WS
loc -2
bne *1
OK
loc 64
loc 5
sru WS
loc 2
bne *1
OK
loc -3
loc 2
sru WS
#if WS == 1
loc 63
#endif
#if WS == 2
loc 16383
#endif
#if WS == 4
loc 1073741823
#endif
bne *1
OK
TEST 040: test rol WS
MAIN 0
loc 1
loc 3
rol WS
loc 8
bne *1
OK
#if WS > 1
loc 16384
1985-02-11 14:33:04 +00:00
loc WS * 8 - 1
1985-01-01 19:30:24 +00:00
rol WS
loc 8192
bne *1
OK
loc -2
1985-02-11 14:33:04 +00:00
loc WS * 8 - 1
1985-01-01 19:30:24 +00:00
rol WS
1985-02-11 14:33:04 +00:00
#if WS == 2
1985-01-01 19:30:24 +00:00
loc 32767
1985-02-11 14:33:04 +00:00
#endif
#if WS == 4
loc 2147483647
#endif
1985-01-01 19:30:24 +00:00
bne *1
OK
loc -28671
loc 0
rol WS
loc -28671
bne *1
OK
#endif
TEST 041: test ror WS
MAIN 0
loc 4
loc 5
ror WS
#if WS == 1
loc 32
#endif
#if WS == 2
loc 8192
#endif
#if WS == 4
loc 536870912
#endif
bne *1
OK
#if WS == 2
loc 32767
loc 15
ror WS
loc -2
bne *1
OK
#endif
loc -28
loc 0
ror WS
loc -28
bne *1
OK
TEST 042: test inc
MAIN 0
loc 20
inc
loc 21
bne *1
OK
loc -50
inc
loc -49
bne *1
OK
TEST 043: test dec
MAIN 0
loc 66
dec
loc 65
bne *1
OK
loc -44
dec
loc -45
bne *1
OK
TEST 044: test adp
MAIN 20
lal -10
adp -2
lal -12
cmp
zne *1
OK
loc 519
lal -11
sti 1
lal -12
adp 1
loi 1
loc 7
bne *1
OK
TEST 045: test inn WS
MAIN 0
loc 8
loc 3
inn WS
loc 1
bne *1
OK
loc 8
loc 4
inn WS
loc 0
bne *1
OK
loc 2
loc -5
inn WS
loc 0
bne *1
OK
loc -5
loc 3
inn WS
loc 1
bne *1
OK
TEST 046: test inn ?
MAIN 0
loc 8
loc 3
loc WS
inn ?
loc 1
bne *1
OK
loc 8
loc 4
loc WS
inn ?
loc 0
bne *1
OK
loc 2
loc -5
loc WS
inn ?
loc 0
bne *1
OK
loc -5
loc 3
loc WS
inn ?
loc 1
bne *1
OK
TEST 047: test set
MAIN 0
loc 3
set WS
loc 8
bne *1
OK
loc 6
set 2*WS
loc 64
bne *1
loc 0
bne *1
OK
loc 0
set 4*WS
loc 1
bne *1
loc 0
bne *1
loc 0
bne *1
loc 0
bne *1
OK
TEST 048: test set ?
MAIN 0
loc 3
loc WS
set ?
loc 8
bne *1
OK
loc 6
loc 2*WS
set ?
loc 64
bne *1
loc 0
bne *1
OK
loc 0
loc 4*WS
set ?
loc 1
bne *1
loc 0
bne *1
loc 0
bne *1
loc 0
bne *1
OK
TEST 049: test aar
a049
rom 5,2,4
b049
con 5,2,1
MAIN 20
lal -12
loc 5
lae a049
aar WS
lal -12
cmp
zne *1
OK
lal -11
loc 7
lae b049
aar WS
lal -9
cmp
zne *1
OK
TEST 050: test aar ?
a050
rom 5,2,4
b050
con 5,2,1
MAIN 20
lal -12
loc 5
lae a050
loc WS
aar ?
lal -12
cmp
zne *1
OK
lal -11
loc 7
lae b050
loc WS
aar ?
lal -9
cmp
zne *1
OK
TEST 051: test lar
a051
rom 5,2,2*WS
b051
con 5,2,1
MAIN 20
loc 40
loc 41
sdl -12+(2*WS)
lal -12
loc 6
lae a051
lar WS
loc 41
bne *1
loc 40
bne *1
OK
loc 42
lal -9
sti 1
lal -11
loc 7
lae b051
lar WS
lal -9
loi 1
bne *1
OK
TEST 052: test lar ?
a052
rom 5,2,2*WS
b052
con 5,2,1
MAIN 20
loc 40
loc 41
sdl -12+(2*WS)
lal -12
loc 6
lae a052
loc WS
lar ?
loc 41
bne *1
loc 40
bne *1
OK
loc 42
lal -9
sti 1
lal -11
loc 7
lae b052
loc WS
lar ?
lal -9
loi 1
bne *1
OK
TEST 053: test sar
a053
rom 5,2,3*WS
b053
con 5,2,1
1985-02-11 14:33:04 +00:00
MAIN 28 : assert WS <= 8
1985-01-01 19:30:24 +00:00
loc 39
loc 40
loc 41
1985-02-11 14:33:04 +00:00
lal -28
1985-01-01 19:30:24 +00:00
loc 6
lae a053
sar WS
1985-02-11 14:33:04 +00:00
lal -28+(3*WS)
1985-01-01 19:30:24 +00:00
loi 3*WS
loc 41
bne *1
loc 40
bne *1
loc 39
bne *1
OK
loc -2
lal -11
loc 7
lae b053
sar WS
lal -9
loi 1
loc 254
bne *1
OK
TEST 054: test sar ?
a054
rom 5,2,3*WS
b054
con 5,2,1
1985-02-11 14:33:04 +00:00
MAIN 28
1985-01-01 19:30:24 +00:00
loc 39
loc 40
loc 41
1985-02-11 14:33:04 +00:00
lal -28
1985-01-01 19:30:24 +00:00
loc 6
lae a054
loc WS
sar ?
1985-02-11 14:33:04 +00:00
lal -28+(3*WS)
1985-01-01 19:30:24 +00:00
loi 3*WS
loc 41
bne *1
loc 40
bne *1
loc 39
bne *1
OK
loc -2
lal -11
loc 7
lae b054
loc WS
sar ?
lal -9
loi 1
loc 254
bne *1
OK
TEST 055: test tlt
MAIN 0
loc 1
tlt
loc 0
bne *1
OK
loc 0
tlt
loc 0
bne *1
OK
loc -3
tlt
loc 1
bne *1
OK
TEST 056: test tle
MAIN 0
loc 8
tle
loc 0
bne *1
OK
loc 0
tle
loc 1
bne *1
OK
loc -19
tle
loc 1
bne *1
OK
TEST 057: test teq
MAIN 0
loc 17
teq
loc 0
bne *1
OK
loc 0
teq
loc 1
bne *1
OK
loc -100
teq
loc 0
bne *1
OK
TEST 058: test tne
MAIN 0
loc 76
tne
loc 1
bne *1
OK
loc 0
tne
loc 0
bne *1
OK
loc -99
tne
loc 1
bne *1
OK
TEST 059: test tge
MAIN 0
loc 14
tge
loc 1
bne *1
OK
loc 0
tge
loc 1
bne *1
OK
loc -76
tge
loc 0
bne *1
OK
TEST 060: test tgt
MAIN 0
loc 20
tgt
loc 1
bne *1
OK
loc 0
tgt
loc 0
bne *1
OK
loc -66
tgt
loc 0
bne *1
OK
TEST 061: test cmi WS
MAIN 0
loc 10
loc 20
cmi WS
tlt
loc 1
bne *1
OK
loc 20
loc 10
cmi WS
tgt
loc 1
bne *1
OK
loc 44
loc 44
cmi WS
loc 0
bne *1
OK
TEST 062: test cmp, adp, cmu
MAIN 20
lal -5
lal -2
cmp
tlt
loc 1
bne *1
OK
lal -2
lal -5
cmp
tle
loc 0
bne *1
OK
lal -2
lal -2
cmp
loc 0
bne *1
OK
lal -5
adp 3
lal -2
cmp
loc 0
bne *1
OK
lal -5
adp 4
lal -2
cmp
tge
loc 1
bne *1
OK
loc 6
loc 6
cmu WS
loc 0
bne *1
OK
loc 17
loc 27
cmu WS
tlt
loc 1
bne *1
OK
loc 17
loc 6
loc 27
loc 6
cmu 2*WS
tlt
loc 1
bne *1
OK
loc 6
loc 27
loc 6
loc 17
cmu 2*WS
tgt
loc 1
bne *1
OK
TEST 063: test cms
MAIN 0
loc 6
loc -10
loc -125
loc 30
loc 6
loc -10
loc -126
loc 30
loc 4*WS
cms
tne
loc 1
bne *1
OK
TEST 064: test blt
MAIN 0
loc 3
loc 4
blt *1064
bra *1
1064
loc 4
loc 3
blt *1
loc -5
loc -4
blt *2064
bra *1
2064
loc -4
loc -5
blt *1
loc 4
loc 4
blt *1
OK
TEST 065: test ble
MAIN 0
loc 3
loc 4
ble *1065
bra *1
1065
loc 4
loc 3
ble *1
loc -99
loc -5
ble *2065
bra *1
2065
loc -99
loc -99
ble *3065
bra *1
3065
loc 100
loc -100
ble *1
OK
TEST 066: test beq
MAIN 0
loc 3
loc 3
beq *1066
bra *1
1066
loc 3
loc 4
beq *1
loc -18
loc -17
beq *1
loc 0
loc 0
beq *2066
bra *1
2066
OK
TEST 067: test bne
MAIN 0
loc 50
loc 50
bne *1
loc 50
loc 51
bne *1067
bra *1
1067
loc 0
loc 0
bne *1
OK
TEST 068: test bge
MAIN 0
loc 100
loc 101
bge *1
loc 101
loc 100
bge *1068
bra *1
1068
loc -100
loc -99
bge *1
loc -100
loc 100
bge *1
loc 0
loc 0
bge *2068
bra *1
2068
loc 50
loc 50
bge *3068
bra *1
3068
OK
TEST 069: test bgt
MAIN 0
loc 3
loc 10
bgt *1
loc 10
loc 3
bgt *1069
bra *1
1069
loc -100
loc -50
bgt *1
loc -100
loc 50
bgt *1
loc 5
loc 5
bgt *1
OK
TEST 070: test zlt
MAIN 0
loc 4
zlt *1
loc -4
zlt *1070
bra *1
1070
loc 0
zlt *1
OK
TEST 071: test zle
MAIN 0
loc 4
zle *1
loc -4
zlt *1071
bra *1
1071
loc 0
zle *2071
bra *1
2071
OK
TEST 072: test zeq
MAIN 0
loc 4
zeq *1
loc -4
zeq *1
loc 0
zeq *1072
bra *1
1072
OK
TEST 073: test zne
MAIN 0
loc 4
zne *1073
bra *1
1073
loc -4
zne *2073
bra *1
2073
loc 0
zne *1
OK
TEST 074: test zge
MAIN 0
loc 4
zge *1074
bra *1
1074
loc -4
zge *1
loc 0
zge *2074
bra *1
2074
OK
TEST 075: test zgt
MAIN 0
loc 4
zgt *1075
bra *1
1075
loc -4
zgt *1
loc 0
zgt *1
OK
TEST 076: test asp
MAIN 12
loc 104
loc 4
loc 5
loc 6
asp 2*WS
stl -4
loc 104
bne *1
OK
TEST 077: test cal
1987-03-09 12:42:42 +00:00
HOL 8
1985-01-01 19:30:24 +00:00
MAIN 0
cal $p077
loe 4
loc 34
bne *1
OK
PROC
pro $p077,0
loc 34
ste 4
ret 0
end
TEST 078: test cai
1987-03-09 12:42:42 +00:00
HOL 8
1985-01-01 19:30:24 +00:00
MAIN 0
lpi $p078
cai
loe 4
loc 34
bne *1
OK
PROC
pro $p078,0
loc 34
ste 4
ret 0
end
TEST 079: test ads WS
MAIN 20
lal -6
loc -2
ads WS
lal -8
cmp
zne *1
OK
lal -6
loc 2
ads WS
lal -4
cmp
zne *1
OK
; test adp
lal -5
adp 1
lal -4
cmp
zne *1
OK
TEST 080: test sbs
HOL 12
MAIN 20
lal -4
lal -6
sbs WS
loc 2
bne *1
OK
lae 7
lae 10
sbs WS
loc -3
bne *1
OK
TEST 081: test lor
#define LB 0
#define SP 1
MAIN 20
lor LB
lxl 0
cmp
zne *1
OK
loc 31
lor SP
loi WS
bne *1
OK
lor SP
lal -12
sti PS
asp -4
lor SP
lal -8
sti PS
asp 4
lal -12
loi PS
lal -8
loi PS
sbs WS
loc 4
bne *1
OK
TEST 082: test ass WS
#define SP 1
MAIN 20
loc 104
loc 50
loc 60
loc 2*WS
ass WS
loc 104
bne *1
OK
lor SP
lal -8
sti PS
loc -18
ass WS
lor SP
lal -4
sti PS
loc 18
ass WS
lal -8
loi PS
lal -4
loi PS
sbs WS
loc 18
bne *1
OK
TEST 083: test blm
1987-03-09 12:42:42 +00:00
HOL 28
1985-01-01 19:30:24 +00:00
MAIN 32
loc 61
ste 12
loc 0
stl -4
lae 12
lal -4
blm WS
lol -4
loc 61
bne *1
OK
loc 44
loc 43
loc 42
loc 41
lal -20
sti 4*WS
lal -20
lae 8
blm 4*WS
loe 8
loc 41
bne *1
loe 8+WS
loc 42
bne *1
loe 8+(2*WS)
loc 43
bne *1
loe 8+(3*WS)
loc 44
bne *1
OK
TEST 084: test bls WS
1987-03-09 12:42:42 +00:00
HOL 28
1985-01-01 19:30:24 +00:00
MAIN 32
loc 20
stl -8
lal -8
lae 20
loc WS
bls WS
loe 20
loc 20
bne *1
OK
1985-01-01 19:30:24 +00:00
loc 55
stl -8+WS
loc 56
stl -8
lal -8
lae 20
loc 2*WS
bls WS
loe 20
loc 56
bne *1
loe 20+WS
loc 55
bne *1
OK
TEST 085: test dup
MAIN 0
loc 199
dup WS
bne *1
OK
loc 130
loc 150
dup 2*WS
loc 150
bne *1
loc 130
bne *1
loc 150
bne *1
loc 130
bne *1
OK
; test dus WS
loc 400
loc 399
loc 2*WS
dus WS
loc 399
bne *1
loc 400
bne *1
loc 399
bne *1
loc 400
bne *1
OK
TEST 087: test rck
a087
con 10,14
MAIN 12
loc 10
lae a087
rck WS
inc
lae a087
rck WS
inc
lae a087
rck WS
inc
lae a087
rck WS
inc
lae a087
rck WS
stl -4
OK
TEST 088: test csa
MAIN 20
a088
con *1088,4,2,*3088,*2088,*4088
zrl -8
loc 4
5088
inc
dup WS
lae a088
csa WS
bra *1
3088
bra *1
2088
lol -8
loc 3
adi WS
stl -8
bra *5088
1088
inl -8
bra *6088
4088
lol -8
loc 2
adi WS
stl -8
bra *5088
6088
loc 7
bne *1
OK
lol -8
loc 6
bne *1
OK
TEST 089: test csb
MAIN 20
b089
rom *1089,3,-1,*3089,0,*2089,1,*4089
loc -1
zrl -12
5089
inc
dup WS
lae b089
csb WS
bra *1
3089
bra *1
2089
lol -12
loc 3
adi WS
stl -12
bra *5089
1089
inl -12
bra *6089
4089
lol -12
loc 2
adi WS
stl -12
bra *5089
6089
loc 2
bne *1
OK
lol -12
loc 6
bne *1
OK
TEST 090: now test loi again, because it is so tricky
MAIN 20
loc 256
lal -3
sti 1
loc 1
lal -4
sti 1
loc 517
lal -5
sti 1
loc 2
lal -6
sti 1
loc 1030
lal -8
1985-02-11 14:33:04 +00:00
sti 2
1985-01-01 19:30:24 +00:00
loc 4
lal -9
sti 1
lal -3
loi 1
loc 0
bne *1
OK
lal -3
adp -1
loi 1
loc 1
bne *1
OK
lal -3
adp -2
loi 1
loc 5
bne *1
OK
lal -3
adp -3
loi 1
loc 2
bne *1
OK
lal -4
adp -4
1985-02-11 14:33:04 +00:00
loi 2
1985-01-01 19:30:24 +00:00
loc 1030
bne *1
OK
lal -6
adp -3
loi 1
loc 4
bne *1
OK
TEST 091: now test sti 1 again
MAIN 12
loc 3
loc 2
loc 1
loc 7
loc 8
loc 10
lal -4
sti 1
lal -4
adp -1
sti 1
lal -4
adp -2
sti 1
lal -4
adp -3
sti 1
lal -4
adp -4
sti 1
lal -4
adp -5
sti 1
lal -4
loi 1
loc 10
bne *1
OK
lal -6
loi 1
loc 7
bne *1
OK
lal -8
loi 1
loc 2
bne *1
OK
TEST 092: test ldc and cii
MAIN 0
#ifdef W2S
ldc 0
bne *1
OK
ldc 1
loc 1
loc WS
loc W2S
cii
cmi W2S
zne *1
OK
ldc -1
loc -1
loc WS
loc W2S
cii
cmi W2S
zne *1
OK
loc -1
ldc -1
loc W2S
loc WS
cii
cmi WS
zne *1
OK
#if WS == 1
ldc -128
loc -128
#endif
#if WS == 2
ldc -32768
loc -32768
#endif
#if WS == 4
ldc -2147483648
loc -2147483648
#endif
loc WS
loc W2S
cii
cmi W2S
zne *1
OK
ldc -1
loc -1
bne *1
OK
loc -1
bne *1
OK
ldc 1
zeq *1092
; low order part on top of stack
loc 0
bne *1
OK
bra *2092
; high order part on top of stack
1092
loc 1
bne *1
OK
2092
#endif
TEST 093: test cii
MAIN 0
loc 123
dup WS
loc WS
dup WS
cii
bne *1
OK
#ifdef W2S
loc 0
loc WS
loc W2S
cii
loc 0
bne *1
loc 0
bne *1
OK
; dynamically determine format of doubles
loc 1
loc WS
loc W2S
cii
zeq *1093
; low order part on top of stack
loc 0
bne *1
OK
loc -3
loc WS
loc W2S
cii
loc -3
bne *1
loc -1
bne *1
OK
bra *2093
; high order part on top of stack
1093
loc 1
bne *1
OK
loc -3
loc WS
loc W2S
cii
loc -1
bne *1
loc -3
bne *1
OK
2093
#endif
TEST 094: test adi W2S
MAIN 0
#ifdef W2S
ldc 1
ldc 1
adi W2S
ldc 2
cmi W2S
zne *1
OK
ldc 5
ldc -6
adi W2S
ldc -1
cmi W2S
zne *1
OK
ldc -1007
ldc +999
adi W2S
ldc -8
cmi W2S
zne *1
OK
ldc -1300
ldc +1405
adi W2S
ldc 105
cmi W2S
zne *1
OK
ldc -30000
ldc -20
adi W2S
ldc -30020
cmi W2S
zne *1
OK
#if WS >= 2
ldc -100007
ldc +99999
adi W2S
ldc -8
cmi W2S
zne *1
OK
ldc -1300
ldc +140567
adi W2S
ldc 139267
cmi W2S
zne *1
OK
ldc -30000000
ldc -20
adi W2S
ldc -30000020
cmi W2S
zne *1
OK
#endif
#endif
TEST 095: test sbi W2S
MAIN 0
#ifdef W2S
ldc 1
ldc 1
sbi W2S
ldc 0
cmi W2S
zne *1
OK
ldc 5
ldc -6
sbi W2S
ldc +11
cmi W2S
zne *1
OK
ldc -1007
ldc +999
sbi W2S
ldc -2006
cmi W2S
zne *1
OK
ldc -1300
ldc +1405
sbi W2S
ldc -2705
cmi W2S
zne *1
OK
ldc -30000
ldc -20
sbi W2S
ldc -29980
cmi W2S
zne *1
OK
#if WS >= 2
ldc -100007
ldc +99999
sbi W2S
ldc -200006
cmi W2S
zne *1
OK
ldc -1300
ldc +140567
sbi W2S
ldc -141867
cmi W2S
zne *1
OK
ldc -30000000
ldc -20
sbi W2S
ldc -29999980
cmi W2S
zne *1
OK
#endif
#endif
TEST 096: test mli W2S
MAIN 0
#ifdef W2S
ldc 5
ldc 9
mli W2S
ldc 45
cmi W2S
zne *1
OK
ldc 0
ldc 10
mli W2S
ldc 0
cmi W2S
zne *1
OK
ldc -99
ldc 7
mli W2S
ldc -693
cmi W2S
zne *1
OK
ldc -100
ldc -90
mli W2S
ldc 9000
cmi W2S
zne *1
OK
#if WS >= 2
ldc 123456
ldc 200
mli W2S
ldc 24691200
cmi W2S
zne *1
OK
#endif
#endif
TEST 097: test dvi W2S
MAIN 0
#ifdef W2S
ldc 15
ldc 5
dvi W2S
ldc 3
cmi W2S
zne *1
OK
ldc 100
ldc -7
dvi W2S
ldc -14
cmi W2S
zne *1
OK
ldc -100
ldc 7
dvi W2S
ldc -14
cmi W2S
zne *1
OK
ldc -1000
ldc -201
dvi W2S
ldc 4
cmi W2S
zne *1
OK
#if WS >= 2
ldc 1234567
ldc -100
dvi W2S
ldc -12345
cmi W2S
zne *1
OK
#endif
#endif
TEST 098: test rmi W2S
MAIN 0
#ifdef W2S
ldc 100
ldc 7
rmi W2S
ldc 2
cmi W2S
zne *1
OK
ldc -100
ldc 7
rmi W2S
ldc -2
cmi W2S
zne *1
OK
ldc 100
ldc -7
rmi W2S
ldc 2
cmi W2S
zne *1
OK
ldc -100
ldc -7
rmi W2S
ldc -2
cmi W2S
zne *1
OK
ldc -1000
ldc -201
rmi W2S
ldc -196
cmi W2S
zne *1
OK
#if WS >= 4
ldc 1234567
ldc -100
rmi W2S
ldc 67
cmi W2S
zne *1
OK
#endif
#endif
TEST 099: test and
MAIN 0
loc 68
loc 65
and WS
loc 64
bne *1
OK
loc 17
loc 34
loc 3
loc 36
and 2*WS
loc 32
bne *1
loc 1
bne *1
OK
loc 17
loc 34
loc 68
loc -120
loc 1
loc 37
loc 12
loc -127
and 4*WS
loc -128
bne *1
loc 4
bne *1
loc 32
bne *1
loc 1
bne *1
OK
TEST 100: test ior
MAIN 0
loc 68
loc 65
ior WS
loc 69
bne *1
OK
loc 17
loc 34
loc 3
loc 36
ior 2*WS
loc 38
bne *1
loc 19
bne *1
OK
loc 17
loc 34
loc 68
loc -120
loc 1
loc 37
loc 12
loc -127
ior 4*WS
loc -119
bne *1
loc 76
bne *1
loc 39
bne *1
loc 17
bne *1
OK
TEST 101: test xor
MAIN 0
loc 68
loc 65
xor WS
loc 5
bne *1
OK
loc 17
loc 34
loc 3
loc 36
xor 2*WS
loc 6
bne *1
loc 18
bne *1
OK
loc 17
loc 34
loc 68
loc -120
loc 1
loc 37
loc 12
loc -127
xor 4*WS
loc 9
bne *1
loc 72
bne *1
loc 7
bne *1
loc 16
bne *1
OK
TEST 102: test com
MAIN 0
loc 68
com WS
loc -69
bne *1
OK
loc 17
loc 34
com 2*WS
loc -35
bne *1
loc -18
bne *1
OK
loc 17
loc 34
loc 68
loc -120
com 4*WS
loc 119
bne *1
loc -69
bne *1
loc -35
bne *1
loc -18
bne *1
OK
TEST 103: test sli,slu W2S
MAIN 0
#ifdef W2S
ldc 5
loc 3
sli W2S
ldc 40
cmi W2S
zne *1
OK
ldc -2
loc 4
sli W2S
ldc -32
cmi W2S
zne *1
OK
ldc 5
loc 3
slu W2S
ldc 40
cmi W2S
zne *1
OK
ldc -2
loc 4
slu W2S
ldc -32
cmi W2S
zne *1
OK
#endif
TEST 104: test sri,sru W2S
MAIN 0
#ifdef W2S
ldc 64
loc 5
sri W2S
ldc 2
cmi W2S
zne *1
OK
ldc -3
loc 2
sri W2S
ldc -1
cmi W2S
zne *1
OK
ldc -16
loc 3
sri W2S
ldc -2
cmi W2S
zne *1
OK
ldc 64
loc 5
sru W2S
ldc 2
cmi W2S
zne *1
OK
ldc -3
loc 2
sru W2S
#if W2S == 2
ldc 16383
#endif
#if W2S == 4
ldc 1073741823
#endif
cmi W2S
zne *1
OK
#endif
TEST 105: common test of double arithmetic
MAIN 0
#ifdef W2S
ldc 1000
ldc 10
mli W2S
ldc 4
dvi W2S
ldc 1500
adi W2S
ldc 2856
sbi W2S
ldc 100
rmi W2S
ldc 44
cmi W2S
zne *1
OK
#endif
TEST 106: test cmi W2S
MAIN 0
#if W2S==2
ldc 64
ldc 4
mli W2S
ldc 63
ldc 4
mli W2S
cmi W2S
tge
loc 1
bne *1
OK
#endif
#if W2S==4
ldc 16384
ldc 4
mli W2S
ldc 16383
ldc 4
mli W2S
cmi W2S
tge
loc 1
bne *1
OK
#endif
TEST 107: test cii W2S -> WS
MAIN 0
#ifdef W2S
ldc 100
loc W2S
loc WS
cii
loc 100
bne *1
OK
ldc 5000
ldc -6
mli W2S
ldc 1000
dvi W2S
loc W2S
loc WS
cii
loc -30
bne *1
OK
#endif
TEST 108: test cif, cfi, adf FS
MAIN 0
#ifdef FS
loc 100
loc WS
loc FS
cif
loc 44
loc WS
loc FS
cif
adf FS
loc FS
loc WS
cfi
loc 144
bne *1
OK
loc 65
loc WS
loc FS
cif
loc -65
loc WS
loc FS
cif
adf FS
loc FS
loc WS
cfi
loc 0
bne *1
OK
#endif
TEST 109: test cdf, cfd
MAIN 0
#ifdef FS
#ifdef W2S
loc 55
loc WS
loc W2S
cii
loc W2S
loc FS
cif
loc 55
loc WS
loc FS
cif
cmf FS
zne *1
OK
loc 24
loc WS
loc FS
cif
loc FS
loc W2S
cfi
loc W2S
loc WS
cii
loc 24
bne *1
OK
loc 57
loc WS
loc FS
cif
loc FS
loc W2S
cfi
loc W2S
loc WS
cii
loc 57
bne *1
OK
loc 40
loc WS
loc W2S
cii
loc W2S
loc FS
cif
loc FS
loc WS
cfi
loc 40
bne *1
OK
#endif
#endif
TEST 110: test sbf FS
MAIN 0
#ifdef FS
loc 100
loc WS
loc FS
cif
loc 50
loc WS
loc FS
cif
sbf FS
loc FS
loc WS
cfi
loc 50
bne *1
OK
loc 32
loc WS
loc FS
cif
loc 101
loc WS
loc FS
cif
sbf FS
loc -69
loc WS
loc FS
cif
cmf FS
zne *1
OK
#endif
TEST 111: test mlf FS
MAIN 0
#ifdef FS
loc 4
loc WS
loc FS
cif
loc 20
loc WS
loc FS
cif
mlf FS
loc FS
loc WS
cfi
loc 80
bne *1
OK
loc -12
loc WS
loc FS
cif
loc -9
loc WS
loc FS
cif
mlf FS
loc FS
loc WS
cfi
loc 108
bne *1
OK
#endif
TEST 112: test dvf FS
MAIN 0
#ifdef FS
loc 45
loc WS
loc FS
cif
loc 9
loc WS
loc FS
cif
dvf FS
loc 5
loc WS
loc FS
cif
cmf FS
zne *1
OK
loc -60
loc WS
loc FS
cif
loc 7
loc WS
loc FS
cif
dvf FS
loc FS
loc WS
cfi
loc -8
bne *1
OK
#endif
TEST 113: test fractions using FS floating arithmetic
MAIN 0
#ifdef FS
loc 7
loc WS
loc FS
cif
loc 2
loc WS
loc FS
cif
dvf FS
loc FS
loc WS
cfi
loc 3
bne *1
OK
loc -7
loc WS
loc FS
cif
loc 2
loc WS
loc FS
cif
dvf FS
loc FS
loc WS
cfi
loc -3
bne *1
OK
loc 11
loc WS
loc FS
cif
loc 2
loc WS
loc FS
cif
dvf FS
loc 5
loc WS
loc FS
cif
mlf FS
loc 4
loc WS
loc FS
cif
mlf FS
loc 110
loc WS
loc FS
cif
cmf FS
zne *1
OK
#endif
TEST 114: test cif, cfi, adf F2S
MAIN 0
#ifdef F2S
loc 10
loc WS
loc F2S
cif
loc 44
loc WS
loc F2S
cif
adf F2S
loc F2S
loc WS
cfi
loc 54
bne *1
OK
loc 65
loc WS
loc F2S
cif
loc -65
loc WS
loc F2S
cif
adf F2S
loc F2S
loc WS
cfi
loc 0
bne *1
OK
#endif
TEST 115: test cif, cfi W2S F2S
MAIN 0
#ifdef F2S
#ifdef W2S
loc 55
loc WS
loc W2S
cii
loc W2S
loc F2S
cif
loc 55
loc WS
loc F2S
cif
cmf F2S
zne *1
OK
loc 24
loc WS
loc F2S
cif
loc F2S
loc W2S
cfi
loc W2S
loc WS
cii
loc 24
bne *1
OK
loc 57
loc WS
loc F2S
cif
loc F2S
loc W2S
cfi
loc W2S
loc WS
cii
loc 57
bne *1
OK
loc 41
loc WS
loc W2S
cii
loc W2S
loc F2S
cif
loc F2S
loc WS
cfi
loc 41
bne *1
OK
#endif
#endif
TEST 116: test sbf F2S
MAIN 0
#ifdef F2S
loc 100
loc WS
loc F2S
cif
loc 50
loc WS
loc F2S
cif
sbf F2S
loc F2S
loc WS
cfi
loc 50
bne *1
OK
loc 32
loc WS
loc F2S
cif
loc 101
loc WS
loc F2S
cif
sbf F2S
loc -69
loc WS
loc F2S
cif
cmf F2S
zne *1
OK
#endif
TEST 117: test fmu F2S
MAIN 0
#ifdef F2S
loc 4
loc WS
loc F2S
cif
loc 20
loc WS
loc F2S
cif
mlf F2S
loc F2S
loc WS
cfi
loc 80
bne *1
OK
loc -20
loc WS
loc F2S
cif
loc -6
loc WS
loc F2S
cif
mlf F2S
loc F2S
loc WS
cfi
loc 120
bne *1
OK
#endif
TEST 118: test dvf F2S
MAIN 0
#ifdef F2S
loc 45
loc WS
loc F2S
cif
loc 9
loc WS
loc F2S
cif
dvf F2S
loc 5
loc WS
loc F2S
cif
cmf F2S
zne *1
OK
loc -60
loc WS
loc F2S
cif
loc 7
loc WS
loc F2S
cif
dvf F2S
loc F2S
loc WS
cfi
loc -8
bne *1
OK
#endif
TEST 119: test fractions using F2S floating arithmetic
MAIN 0
#ifdef F2S
loc 7
loc WS
loc F2S
cif
loc 2
loc WS
loc F2S
cif
dvf F2S
loc F2S
loc WS
cfi
loc 3
bne *1
OK
loc -7
loc WS
loc F2S
cif
loc 2
loc WS
loc F2S
cif
dvf F2S
loc F2S
loc WS
cfi
loc -3
bne *1
OK
loc 11
loc WS
loc F2S
cif
loc 2
loc WS
loc F2S
cif
dvf F2S
loc 5
loc WS
loc F2S
cif
mlf F2S
loc 4
loc WS
loc F2S
cif
mlf F2S
loc 110
loc WS
loc F2S
cif
cmf F2S
zne *1
OK
#endif
TEST 120: test cal
1987-03-09 12:42:42 +00:00
HOL 8
1985-01-01 19:30:24 +00:00
MAIN 0
loc 0
ste 4
cal $p120
loe 4
loc 34
bne *1
OK
PROC
pro $p120,0
loc 34
ste 4
ret 0
end
TEST 121: test cal
MAIN 0
cal $p121
lfr WS
loc 7
bne *1
OK
PROC
pro $p121,0
loc 7
ret WS
end
TEST 122: test cal
MAIN 0
loc 7
cal $p122
asp WS
lfr WS
loc 7
bne *1
OK
PROC
pro $p122,0
lol 0
ret WS
end
TEST 123: test cal
MAIN 4
loc 7
stl -4
lor 0
cal $p123
asp PS
lfr WS
loc 7
bne *1
OK
lxl 0
cal $p123
asp PS
lfr WS
loc 7
bne *1
OK
PROC
pro $p123,0
lxl 1
lof -4
ret WS
end
TEST 124: test cal
MAIN 0
loc 7
cal $p124
asp WS
PROC
pro $p124,0
lol 0
loc 7
bne *1
OK
ret 0
ERRLAB
end
TEST 125: test cal
MAIN 4
loc 10
stl -WS
loc 90
lxl 0
cal $p1125
asp PS+WS
OK
PROC
pro $p1125,WS
lol PS
loc 90
bne *1
OK
loc 11
stl -WS
loc 21
loc 91
lxl 0
cal $p2125
asp PS+WS
lfr WS
OK
loc 82
bne *1
OK
loc 21
bne *1
OK
ret 0
ERRLAB
end
pro $p2125,0
lol PS
loc 91
bne *1
OK
loc 12
loc 92
lxl 0
cal $p3125
asp PS+WS
lfr WS+WS
OK
loc 86
bne *1
loc 83
bne *1
OK
loc 12
bne *1
OK
lal PS
loi WS
loc 91
bne *1
OK
loc 82
ret WS
ERRLAB
end
pro $p3125,WS
lol PS
loc 92
bne *1
OK
loc 13
stl -WS
lxa 0
adp PS
loi WS
loc 92
bne *1
OK
lxa 1
adp PS
loi WS
loc 91
bne *1
OK
lxa 2
adp PS
loi WS
loc 90
bne *1
OK
lxl 2
lof -WS
loc 11
bne *1
OK
lxl 3
adp -WS
loi WS
loc 10
bne *1
OK
loc 83
lxl 1
cal $p4125
asp PS
lxl 2
cal $p5125
asp PS
lxl 3
cal $p6125
asp PS
lfr WS
ret WS+WS
ERRLAB
end
pro $p4125,0
lxa 1
adp PS
loi WS
loc 91
bne *1
OK
ret 0
ERRLAB
end
pro $p5125,0
lxa 1
adp PS
loi WS
loc 90
bne *1
OK
ret 0
ERRLAB
end
pro $p6125,0
lxl 1
adp -WS
loi WS
loc 10
bne *1
OK
loc 86
ret WS
ERRLAB
end
TEST 126: test bra
MAIN 0
bra *0126
bra *1
9126
bra *8126
0126
bra *6126
bra *1
1126
bra *5126
bra *1
2126
bra *4126
bra *1
3126
bra *7126
bra *1
4126
bra *3126
bra *1
5126
bra *2126
bra *1
6126
bra *1126
bra *1
7126
bra *9126
bra *1
8126
OK
TEST 127: test ret and lfr
a127
bss 4,0,0
MAIN 0
; return nothing
loc 123
cal $retw0
loc 123
bne *1
OK
; return single word
cal $retw1
lfr WS
loc 45
bne *1
OK
; return single pointer
cal $retp1
lfr PS
lae a127
cmp
zne *1
OK
; return procedure instance identifier (two pointers)
; this value may not be disturbed by ASP
lxl 0
cal $retp2
asp PS
lfr 2*PS
lpi $retp2
cmp
zne *1
lxl 0
cmp
zne *1
OK
PROC
pro $retw0,0
ret 0
end
pro $retw1,0
loc 45
ret WS
end
pro $retp1,0
lae a127
ret PS
end
pro $retp2,0
lxl 1
lpi $retp2
ret 2*PS
end