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

  • Synergy
    9th Apr 2015 Member 0 Permalink

    Yeah was thinking the exact same thing about jumps and DCO. Labels will be perfect. 

     

    Stuff usually does come down to laziness he he he. Bill Gates: 

     

    "I choose a lazy person to do a hard job, because a lazy person will find an easy way to do it" xD

    Edited once by Synergy. Last: 9th Apr 2015
  • drrs
    9th Apr 2015 Member 1 Permalink

    It may be a few days before I can properly implement labels, it requires that I rewrite a lot of the assembler to support labels that appear after the jump:

     

    DCO "@DISPLAY THIS STRING"

    JMP label

    DCO "@SKIP THIS STRING"

    label:

    DCO "DISPLAY THIS STRING"

     

    The way I convert the instructions now it is near-impossible to know that the label exists if it isn't declared before the jump statment that uses it.

     

    I really just want to work on this but my college classes say otherwise :P

    Edited once by drrs. Last: 9th Apr 2015
  • oldmud0
    11th Apr 2015 Member 0 Permalink

    Labels are a bit tricky in assembler because not only do they refer to just JMPing around; they are also used to represent locations in the code itself. So the assembler would replace your label with a memory address, and instead of saying JMP yerLoop it would say in machine code JMP 0x1F or wherever your loop begins. Labels are also used for storing memory, like strings and such, like in FASM, you would say myString: db "Hello world". In conventional ASM, the DB opcode only takes your data because the point in memory where your data will be stored is implied from the label.

     

    In theory, you could live without labels and explicitly define addresses to JMP to, but when you add new stuff in between, things get a bit more complicated as addresses become invalid and get shifted over.

    Edited once by oldmud0. Last: 11th Apr 2015
  • Synergy
    11th Apr 2015 Member 0 Permalink

    The absolute worst thing when making a long program is having to redefine jump addresses because you've had to write extra instructions in between.

  • oldmud0
    12th Apr 2015 Member 0 Permalink

    Synergy:

    The absolute worst thing when making a long program is having to redefine jump addresses because you've had to write extra instructions in between.

     

    Heh, well make sure to leave lots of empty space in your code!

  • Synergy
    12th Apr 2015 Member 0 Permalink

    Funny how I never thought of that solution before T_T. Anywho, I got around to updating the original post finally. 

  • oldmud0
    7th Jun 2015 Member 0 Permalink

    Is this still a thing or is this a lost investment?

  • Synergy
    9th Jun 2015 Member 0 Permalink

    Thinking of making a better one after exams finish.

  • drrs
    5th Jul 2015 Member 0 Permalink

    Please do, I haven't seen any computers in TPT that are quite this cool. I can't wait until you make another one.

  • Skaterboybob
    28th Jul 2015 Member 0 Permalink

    This... Makes no sense at all for me.

    I really wanna mae a program for this computer, but these instructions dont make much sense to me. Usually I code (not in powder toy) in Python, Javascript, C++, C#, and HTML. But uh... This doesnt make much sense. A simpler version would be nice. a 'Making programs for dummies' kind of thing, maybe.