AM1 update posted to github

28 views
Skip to first unread message

Bill E

unread,
Dec 29, 2025, 3:42:03 PM12/29/25
to [PiDP-1]
It add listings and cleans up some code. Here is a sample that shows interbank coding also with some convenient macros that are predefined for accessing other memory banks, e.g. farlio() to load the IO register with a value from any bank.

Updated docs also here.

I'm now happily writing code that needs multiple banks, so I'm sure I'll find some bugs.

Bill
UsingAM1.pdf
bank.am1

Matthias Barthel

unread,
Dec 29, 2025, 4:46:32 PM12/29/25
to [PiDP-1]
Bill,

I'm too stupid to compile AM1 :)
I type "make" in the AM1 directory and get this:

bison -o y.tab.c -d parser.y
make: bison: Datei oder Verzeichnis nicht gefunden
make: *** [Makefile:22: y.tab.h] Fehler 127

what have i done wrong ? 

matthias

Matthias Barthel

unread,
Dec 29, 2025, 4:52:16 PM12/29/25
to [PiDP-1]
so i installed bison on my computer , but:

bison -o y.tab.c -d parser.y
gcc -O0 -g -c am1.c
gcc -O0 -g -c symtab.c
gcc -O0 -g     symtabgen.c am1.h symtab.o   -o symtabgen
symtabgen permsyms.def
make: symtabgen: Datei oder Verzeichnis nicht gefunden
make: *** [Makefile:13: permsyms.def.c] Fehler 127

Bill E

unread,
Dec 29, 2025, 4:57:39 PM12/29/25
to [PiDP-1]
That's strange. It says that the permsyms.def file can't be found. Check your dir to see if it's there. It's in the repo. It could also be a path issue, be sure '.' is in your PATH env var so the current directory will be searched.
Bill

Matthias Barthel

unread,
Dec 29, 2025, 5:01:26 PM12/29/25
to [PiDP-1]
Bill,

i have a solution that works for me.
i must install 2 tools 
sudo apt install bison, flex

and in the makefile i added a ./ to every "symtabgen" call - yet i have AM1 in my directory

Matthias

Milo Velimirović

unread,
Dec 29, 2025, 5:01:51 PM12/29/25
to Matthias Barthel, [PiDP-1]

On Dec 29, 2025, at 3:52 PM, Matthias Barthel <maklumatp...@gmail.com> wrote:

so i installed bison on my computer , but:
bison -o y.tab.c -d parser.y
gcc -O0 -g -c am1.c
gcc -O0 -g -c symtab.c
gcc -O0 -g     symtabgen.c am1.h symtab.o   -o symtabgen

am1.h should pobably be am1.o

I have not tried this, it’s just decades of programming in C that’s flagging that as wrong.

—Milo

symtabgen permsyms.def
make: symtabgen: Datei oder Verzeichnis nicht gefunden
make: *** [Makefile:13: permsyms.def.c] Fehler 127


Matthias Barthel schrieb am Montag, 29. Dezember 2025 um 22:46:32 UTC+1:
Bill,

I'm too stupid to compile AM1 :)
I type "make" in the AM1 directory and get this:

bison -o y.tab.c -d parser.y
make: bison: Datei oder Verzeichnis nicht gefunden
make: *** [Makefile:22: y.tab.h] Fehler 127

what have i done wrong ? 

matthias

wjegr...@gmail.com schrieb am Montag, 29. Dezember 2025 um 21:42:03 UTC+1:
It add listings and cleans up some code. Here is a sample that shows interbank coding also with some convenient macros that are predefined for accessing other memory banks, e.g. farlio() to load the IO register with a value from any bank.

Updated docs also here.

I'm now happily writing code that needs multiple banks, so I'm sure I'll find some bugs.

Bill

--
You received this message because you are subscribed to the Google Groups "[PiDP-1]" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pidp-1+un...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/pidp-1/76d41e3e-c684-4d9f-bae6-d8be748da3ddn%40googlegroups.com.

Bill E

unread,
Dec 29, 2025, 5:02:07 PM12/29/25
to [PiDP-1]
I just copied the Tools/AM1 stuff to a dir on my machine, it builds. So, something in your enviroment, and again I bet it's your PATH setting. You should see:
~/Foo$ make

bison -o y.tab.c -d parser.y
gcc -O0 -g -c am1.c
gcc -O0 -g -c symtab.c
gcc -O0 -g     symtabgen.c am1.h symtab.o   -o symtabgen
symtabgen permsyms.def
gcc -O0 -g -c permsyms.def.c
flex -d lexer.l
gcc -O0 -g -c lex.yy.c
gcc -O0 -g -DYYDEBUG=1 -c y.tab.c
gcc -O0 -g -c parsefns.c
gcc -O0 -g -c eval.c
gcc -O0 -g -c maccodegen.c
gcc -O0 -g -c bincodegen.c
gcc -O0 -g -c listcodegen.c
gcc -O0 -g   am1.o permsyms.def.o symtab.o lex.yy.o y.tab.o parsefns.o eval.o maccodegen.o bincodegen.o listcodegen.o   -o am1

