Results 1 to 4 of 4
  1. #1
    Elyne1331's Avatar
    Join Date
    Jun 2014
    Gender
    male
    Location
    01000100 01100001 01110100 01100001
    Posts
    19
    Reputation
    10
    Thanks
    1
    My Mood
    Amused

    MIPS - Writing a simple string

    Assembly seems dead lately so here is a tutorial for MIPS.

    Thing you will need is mars spim
    https://courses.missouristate.edu/KenVollmar/MARS/

    here is the commands you need to know for this program very simple.

    la = Load Address
    li = Load Immediate
    j = Jump

    Save you're code then hit (f3) or the assemble button and go line by line
    to see the processes.

    Code:
    .data
    msg:    .ascii "MPGH"  # Non-null string
    
    .text
    main:                  # Beginning of function
    	la $a0, msg # Loads address of the msg label to the register $a0
    	li $v0, 4      # Loads the integer 4 in to the register $v0, output string
    	syscall        # Starts the function
    	
    	j end          # Jumps to the end label
    
    end:                   # Label
            li $v0, 10     # Loads the integer 10 in to the register $v0, tells the program to stop
    	syscall        # Starts the function
    Last edited by Elyne1331; 11-12-2014 at 09:25 AM.
    Code:
    -a
    137D:0100 mov ax, 0200
    137D:0103 mov dx, 004D
    137D:0106 int 21
    137D:0108 mov dx, 0050
    137D:010B int 21
    137D:010D mov dx, 0047
    137D:0110 int 21
    137D:0112 mov dx, 0048
    137D:0115 int 21
    137D:0117 int 20
    137D:0119
    -h 0119 0100
    0219  0019
    -n 1337.com
    -rcx
    CX 0000
    :0019
    -w
    Writing 00019 bytes
    -g
    MPGH
    Program terminated normally

  2. The Following User Says Thank You to Elyne1331 For This Useful Post:

    Auxilium (11-12-2014)

  3. #2
    Auxilium's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    深い碧の果てに
    Posts
    4,518
    Reputation
    445
    Thanks
    609
    My Mood
    Happy
    Lol nice to see another person interested in assembly.

    I only really have experience with x86 assembly, but it's nice to see and intriguing to look at other processor architectures and assembly languages

  4. #3
    Elyne1331's Avatar
    Join Date
    Jun 2014
    Gender
    male
    Location
    01000100 01100001 01110100 01100001
    Posts
    19
    Reputation
    10
    Thanks
    1
    My Mood
    Amused
    There is still people who enjoy assembly just needs to be brought back to life lol, I'm not to familiar with x86 but always looking to learn, I even made a group for assembly for people who are interested in it.
    Code:
    -a
    137D:0100 mov ax, 0200
    137D:0103 mov dx, 004D
    137D:0106 int 21
    137D:0108 mov dx, 0050
    137D:010B int 21
    137D:010D mov dx, 0047
    137D:0110 int 21
    137D:0112 mov dx, 0048
    137D:0115 int 21
    137D:0117 int 20
    137D:0119
    -h 0119 0100
    0219  0019
    -n 1337.com
    -rcx
    CX 0000
    :0019
    -w
    Writing 00019 bytes
    -g
    MPGH
    Program terminated normally

  5. #4
    egycnq's Avatar
    Join Date
    Sep 2018
    Gender
    male
    Posts
    202
    Reputation
    84
    Thanks
    34
    My Mood
    Amazed
    thanks it helps

Similar Threads

  1. [C/C++ Tutorial] How to write a simple Trainer for MapleStory Europe
    By GroshyIsBack in forum Programming Tutorials
    Replies: 3
    Last Post: 10-06-2015, 03:02 PM
  2. [Help] How to write a string value in ReadWriteMemory.vb eg String(81)
    By 2000callum in forum Call of Duty Black Ops 2 Private Server Hacks
    Replies: 7
    Last Post: 08-17-2013, 06:20 PM
  3. [Help] How to write a string value in ReadWriteMemory.vb eg String(81)
    By 2000callum in forum Call of Duty Black Ops 2 Coding, Programming & Source Code
    Replies: 1
    Last Post: 06-27-2013, 01:48 AM
  4. [HELP] Writing string to memory
    By mightynerd in forum Visual Basic Programming
    Replies: 6
    Last Post: 10-30-2010, 08:27 AM
  5. Actually writing hacks.
    By shercipher in forum Programming
    Replies: 22
    Last Post: 03-20-2006, 04:31 AM