projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added PDX constant
[unix-history]
/
usr
/
src
/
usr.bin
/
pascal
/
px
/
interp.c
diff --git
a/usr/src/usr.bin/pascal/px/interp.c
b/usr/src/usr.bin/pascal/px/interp.c
index
29b3a99
..
8a24aba
100644
(file)
--- a/
usr/src/usr.bin/pascal/px/interp.c
+++ b/
usr/src/usr.bin/pascal/px/interp.c
@@
-1,6
+1,6
@@
/* Copyright (c) 1979 Regents of the University of California */
/* Copyright (c) 1979 Regents of the University of California */
-static char sccsid[] = "@(#)interp.c 1.1
6
%G%";
+static char sccsid[] = "@(#)interp.c 1.1
7
%G%";
#include <math.h>
#include "whoami.h"
#include <math.h>
#include "whoami.h"
@@
-90,6
+90,13
@@
struct iorec *_actfile[MAXFILES] = {
ERR
};
ERR
};
+/*
+ * stuff for pdx
+ */
+
+union progcntr *pcaddrp;
+asm(".globl _loopaddr");
+
/*
* Px profile array
*/
/*
* Px profile array
*/
@@
-128,6
+135,8
@@
interpreter(base)
union progcntr tpc;
struct iorec **ip;
union progcntr tpc;
struct iorec **ip;
+ pcaddrp = &pc;
+
/*
* Setup sets up any hardware specific parameters before
* starting the interpreter. Typically this is inline replaced
/*
* Setup sets up any hardware specific parameters before
* starting the interpreter. Typically this is inline replaced
@@
-150,6
+159,8
@@
interpreter(base)
stp = (struct stack *)pushsp((long)(sizeof(struct stack)));
_dp = &_display.frame[0];
pc.cp = base;
stp = (struct stack *)pushsp((long)(sizeof(struct stack)));
_dp = &_display.frame[0];
pc.cp = base;
+
+ asm("_loopaddr:");
for(;;) {
# ifdef DEBUG
if (++opcptr == 10)
for(;;) {
# ifdef DEBUG
if (++opcptr == 10)
@@
-160,6
+171,10
@@
interpreter(base)
_profcnts[*pc.ucp]++;
# endif PROFILE
switch (*pc.ucp++) {
_profcnts[*pc.ucp]++;
# endif PROFILE
switch (*pc.ucp++) {
+ case O_BPT: /* breakpoint trap */
+ asm(".byte 0");
+ pc.ucp--;
+ continue;
case O_NODUMP:
_nodump = TRUE;
/* and fall through */
case O_NODUMP:
_nodump = TRUE;
/* and fall through */