When I first started to design the cpu I thought that 16bit address bus is ok for a homebrew cpu but after I made the Lion computer 64K rom+ram seemed very small although it used separate video and sprites ram. I wanted more memory and the more convenient way to do it is using pages. So I added 3 more address pins to lion cpu and added the necessary commands to support 8x64K pages.
The SR register was extended from 8 to 16 bits and now the 9 most significant bits bit15 to bit7 hold the current code (bit15-bit13), data (bit12-bit10) and stack page (bit9-bit7).
Instruction SDP sets the current data page, SSP sets the current stack page
PJMP jumps to another address/code page. PJSR jumps to a subroutine to another address/page and PRET returns.
Also another register named OtherDataPage ODP assists in data transfers between pages by holding a source or target page for use with instructions PMOV PMOV.B
Interrupt routines always use page 0 as a code page.
I'm currently testing the functionality of this implementation and need to make more changes to the assembler
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.