Question

Write a MIPS program that prints(displays) "Hello World" using MMIO (NOT syscall!)

Here is a screenshot of a MIPS program that prints user input to the screen. And I need something that displays "Hello World" without taking any input. Please help! Thanks.

.data 7 strl:.asciiz \nStart entering characters in the MMIO Simulator .text 10 .globl echo 12 13 14 15 16 17 echo: al Read

The output should be something like this but without the input

Keyboard and Display MMIO Simulator DISPLAY: Store Oxffff000c, cursor 15, area 113 x 12 to Transmitter Data Hello World! Dela

.data 7 strl:.asciiz "\nStart entering characters in the MMIO Simulator" .text 10 .globl echo 12 13 14 15 16 17 echo: al Read # single print statement la $a0, strl syscall # reading and writing using MM10 # in an infinite loop add $a0, $V0, $zero jal Write j echo 18 19 20 21 22 Read: ui $t0, 0xffff 23 Loopl: lw $t1, 0($t0) 24 25 26 27 28 29 Write: lui $t0, 0xffff 30 Loop2: lw $t1, 8($t0) 31 32 #ffff0000 #contro andi $tl, $t1,0x0001 beq $t1,$zero, Loop1 lw $v0, 4($t0) jr $ra #data #ffff0000 #control andi $t1, $t1,0x0001 beq $t1, $zero, Loop2 Sw $a0, 12($t0) jr $ra #data 34 35
Keyboard and Display MMIO Simulator DISPLAY: Store Oxffff000c, cursor 15, area 113 x 12 to Transmitter Data Hello World! Delay length: 5 instruction executions Font DAD Fixed transmitter delay, select using slider KEYBOARD: Characters typed here are stored to Receiver Data Oxffff0004 Hello World!
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Hello, Please try the following code.

.globl main
.data
prompt:
    .asciiz  "Hello world!"
.text
main:
    addi $v0, $zero, 4
    lui $a0, 0x1001       # $a0 = 0x10010000
    syscall
rtn:
    jr $ra
Add a comment
Know the answer?
Add Answer to:
Write a MIPS program that prints(displays) "Hello World" using MMIO (NOT syscall!) Here is a scre...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • MIPS Insertion program.........I could really use some help ASAP

    I have this MIPS program and I'm having trouble with it. This program is user inputs numbers until zero and sorts and print the numbers in order. Please soove this issue. You can use any sorting algorithm except bubble sort.  Need it as soon as possible. Here is the code:.datanum: .word 0space: .byte ' ' .text main:  # la $t0, val # loads val into a register  # li $t1, 0      #keeps track of how many numbers entered  la $a0,...

  • WRITE THE FOLLOWING CODE IN FLOATING POINT NUMBERS IN ASSEMBLY LANGUAGE USING MIPS IN MARS .data...

    WRITE THE FOLLOWING CODE IN FLOATING POINT NUMBERS IN ASSEMBLY LANGUAGE USING MIPS IN MARS .data prompt: .asciiz "\nMaximum number is : " prompt1: .asciiz "\nMinimum number is : " prompt2: .asciiz "\nRange of the array is : " size: .word 10 #load array array: .word 23, -12, 45, -32, 52, -72, 8, 13,22,876 .text #load address of array and size la $s4,array #load address of A lw $t0,size #load i to t0 jal getArrayRange li $v0, 4    la...

  • The task will be to write a program in assembler to enter a number and calculate...

    The task will be to write a program in assembler to enter a number and calculate its associated Fibonacci number using a procedure (subroutine) that is called recursively. Factorial and Fibonacci(outline Programs) # MIPS assembly assembly assemblyassemblycode .data n: .word 4 .text main: la $s0,n lw $a0, 0($s0) jal factorial # move what ever is returned into $a0 move $a0, $v0 li $v0,1 syscall b finished factorial: add $sp , $sp , -8 # make room sw $a0, 4($sp )...

  • It's a MIPS question. Can anyone explain what's happened in the loop? Thank you. I need...

    It's a MIPS question. Can anyone explain what's happened in the loop? Thank you. I need a deep explanation. Ma1n SvO, 4 $a0, stri1 # print string upper case 14 syscall $v0, 4 $a0, string 16 # print string "ABCDEFG. 18 syscall v0, 4 $a0, str2 19 # print string lower case 21 syscall 23 1oo 24 25 26 $t1, string($tO) beq $t1, $zero, exit blt $t1, A', continue bgt $t1, 2', conti addi $t1, $t1, 0x20 sb #t0 to...

  • im trying to complete mips program code about a calculator program that can calculate integer addition...

    im trying to complete mips program code about a calculator program that can calculate integer addition / subtraction written using the MIPS assembler. im having hard times to debug this. The input is given to the array of Formula char (base address $ s0) in the form of a formula. The null character (\ 0, ASCII code 0) is placed at the end. The calculation result is given to the register $ s1 and the overflow is ignored. For example,...

  • Write the assembly code that will transform a squared image into a negative print. (HARD-CODED OUTPUT...

    Write the assembly code that will transform a squared image into a negative print. (HARD-CODED OUTPUT WILL RESULT IN ZERO.) That is, every pixel whose unsigned value is 0 should change to 255, 1 should change to 254, 2 should change to 253, ... 255 should change to 0. $a0 contains the address of the input buffer, $a1 contains the address of the output buffer address, and $a2 contains the image dimension. Look at the below image for your reference:...

  • 1. Write a program in Assembly language using MIPS instruction set that reads two integer numbers...

    1. Write a program in Assembly language using MIPS instruction set that reads two integer numbers from the user named as start and end number and finds out all the prime numbers between start and end (including start and end). Your program should do the validation of both the numbers as follows: i. start number must be smaller or equal to the end number. ii. Both numbers must be positive. iii. The maximum value for the end number is 10000...

  • Hello, I'm having trouble completing this program in less than four lines using MIPS programming language,...

    Hello, I'm having trouble completing this program in less than four lines using MIPS programming language, we are required to fill in the missing code as indicated (via comments). IMPORTANT: As indicated in the program's comments: ⇒ Write no more than certain number of lines of code as indicated. (One instruction per line, and there will be penalty if your code consumes more lines.) ⇒ Code MUST use only instructions that are allowed i.e., only bit manipulating instructions: (ANDing, ORing,...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT