Programming Computer for processor

  • massey101
    3rd Nov 2010 Member 2 Permalink
    A while ago devast8a released a processor that had been made in powder toy. Later UM3K developed a way to load commands onto the processor efficiently. However you still have to fill in all the things in binary commands. Therefore I designed a simple programming language and compiler for the processors CNCT stack. (labelled "PCL Computer")

    Instructions

    - The Computer
    The computer that is being used has 26 buttons that can be activated by a single click with NUET. A LCRY light should come on up the top, wait for it to turn off before writing the next command. to copy the stack copy from the red squares (Inclusive), and place it onto the stack on the processor. NOTE: use 'processor w/ stack (2)' as it has been modified for use with the programming computer. I take no credit for processor w/ stack (2)

    - The language
    The language is very basic, with no loops or conditional statements as the processor does not support it. There are 3 variables A, B and C you can write to A and B using constants or the storage.
    to assign a constant: (2 line) (N/A for variable C)
    ---CON->A
    ---The Constant
    eg:
    ---CON->B
    ---10
    To assign to Storage: (2 line)
    ---A->STORE
    --- Position in Storage //There are 16 Positions to write to (0-15)
    To Read from Storage: (2 line) (N/A for variable C)
    --- STORE->A
    ---Position in Storage
    To add variable A and B and put the result in C
    ---ADD
    To Subtract the variable B from A (A-B) and put the result in C
    ---SUB

    Then when you have completed your program use NUL (you can hold down and the computer will lower the electric current automatically) to move your program down to the bottom so that it can be read instantly (when the CNCT is inline with the red arrow) to finnish compiling.
    Finally, To stamp select everything within (and including) the red squares and export into another Simulation which can then be uploaded wherever you want.
    The Maximum file size for these programs is 14 bytes or 28 lines! It is possible to split programs up into multiple stamps however this requires user interaction and is preferred against!

    Example Program:
    This program will subtract 2 from 6 and place the result in ram 10. (result should be 0100)
    ---CON->A
    ---6
    ---CON->B
    ---2
    ---SUB
    ---C->STORE
    ---10


    LoadSaveBlock(47751);
    LoadSaveBlock(44935);
  • HeyJD
    3rd Nov 2010 Member 0 Permalink
    You forgot to link it.

    add this too your topic.

    (save)44938(/save)

    but change all the "( or)" to "[ or ]"
    and that would put this in your topic

    LoadSaveBlock(44938);
  • Rob215
    3rd Nov 2010 Member 0 Permalink
    It will be called: PowderPC+
  • Cr15py
    3rd Nov 2010 Member 0 Permalink
    Wow, just WOW. This is, I must say, is incredibly useful!
  • massey101
    3rd Nov 2010 Member 0 Permalink
    Thanks for showing me how to link HeyJD
    I'm fairly new

    I was originally going to do it for a solid state on devasts cpu2 but I couldn't wait that long :P
  • MiXih
    3rd Nov 2010 Member 0 Permalink
    use solid stack
  • massey101
    3rd Nov 2010 Member 0 Permalink
    the current solid state stack is actually smaller, it is 10bytes while the hard stack is 14 bytes. Also it would take longer to program because the time difference required is longer (don't ask me why)

    EDIT: I think its because it uses heat and has to cool down
  • JasonTroll
    3rd Nov 2010 Member 0 Permalink
    Is anyone else having problems moving a RAM address into a register ? Nothing happens for me when I run it.
  • massey101
    3rd Nov 2010 Member 0 Permalink
    Which register are you trying to use and which ram slot. most helpful would be to post up the entire program
  • JasonTroll
    3rd Nov 2010 Member 0 Permalink
    I was just testing out the ram

    CON > A
    15
    A > STO
    0
    CON > A
    0
    STO > B
    0

    15 is removed from ram, but never placed in register B..