Skip to content

Conversation

@poetnerd
Copy link
Owner

@poetnerd poetnerd commented Jul 6, 2025

Rewrite of instruction decoder to implement Major States.

See issue 434, "Adding support for PDP- Major States within the CPU."
open-simh#434 (comment)

Rewrite of instruction decoder to implement Major States.
@markpizz
Copy link

markpizz commented Jul 8, 2025

Testing this on all existing compiler environments produces these problems:

1>..\PDP8\pdp8_cpu.c(412) : error C2143: syntax error : missing ';' before 'type'
1>..\PDP8\pdp8_cpu.c(484) : error C2065: 'op_code' : undeclared identifier
1>..\PDP8\pdp8_cpu.c(485) : error C2065: 'op_code' : undeclared identifier
1>..\PDP8\pdp8_cpu.c(526) : warning C4554: '&' : check operator precedence for possible error; use parentheses to clarify precedence

The first 3 are addressed by declaring "int op_code;" at the top of the routine.
The 4th is addressed by adding parenthesis where you want.

Resolve issues with some C compilers
@poetnerd
Copy link
Owner Author

poetnerd commented Jul 9, 2025

I've made the changes you suggest, and tested them on my Pi and my Mac.
See if that resolves the issues, and provokes no other issues.

@markpizz
Copy link

It looks clean now.

Before merging this into the master branch, I would suggest squashing the minor change into the reset of your changes as a single commit.

Meanwhile, I'm not sure how you created this as a pull request in your poetnerd/simh repo. To get it merged upstream, you will need to create a pull request in github.com/open-simh/simh

@poetnerd poetnerd merged commit 8f69534 into master Jul 11, 2025
@poetnerd
Copy link
Owner Author

Thanks for the help, Mark. Although I'm an old hand at C coding, I'm a noob when it comes to using github. I've squashed the commits here, and made an upstream pull request now. open-simh#472

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants