1
0
mirror of https://github.com/livingcomputermuseum/pdp7-unix.git synced 2026-02-26 08:54:17 +00:00

Replace badd/uind with vector

vector instruction now used for array referencing.  I had overlooked it.
Also, minor cleanup.
This commit is contained in:
rswier
2016-03-18 01:33:47 -04:00
parent b8b1ac5d95
commit c35b1e2add
2 changed files with 6 additions and 8 deletions

View File

@@ -20,7 +20,7 @@
*/
main() {
extrn symtab, eof, ns, nerror;
extrn symtab, eof, ns;
while (!eof) {
ns = symtab + 51;
@@ -30,7 +30,7 @@ main() {
}
lookup() {
extrn symtab, symbuf, eof, ns, nerror;
extrn symtab, symbuf, eof, ns;
auto np, sp, rp;
rp = symtab;
@@ -368,8 +368,7 @@ loop:
expr(15);
if (symbol() != 5)
error('[]');
gen('b',12); /* badd */
gen('u',3); /* uind */
gen('n',4); /* vector */
goto loop;
}
if (o==6) { /* ( */

View File

@@ -53,7 +53,7 @@ xflush() {
#define flush xflush
main(int argc, char **argv) {
extern symtab[], eof, *ns, nerror;
extern symtab[], eof, *ns;
extern fin, fout;
if (argc > 1) {
@@ -77,7 +77,7 @@ main(int argc, char **argv) {
}
int *lookup() {
extern symtab[], symbuf[], eof, *ns, nerror;
extern symtab[], symbuf[], eof, *ns;
auto *np, *sp, *rp;
rp = symtab;
@@ -415,8 +415,7 @@ loop:
expr(15);
if (symbol() != 5)
error('[]');
gen('b',12); /* badd */
gen('u',3); /* uind */
gen('n',4); /* vector */
goto loop;
}
if (o==6) { /* ( */