Peter Long

unread,
Dec 29, 2025, 6:12:23 PM12/29/25
to Bill E, [PiDP-1]
I just built this under MacOS and it needed a few tweaks - so while ymmv here they are:

The ./ in the makefile is up to you - I don't have . in my path - but maybe you do ... but the symtabgen rule needs a tweak.

plong@mini AM1 % diff Makefile Makefile.orig 
13c13
<     ./symtabgen permsyms.def
---
>     symtabgen permsyms.def
46d45
<     $(CC) symtabgen.c symtab.o -o symtabgen
plong@mini AM1 % 

plong@mini AM1 % diff parser.y parser.orig.y
59,61c59,61
< int  yyerror(const char *errstr);
< void verror(const char *msgP, ...);
< void vwarn(const char *msgP, ...);
---
> void yyerror();
> void verror(char *msgP, ...);
> void vwarn(char *msgP, ...);
906c906
< vwarn(const char *msgP, ...)
---
> vwarn(char *msgP, ...)
921c921
< verror(const char *msgP, ...)
---
> verror(char *msgP, ...)
934,935c934,935
< int
< yyerror(const char *errstr)
---
> void
> yyerror(char *errstr)
940d939
<     return 0;

Compiling eval.c complained about non-void functions without return() statements but I can live with that !

Cheers

Peter



From: pid...@googlegroups.com <pid...@googlegroups.com> on behalf of Bill E <wjegr...@gmail.com>
Sent: Tuesday, December 30, 2025 09:02
To: [PiDP-1] <pid...@googlegroups.com>
Subject: [PiDP-1] Re: AM1 update posted to github
--
You received this message because you are subscribed to the Google Groups "[PiDP-1]" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pidp-1+un...@googlegroups.com.

Bill E

unread,
Dec 29, 2025, 8:18:32 PM12/29/25
to [PiDP-1]
On Monday, December 29, 2025 at 6:12:23 PM UTC-5 pl... wrote:
I just built this under MacOS and it needed a few tweaks - so while ymmv here they are:

Interesting. Apparently MacOS has some strange ideas about things, at least its C compiler does.
The yyerror decl is consistent in parser.y and matches what Bison says it should be, not sure where the int bit is coming from. Online docs say either is acceptable, though.
The eval.c no return is also bogus. From what I see, the only non-return cases are if yyerror is called, which never returns, it exits. Of course the compiler doesn't know that, but I do.
Is it insisting on const, or is that just a personal preference? I've never bothered with it, too much 'training wheels' aspect for me.
I did add ./ to symtabgen. I never thought about that, I've always (since Unix early days) had . in my path.

Bill 

Peter Long

unread,
Dec 30, 2025, 12:23:29 AM12/30/25
to Bill E, [PiDP-1]
Bill

Sorry - there were a couple more things it didn't like , which I forgot to put in the last email so here are all the changes needed to compile without errors & most warnings [those remaining don't matter] on a late model Mac Mini / MacOS ...

In am1.c - the getenv declaration, the SIGCHLD name change and the char ch needed to be moved ...

The make rule for symtabgen needs to be changed as the original rule fails

parser.y needed changes to yyerror and verror args and type

lexfuncs.c needed some extra parentheses to remove an ambiguity

Compiling eval.c complained about non-void functions without return() statements but I can live with that !

Yep - Mac's here to help ;-) 


Peter

diff am1.c am1.orig.c
98a99
> char *getenv();
131c132
<     signal(SIGCHLD, SIG_DFL);                              /* special case */
---
>     signal(SIGCLD, SIG_DFL);                              /* special case */
685d685
< char ch;
720a721
>             char ch;
plong@mini AM1 % 

plong@mini AM1 % diff Makefile Makefile.orig 
plong@mini AM1 % diff lexfuncs.c lexfuncs.orig.c
170c170
<             if( (symP = sym_find(&(localStack[i]->symRootP), nameP) ))
---
>             if( symP = sym_find(&(localStack[i]->symRootP), nameP) )








Sent: Tuesday, December 30, 2025 12:18
To: [PiDP-1] <pid...@googlegroups.com>
Subject: Re: [PiDP-1] Re: AM1 update posted to github
--
You received this message because you are subscribed to the Google Groups "[PiDP-1]" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pidp-1+un...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages