/
i_misc.c
862 lines (710 loc) · 17.6 KB
/
i_misc.c
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
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
/* Miscellaneous instructions for kx10, the PDP-10 emulator.
Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996 Stu Grossman
This program 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.
This program 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 this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "pdp10.h"
void
genunimp ()
{
console_reset();
#ifdef PCHIST
ppc();
#endif /* PCHIST */
suspend();
console_init();
return;
}
SPECIAL_INST(unimp, 000)
{
static char *iocodes[] = {"blki", "datai", "blko", "datao", "cono",
"coni", "consz", "conso"};
static char *iodevs[] = {"apr", "pi", "pag", "cca", "tim", "mtr"};
static char *extends[] = {"0", "cmpsl", "cmpse", "cmpsle", "edit", "cmpsge",
"cmpsn", "cmpsg",
"cvtdbo", "cvtdbt", "cvtbdo", "cvsbdt",
"movso", "movst", "movslj", "movsrj",
"xblt",
"gsngl", "gdble", "gdfix", "gfix", "gdfixr",
"gfixr", "dgfltr", "gfltr", "gfsc"};
extern char *opnames[];
int dev;
printf("\r\nUnimplemented instruction at %o: ", pcsection|(pc-1));
if (opcode >= 0700)
{ /* I/O instruction */
dev = ((opcode << 1) | (ac >> 3)) & 0177;
printf("%s ", iocodes[ac & 7]);
if (dev > 5)
printf("%o", dev << 2);
else
printf("%s", iodevs[dev]);
}
else
printf("%s %o", opnames[opcode], ac);
printf (", %o\r\n", ea);
if (opcode == 0123) /* Extend? */
{
word36 tmp;
int extop;
vfetch (ea, tmp);
extop = ldb (8, 9, tmp);
printf("Extend opcode: ");
if (extop < sizeof extends / sizeof (char *))
printf ("%s\r\n", extends[extop]);
else
printf ("0%o\r\n", extop);
}
printf ("Flags: %06o,,000000\r\n", pcflags << 5);
if (pcflags & PC_USER)
{
void i_uuo ();
i_uuo (opcode, ac, ea);
return;
}
genunimp();
}
SPECIAL_INST(io_unimp, 000)
{
i_unimp (0700 | (opcode >> 4), ac, ea);
}
SPECIAL_INST(uuo, 0)
{
word36 tmp;
addr10 vec;
if (!(pagerconi & PAGKL))
{
vfetch (pc - 1, tmp);
ustore (0424, tmp); /* Store UUO */
dpb (17, 18, pcflags << 5, tmp);
dpb (35, 18, pc, tmp);
ustore (0425, tmp); /* PC & flags */
dpb (17, 18, pagerdataihigh, tmp);
dpb (35, 18, pagerdatailow, tmp);
ustore (0426, tmp); /* Process context word */
}
else
{
dpb (17, 18, pcflags << 5, tmp);
dpb (35, 18, (opcode << 9) | (ac << 5) | (prev_pcsection >> 18), tmp);
ustore (0424, tmp);
dpb (17, 18, pcsection >> 18, tmp);
dpb (35, 18, pc, tmp);
ustore (0425, tmp);
dpb (5, 6, 0, tmp);
dpb (35, 30, ea, tmp);
ustore (0426, tmp);
dpb (17, 18, pagerdataihigh, tmp);
dpb (35, 18, pagerdatailow, tmp);
ustore (0427, tmp);
}
if (trapflags & (PC_TRAP1 | PC_TRAP2))
vec = 0431;
else
vec = 0430;
if (pcflags & PC_PUBLIC)
vec += 2;
if (pcflags & PC_USER)
{
pcflags = PC_PCU;
vec += 4;
goexec ();
}
else
pcflags = 0;
prev_pcsection = pcsection;
pagerdataihigh = (pagerdataihigh & ~037) | (prev_pcsection >> 18);
ufetch (vec, &tmp);
if (!(pagerconi & PAGKL))
{
pcflags = ldb (12, 13, tmp);
if (pcflags & PC_USER)
gouser ();
setpc (lower18 (tmp));
}
else
setpc (ldb (35, 30, tmp));
}
SPECIAL_INST(luuo, 001)
{
word36 tmp;
word36 ir;
if (pcsection != 0)
{
if (pcflags & PC_USER)
{
addr10 luuoblock;
ufetch (0420, &tmp);
luuoblock = ldb (35, 30, tmp);
dpb (17, 18, pcflags << 5, tmp);
dpb (35, 18, (opcode << 9) | (ac << 5), tmp);
ustore (luuoblock + 0, tmp);
dpb (17, 18, pcsection >> 18, tmp);
dpb (35, 18, pc, tmp);
ustore (luuoblock + 1, tmp);
dpb (5, 6, 0, tmp);
dpb (35, 30, ea, tmp);
ustore (luuoblock + 2, tmp);
ufetch (luuoblock + 3, &tmp);
setpc (ldb (35, 30, tmp));
return;
}
else
{
i_uuo (opcode, ac, ea);
return;
}
}
dpb (17, 18, (opcode << 9) | (ac << 5), tmp);
dpb (35, 18, ea, tmp);
vstore (040, tmp);
vfetch (041, ir);
opcode = ldb (8, 9, ir);
ac = ldb (12, 4, ir);
ea = ieacalc(ir, ea&SECTMASK); /* Calc ea in the section of the inst */
(*opdisp[opcode])(ac, ea); /* Recursively call the interpreter */
}
INST(pmove, 052)
{
word36 tmp;
#if 1
if (!(pcflags & (PC_USER | PC_PUBLIC)) || (pcflags & PC_UIO))
{
vfetch (ea, tmp); /* Fetch physical address */
pfetch (ldb (35, 22, tmp), AC); /* Fetch contents */
}
else
#endif
i_uuo (052, ac, ea);
}
INST(pmovem, 053)
{
word36 tmp;
#if 1
if (!(pcflags & (PC_USER | PC_PUBLIC)) || (pcflags & PC_UIO))
{
vfetch (ea, tmp); /* Fetch physical address */
pstore (ldb (35, 22, tmp), AC); /* Store contents */
}
else
#endif
i_uuo (053, ac, ea);
}
INST(uuo101, 0101)
{
i_uuo (0101, ac, ea);
}
INST(extend, 0123)
{
int opcode;
word36 tmp;
vfetch (ea, tmp);
opcode = ldb (8, 9, tmp);
switch (opcode)
{
case 000: /* illegal */
i_uuo (0123, ac, ea);
return;
case 001: /* cmpsl */
case 002: /* cmpse */
case 003: /* cmpsle */
case 005: /* cmpsge */
case 006: /* cmpsn */
case 007: /* cmpsg */
compare_strings (opcode, ac, ea);
return;
#if 0
case 04: /* edit */
edit (opcode, ac, ea, tmp);
return;
case 010: /* cvtdbo */
cvtdbo (opcode, ac, ea, tmp);
return;
case 011: /* cvtdbt */
cvtdbt (opcode, ac, ea, tmp);
return;
case 012: /* cvtbdo */
cvtbdo (opcode, ac, ea, tmp);
return;
case 013: /* cvtbdt */
cvtbdt (opcode, ac, ea, tmp);
return;
#else
case 04: /* edit */
case 010: /* cvtdbo */
case 011: /* cvtdbt */
case 013: /* cvtbdt */
i_unimp (0123, ac, ea);
return;
#endif
case 012: /* cvtbdo */
/* CVTBDO Kludge to make EDDT happy!!! */
dpb(1, 1, 1, ACplus3); /* Set the N bit to make EDDT think that we are a KL */
return;
case 014: /* movso */
case 015: /* movst */
case 016: /* movslj */
case 017: /* movsrj */
move_string (opcode, ac, ea, tmp);
return;
case 020: /* xblt */
{
int length;
addr10 src, dest;
word36 tmp;
length = ldb(35, 32, AC);
src = ldb(35, 30, ACplus1) | GLOBAL;
dest = ldb(35, 30, ACplus2) | GLOBAL;
if (length < 0)
{
/* This is very inefficient if we get a page fault in the middle of a big
blt, as we restart the blt from the beginning. */
for (; length < 0; length++)
{
src--;
dest--;
vfetch_2(src, tmp);
vstore_1(dest, tmp);
incr36 (AC);
decr36 (ACplus1);
decr36 (ACplus2);
}
}
else
{
/* This is very inefficient if we get a page fault in the middle of a big
blt, as we restart the blt from the beginning. */
for (; length > 0; length--, src++, dest++)
{
vfetch_2(src, tmp);
vstore_1(dest, tmp);
decr36 (AC);
incr36 (ACplus1);
incr36 (ACplus2);
}
}
}
return;
default:
i_uuo (0123, ac, ea);
return;
}
}
INST(jffo, 0243)
{
int bit;
if (eq36(AC))
{
ACplus1 = zero36;
return;
}
for (bit = 0; bit <= 35; bit++)
if (biton(bit, AC))
break;
dpb (17, 18, 0, ACplus1);
dpb (35, 18, bit, ACplus1);
setpc (ea);
}
INST(uuo247, 0247)
{
i_uuo (0247, ac, ea);
}
INST(blt, 0251)
{
word36 tmp;
addr10 source, dest;
source = upper18(AC);
dest = lower18(AC);
/* Add section to source and dest addresses */
#if 1
source |= ea & (GLOBAL|SECTMASK);
#else
source |= pcsection;
#endif
dest |= ea & (GLOBAL|SECTMASK);
/* This is a crock to make Waits work. It depends upon this to determine
that it's running on a KL. */
if (source == dest
&& source == ac)
{
AC = zero36;
}
#if 0
{
int len;
addr10 srcbeg, srclst, dstbeg, dstlst;
word36 mem;
vfetch_1 (source, mem);
srcbeg = source & ~GLOBAL;
dstbeg = dest & ~GLOBAL;
dstlst = ea & ~GLOBAL;
len = dstlst - dstbeg;
srclst = srcbeg + len;
if ((srcbeg != dstbeg || srclst != dstlst)
&& (srcbeg + 1 != dstbeg
|| ne36(mem)))
{
if ((srcbeg >= dstbeg && srcbeg <= dstlst)
|| (srclst >= dstbeg && srclst <= dstlst))
printf ("Overlapping BLT at pc %o! src = 0%o=>0%o dst = o%o=>0%o\r\n",
pcsection | pc, srcbeg, srclst, dstbeg, dstlst);
}
}
#endif
/* This is very inefficient if we get a page fault in the middle of a big
blt, as we restart the blt from the beginning. */
while (1)
{
vfetch_1 (source, tmp);
vstore (dest, tmp);
source = increa (source);
dest = increa (dest);
if (dest > ea)
break;
dpb (17, 18, source, AC);
dpb (35, 18, dest, AC);
}
if (((dest - 1) & HWORDMASK) == ac)
return;
dpb(17, 18, source, AC);
dpb(35, 18, dest, AC);
}
INST(jrst, 0254)
{
switch (ac) {
case 01: /* Portal. For now, it just acts like jrst */
{
word36 tmp;
tmp = map (ea);
if (biton (6, tmp)) /* Check public bit in map */
pcflags |= PC_PUBLIC;
else
pcflags &= ~PC_PUBLIC;
}
case 00: /* Normal jrst */
setpc(ea);
return;
case 02: /* jrstf */
/* jrstf is one of the ugliest instructions in the whole machine. Doing it
* 'right' would mean that I would have to get the eacalc routine to save
* the last word fetched from either an AC or mem. This would slow down the
* eacalc, so I refuse to put it there. Instead, I have implemented a hacked
* eacalc that can return the right stuff just for jrstf...
*/
{
int jrstfflags;
word36 ir;
vfetch (pc - 1, ir); /* XXX fix this hack... */
ea = jrstfeacalc (ir, pcsection, &jrstfflags);
if (pcflags & PC_USER)
pcflags = jrstfflags | PC_USER;
else
{
pcflags = jrstfflags;
if (pcflags & PC_USER)
gouser ();
}
setpc (ea);
if (pcflags & (PC_TRAP1 | PC_TRAP2))
{
word36 foo;
vfetch_i (pcsection | pc, foo);
setting_pc = 1;
setflags (0);
setting_pc = 0;
}
}
return;
case 012: /* jen */
/* jrstf/jen is one of the ugliest instructions in the whole machine. Doing it
* 'right' would mean that I would have to get the eacalc routine to save
* the last word fetched from either an AC or mem. This would slow down the
* eacalc, so I refuse to put it there. Instead, I have implemented a hacked
* eacalc that can return the right stuff just for jrstf...
*/
{
int jrstfflags;
word36 ir;
if (pcflags & (PC_USER | PC_PUBLIC)) /* User mode? */
{
i_uuo (0254, ac, ea); /* Yes, bomb him out */
return;
}
vfetch (pc - 1, ir); /* XXX fix this hack... */
ea = jrstfeacalc (ir, pcsection, &jrstfflags);
pcflags = jrstfflags;
if (pcflags & PC_USER)
gouser ();
setpc (ea);
finish_interrupt ();
if (pcflags & (PC_TRAP1 | PC_TRAP2))
{
word36 foo;
vfetch_i (pcsection | pc, foo);
setting_pc = 1;
setflags (0);
setting_pc = 0;
}
}
return;
case 04: /* Halt */
if (pcflags & (PC_USER | PC_PUBLIC))
{
#ifdef PCHIST
ppc ();
#endif
i_uuo (0254, ac, ea);
return;
}
printf ("?\007\007Processor executed halt instruction at %0o, new PC is %0o\r\n",
pcsection|(pc-1), ea);
printf ("coni pi = %o,,%o, interrupt = %o\r\n", ppireq, piconi, interrupt);
setpc (ea);
genunimp ();
return;
case 05: /* xjrstf */
{
word36 flags, newpc;
vfetch (ea, flags);
ea = increa (ea);
vfetch (ea, newpc);
setpc (ldb (35, 30, newpc));
if (pcflags & PC_USER)
pcflags = ldb (12, 13, flags) | PC_USER;
else
{
prev_pcsection = ldb (35, 5, flags) << 18;
pagerdataihigh = (pagerdataihigh & ~037) | (prev_pcsection >> 18);
pcflags = ldb (12, 13, flags);
if (pcflags & PC_USER)
gouser ();
}
if (pcflags & (PC_TRAP1 | PC_TRAP2))
{
word36 foo;
vfetch_i (pcsection | pc, foo);
setting_pc = 1;
setflags (0);
setting_pc = 0;
}
}
return;
case 06: /* xjen */
{
word36 flags, newpc;
if (pcflags & PC_USER) /* User mode? */
{
i_uuo (0254, ac, ea); /* Yes, privileged instruction, bomb */
return;
}
vfetch (ea, flags);
ea = increa (ea);
vfetch (ea, newpc);
setpc (ldb (35, 30, newpc));
prev_pcsection = ldb (35, 5, flags) << 18;
pagerdataihigh = (pagerdataihigh & ~037) | (prev_pcsection >> 18);
pcflags = ldb (12, 13, flags);
if (pcflags & PC_USER)
gouser ();
if (pcflags & (PC_TRAP1 | PC_TRAP2))
{
word36 foo;
vfetch_i (pcsection | pc, foo);
setting_pc = 1;
setflags (0);
setting_pc = 0;
}
finish_interrupt(); /* Clear current interrupt level */
}
return;
case 07: /* xpcw */
{
word36 flags, tmppc;
tmppc = zero36;
dpb (17, 18, pcflags << 5, flags);
dpb (35, 18, prev_pcsection >> 18, flags);
vstore (ea, flags);
ea = increa (ea);
dpb (35, 30, pcsection | pc, tmppc);
vstore (ea, tmppc);
ea = increa (ea);
vfetch (ea, flags);
ea = increa (ea);
vfetch (ea, tmppc);
if (!(pcflags & PC_USER)) /* Exec mode? */
{
prev_pcsection = ldb (35, 5, flags) << 18;
pagerdataihigh = (pagerdataihigh & ~037) | (prev_pcsection >> 18);
pcflags = ldb (12, 13, flags);
}
else
pcflags = ldb (12, 13, flags) | PC_USER;
setpc (ldb (35, 30, tmppc));
if (pcflags & (PC_TRAP1 | PC_TRAP2))
{
word36 foo;
vfetch_i (pcsection | pc, foo);
setting_pc = 1;
setflags (0);
setting_pc = 0;
}
}
return;
case 010: /* Just dismiss interrupt */
if (pcflags & (PC_USER | PC_PUBLIC)) /* User mode? */
i_uuo (0254, ac, ea); /* Yes, privileged instruction, bomb */
else
finish_interrupt(); /* Clear current interrupt level */
return;
case 014: /* sfm */
{
word36 tmp;
dpb(17, 18, pcflags << 5, tmp);
dpb(35, 18, prev_pcsection >> 18, tmp);
vstore(ea, tmp);
}
return;
case 015: /* xjrst */
{
word36 mem;
vfetch(ea, mem);
setpc(ldb(35, 30, mem));
}
return;
default:
i_unimp (0254, ac, ea);
return;
}
}
INST(jfcl, 0255)
{
if ((ac << 9) & pcflags)
{
pcflags &= ~(ac << 9);
setpc (ea);
}
}
/*void interpret();*/
INST(xct, 0256)
{
int opcode;
word36 ir;
int func;
extern int saved_pcsection;
extern trace_ubr;
func = ac;
while (1)
{
vfetch (ea, ir); /* Fetch the instruction */
opcode = ldb (8, 9, ir);
if (opcode != 0256) /* Is it an xct? */
break; /* No, no problem */
/* We've got an xct of an xct. See if an interrupt has
occurred, otherwise, loop back for the next xct. */
if (interrupt < 0) /* Interrupt pending? */
{ /* No, keep on rolling along */
func = ldb (12, 4, ir);
ea = ieacalc (ir, ea & SECTMASK);
continue;
}
pc = (pc - 1) & HWORDMASK; /* Continue at this instruction */
siglongjmp(to_main, 1); /* Handle the interrupt */
}
ac = ldb (12, 4, ir);
#ifdef PROCESS_TRACING
if (pagerdatailow == trace_ubr
&& pcflags & PC_USER)
{
printf (" %o: ", pcsection | pc);
print_instruction (ir);
}
#endif
if (func == 0 || pcflags & PC_USER) /* Normal xct or user mode */
{
ea = ieacalc(ir, ea&SECTMASK); /* Calc ea in the section of the inst */
(*opdisp[opcode])(ac, ea); /* Recursively call the interpreter */
return;
}
if (func & 010)
set_previous_eacalc ();
#if 0
if (opcode == 0123 || opcode == 0251) /* For some reason, extend works differently */
ea = ieacalc(ir, ea & SECTMASK);
else
ea = ieacalc(ir, prev_pcsection); /* Calc ea in current context, but with
PCS. This is needed to emulate a KL bug
which the monitor depends on. */
#endif
if (func & 014)
ea = ieacalc(ir, prev_pcsection); /* Calc ea in current context, but with
PCS. This is needed to emulate a KL bug
which the monitor depends on. */
else
ea = ieacalc(ir, ea & SECTMASK);
saved_pcsection = pcsection;
if (func & 03)
pcsection = prev_pcsection;
set_previous_context_func (func);
(*opdisp[opcode])(ac, ea);
pcsection = saved_pcsection;
saved_pcsection = -1;
clear_previous_context ();
}
INST(map, 0257)
{
AC = map(ea);
}
INST(jsr, 0264)
{
word36 tmp;
tmp = zero36;
if (pcsection)
{
dpb(35, 30, (pcsection | pc), tmp) /* 30 bit pc for non-zero sections */
}
else
{
dpb(12, 13, pcflags, tmp); /* PC and flags for sect 0 */
dpb(35, 18, pc, tmp);
}
vstore(ea, tmp); /* Store current PC into (ea) */
pcflags &= ~(PC_FPD|PC_TRAP1|PC_TRAP2|PC_AFI);
setpc(increa(ea)); /* Jump to ea+1 */
}
INST(jsp, 0265)
{
if (pcsection)
{
dpb (5, 6, 0, AC);
dpb (35, 30, (pcsection | pc), AC);
}
else
{
dpb (17, 18, pcflags << 5, AC);
dpb (35, 18, pc, AC);
}
pcflags &= ~(PC_FPD|PC_TRAP1|PC_TRAP2|PC_AFI);
setpc (ea);
}
INST(jsa, 0266)
{
vstore (ea, AC);
dpb (17, 18, ea, AC); /* ea,, */
dpb (35, 18, pc, AC); /* ea,,pc */
ea = increa (ea);
setpc (ea); /* Jump to ea + 1 */
}
INST(jra, 0267)
{
addr10 acaddr;
acaddr = upper18 (AC); /* Where AC is saved */
vfetch (acaddr, AC); /* Restore AC */
setpc (ea); /* Jump to EA */
}