Synergy Computer v.1.0 (29-bit, 1.5hz)

  • drrs
    5th Apr 2015 Member 0 Permalink

    ...Not yet, I completely forgot about the jump instruction. I will get that working as well.

  • oldmud0
    5th Apr 2015 Member 0 Permalink

    As per convention, I suggest you use the 'h' suffix for small hex numbers. So instead of saying 0x1, just say 1h or 01h.

     

    I also have a hunch: could you possibly do multiplication and addition by interacting certain elements and getting the resulting ctype?

    Edited once by oldmud0. Last: 5th Apr 2015
  • Synergy
    6th Apr 2015 Member 1 Permalink

    Addition is already done in hardware with FILT using: 

     

    a = input1

    b = input2

    x[i] = a[i] XOR b[i]

    y[i] = a[i] AND b[i]

    carry[i] = (x[i] AND carry[i-1]) OR y[i]

    result[i] = x[i] XOR carry[i-1]

     

    Multiplication could be done in hardware, however I don't really have the space, and I am not sure what the time complexity of hardware multipliers is.

  • drrs
    6th Apr 2015 Member 1 Permalink

    I have added string support to the assembly language. It is still a little buggy but it works. So instead of writing 4 letters for each DCO command the assembler will take a string and create the DCO commands for you. Example:

     

    DCO "HELLO WORLD!!"

     

    Will make the assembler output:

     

    10001101011101011100100100111
    10001101110110110111101101110
    10001111110100011101011110001
    10001010011010011010011111110

     

    The assmebler will always terminate any odd number strings with the filler byte so each DCO has 4 sets of 6 bits. I also implemented escape sequences for new line, confirm, clear screen, and blowing up the computer.

     

    Up next is the JE, JNE, and JMP commands.

    Edited 2 times by drrs. Last: 6th Apr 2015
  • Synergy
    6th Apr 2015 Member 0 Permalink

    Hot damn.

     

    That will be amazingly useful. Making me tempted to learn how to create an assembler.

  • drrs
    6th Apr 2015 Member 1 Permalink

    I uploaded my current assembler code to github and will update it from there.

     

    https://github.com/harddal/SYNASM

     

    There is also an updated guide lower on the github page.

    Edited once by drrs. Last: 6th Apr 2015
  • Synergy
    7th Apr 2015 Member 0 Permalink

    DCO seems to work perfectly. One strange thing I found is that it creates powder-87.sc in downloads (instead of creating an .sc file in the same directory as the .exe and with the same name as the .scm input file like it used to do.

  • drrs
    7th Apr 2015 Member 0 Permalink

    Although I couldn't completely reproduce your bug, I think I fixed it. What is the full file path you are giving the assembler?

     

    I also added an input loop if the filepath is incorrect, error checking if the program size exceeds the amount of ROM, and fixed support for commas in strings.

     

    I am currently adding the jump commands, they are being a little problematic.

     

    EDIT:

     

    I commited the changes. To use the jump commands you specify x and y as ARGA and ARGB and the assembler will do the formatting of the binary for you:

     

    JMP 0x7, 0x1 

     

    That will jump to ROM1 (X1 Y1). For some reason 7 is the first X rom address instead of 1, not a problem but a little strange, took me a while to figure out :P

    Edited 8 times by drrs. Last: 8th Apr 2015
  • Synergy
    8th Apr 2015 Member 0 Permalink

    Oh yeah, you can really set anything to the first address. It's just that when I was writing the programs, I made the calculator first and stored it in 1. I couldn't be bothered re-writing the jump addresses, so I just made the program start at 7 instead. But really, any program could start anywhere, as you can manually set the program counter to any number, it just happens to be set at 7 for the default.

  • Factorial
    8th Apr 2015 Banned 0 Permalink
    This post is hidden because the user is banned