News for hackers. Stuff that matters.
Re:OUP/M: CP/M-like operating system for 6502 by sedatk on Sunday November 04, 2018 @12:07AM (#18374150)
6502 is a harsher environment than Z80 which CP/M was originally designed for. It's a good candidate for a C64 port too.
Re:OUP/M: CP/M-like operating system for 6502 by beagle3 on Sunday November 04, 2018 @03:47AM (#18374922)
Having moved to the 6502 from Z80 back in the day, I initially had that feeling too -

what? Only 3 8-bit registers on the 6502? The Z-80 had an abundance which is not trivial to describe (7 8-bit ones, 6 of which group into 3 16-bit pairs, an exchangeable shadow register file for them, and two additional 16-bit index registers); Z-80 also had block move instructions and other nice stuff that was missing from the bare bones 6502.

And yet, the 6502 eventually comes out at least as useful with the indirect addressing and page-0 -- to the point that it often feels like you have 128 16-bit registers, or 256 8-bit registers, or any combination of those.

Z80 is more high-level, but it comes at a cycle/instruction cost, and 6502 indirect indexing goes a very long way.

Re:OUP/M: CP/M-like operating system for 6502 by ido on Sunday November 04, 2018 @02:04AM (#18374652)
what makes it harsher? Also I believe CP/M was originally designed for the i8080.
Re:OUP/M: CP/M-like operating system for 6502 by flohofwoe on Sunday November 04, 2018 @06:50AM (#18375416)
I guess it's about the 6502's more RISC-like philosophy, which made it a bit more cumbersome to program in assembly code (even though the resulting performance was mostly similar to the Z80 because the 6502 could do more things in fewer cycles).

Even with the whole 'extended register set in the zero page', the 6502 didn't have convenient features like 16-bit math, memory block instructions, and even 8-bit math was less convenient (e.g. no separate add/adc, sub/sbc instructions, so you always had to clear the carry flag before a math operation etc...)

But I think this didn't matter for porting the operating system CP/M itself to 6502, the actual problem was binary compatibility with applications, and the Z80 was backward compatible with the i8080 (as long as only documented instructions were used).

I guess being compatible with the i8080 (and CP/M 'office software') was the whole point why the Z80 was even created (as an i8080 killer), and that it was as successful as it was.

Re:OUP/M: CP/M-like operating system for 6502 by Narishma on Sunday November 04, 2018 @06:30AM (#18375359)
CP/M predates the Z80 CPU by a few years. It was designed for the 8080.
Re:OUP/M: CP/M-like operating system for 6502 by pjmlp on Sunday November 04, 2018 @06:50AM (#18375418)
There was a version for the 128K +3A though.
Re:OUP/M: CP/M-like operating system for 6502 by flohofwoe on Sunday November 04, 2018 @07:08AM (#18375492)
The Z80 was designed to be i8080 compatible (for the documented/recommended opcodes), so that it could run unmodified CP/M software.

The Z80 instruction set basically added new opcodes where the i8080 instruction set had gaps or redundant opcodes (e.g. the i8080 had 16 identical NOP instructions, and 4 identical CALL instructions, but only the lowest opcode was recommended to be used, if one of the redundant opcodes was used, the program ran on an i8080 but not on a Z80).