Replies: 1 comment
-
Sounds interesting! BCD and/or PUSHF, POPF could be implemented in an effort to forge the Minimal 64x4 in a more modern CPU architecture. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm working on a math library for the Minimal 64x4, implementing 40-bit floating point (Microsoft Binary Format) and 32-bit integer arithmetic. Originally, I was really hoping to implement a decimal format, but as I understood the instruction set and architecture better, it became clear that there would not be an efficient way to implement BCD arithmetic. One particularly simple feature to implement would be to bring out the carry bit for the lower 4 bits of the ALU, which provides the "Adjust Flag" of the x86 instruction set, enabling the implementation of DAA and DAS instructions (Decimal Adjust after Addition, etc.). On the Minimal, these would probably not be implementable as single instructions (or could it? could the instruction encoding be used as some constants needed by these operations?), but it would make detecting carries in BCD digits much easier. This would make the control ROM input one bit wider, but that does not seem like it would be a problem.
Also, having something like PUSHF and POPF to save and restore the flags register would be nice, but that would require larger architectural changes.
Beta Was this translation helpful? Give feedback.
All reactions