Skip to content

calls should only preserve DC0 (except interrupts) while calling, loops should have an infinite loop type, and loops should use the same stack, systems, and instructions #4

@vadixidav

Description

@vadixidav

When the processor makes a call, it should preserve only DC0, except for an interrupt which will preserve the addresses, directions, and values of DC1-3. This eliminates the prefetch dilemma encountered when using static ram and several issues which prevented parameters from being passed via DCs and DCs from being used for persistent stacks without excessive tracking of which functions overwrote the DCs (which still didn't permit moving the stack down multiple words at once).

The processor should also use the same systems between calling and loops. Theoretically speaking, a loop should never begin and end outside of the same function, and several loops mechanisms and calling mechanisms carry over perfectly after calls only preserve DC0:

  • return -> break
  • recursive tail call -> continue
  • call -> infinite loop with end location at next PC

This will allow infinite loops to be added, hardware to be reduced, and the call/loop stack to be significantly extended without sacrificing anything.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions