+ Reply to Thread
Results 1 to 3 of 3

Thread: MARIE Coding

  1. #1
    JoGo Newbie
    Join Date
    Nov 2009
    Posts
    2

    MARIE Coding

    I have to write this in MARIE Assemble Code:

    M = 1;
    N = 1;
    while M < 16
    { M = M + N:
    N = N + 1;
    } end while

    This is what I have: Can you please make adjustments as needed. Thank You in Advance!!

    Org 100 / This starts the program at address 100
    Load N / Load N into the AC
    Add One / Increment
    Store Next / Store this address as out Next pointer
    Load M / Load M into the AC
    Add N / Add N to M
    Store Ctr / Store this value in Ctr to control looping
    Loop, Load Sum / Load the Sum into AC
    AddI Next /Add the value pointed to by location Next
    Store Sum / Store this Sum
    Load Next / load Next
    Add One / Increment by one to point to next address address
    Store Next / Store in our pointer Next
    Load Ctr / Load the loop control variable
    Add Next / Add the value pointed to by location Next
    Store Ctr / Store thie new value in loop control variable
    Skipcond 000 / if control variable < 16 then skip next instruction
    Jump Loop / Otherwise, go to Loop
    Halt / Terminate Program
    M, Dec 1 / M = 1
    N, Dec 1 / N = 1
    One, Dec 1 / Used to Increment or Decrement
    Next, Hex 0 / A pointer to the next number to add
    Ctr, Hex 0 / The loop control variable
    Sum, Dec 0 / The sum


  2. #2
    3v0
    3v0 is offline
    3v0 Excellent 3v0 Excellent 3v0 Excellent 3v0 Excellent 3v0 Excellent 3v0 Excellent 3v0 Excellent 3v0 Excellent 3v0 Excellent 3v0 Excellent 3v0 Excellent
    Join Date
    Jul 2006
    Location
    USA
    Posts
    6,399
    Blog Entries
    11

    What the OP forgot !

    MARIE
    is a JVM simulator used to simulate a simple computer through basic assembly language instructions

    3v0
    Please post questions to the forums. PM's are for personal communication.

    BCHS/3v0's Tutorials
    Junebug USB PIC programmer kit., USB Bit Whacker,
    The 15 Minute Printed Circuit Board! (+drill time)

  3. #3
    JoGo Newbie
    Join Date
    Nov 2009
    Posts
    2

    Any Luck

    Do you know how to use it??? And write Codes??

+ Reply to Thread

Similar Threads

  1. need help with coding~~ROBOT
    By tuan_101 in forum Robotics Chat
    Replies: 2
    Latest: 18th April 2009, 08:38 AM
  2. Using C Coding
    By rag's in forum Electronic Projects Design/Ideas/Reviews
    Replies: 5
    Latest: 18th August 2008, 09:44 AM
  3. need help with coding
    By Iceman96 in forum Electronic Projects Design/Ideas/Reviews
    Replies: 3
    Latest: 21st April 2008, 12:07 AM
  4. coding assistance
    By erosennin in forum Micro Controllers
    Replies: 3
    Latest: 15th July 2006, 03:39 PM
  5. help on C coding
    By Emantra in forum Electronic Projects Design/Ideas/Reviews
    Replies: 7
    Latest: 26th July 2005, 09:45 AM

Tags for this Thread