barrym95838 wrote:
fachat wrote:
... What is the 65org32 doing in this respect? ...
Hi, André.
I believe that the 65Org32 (and my 65m32) avoid this problem entirely, because every offset, address and constant is a 32-bit value, so wrap occurs naturally. -1 is
always $ffffffff, never $ff or $ffff, or even $ffffffffffffffff.
My core is 6502 compatible and uses prefixes to change absolute or zeropage addresses into offsets. Thus they are smaller than the address width (if chosen to use 32 or more). So I need a decision here. At the moment indeed I tend to use signed offsets, but probably have to check other CPUs as well. What does the x86 do here? Ok, here
http://www.bailopan.net/blog/?p=50 it says that AMD64 offsets are 32 bit, so code can only be 2G away from data - which means signed offset.
Quote:
I was looking through your 65k specs recently to find some ideas on how to implement my status register. I goal is to start out flat, simple, and mode-less, but I want to provide a simple upgrade path to a virtual-capable design without breaking existing code for the simpler one, or complicating the hyper-visor unnecessarily. It appears that the 65GZ032 (linked on your page) was close to completion, but stopped short of providing a complete picture of how the mode-switching mechanism worked.
Yes, it's a pity the GZ032 disappeared. I have decided to use the so-far unused bit5 of the standard status register to indicate a "wide" status register. I am not sure how complicated that gets in terms of programming the chip later, but it looks like a feasible idea.
It introduces a small incompatibility though - someone writing a status register to the stack with bit5 set to zero, and expecting PLP to only read back that one byte will fail. But my assumption is that these cases are seldom.
Quote:
My design actually looks similar to the GZ, but doesn't try nearly as hard to allow binary compatibility or variable-width addresses and constants. Dieter, Garth, and Jeff have been helping me and encouraging me to complete my specification, but the status register is causing me some grief, because I keep doubting my ability to anticipate future snags. Do you have any links or advice that could get me back on track?
I'm sorry, but I have my knowledge from what I read on the nets and then thinking about it myself. I don't think I have written up something about the status register like I did for other things here
http://www.6502.org/users/andre/65k/features.htmlThe status register I guess "evolved" as it is now. BTW, the PLP handling the extended status register is there since today, as I decided to add the signed comparison flag (and then had place for the odd/even flag as well
Quote:
Simulation should follow rather easily, assuming that I don't have to endlessly revise the specification, and a myopic spec is what I'm really trying to avoid right now.
A stable specification is very valuable indeed. In addition I use a generational approach. I have a description of the processor's feature in an XML file and generate the docs from it, as well as some VHDL tables. That helps to quickly fix smaller changes.
Quote:
Thanks,
Thank you for your comments!
André
_________________
Author of the GeckOS multitasking operating system, the usb65 stack, designer of the Micro-PET and many more 6502 content:
http://6502.org/users/andre/