Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9009715
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T02:16:21+00:00 2026-06-16T02:16:21+00:00

I am coding a program that uses interrupt handling to play an ascii-based game

  • 0

I am coding a program that uses interrupt handling to play an ascii-based game in MIPS. I am told to “Long call” my main function from my handler. My handler takes place under .ktext 0x80000180 and looks like this:

.ktext  0x80000180

    move    $k1, $at

    beq $13, 0, keyboard
    li  $v0, 10 # Do nothing and exit
    syscall

    keyboard: # else check interupt level
    la  $t9, 0xffff0000
    beq $t9, 1, continue

    li  $v0, 10     # Do nothing and exit
    syscall
    continue:

    jal frogger     # call frogger function
    mtc0    $0, $13     # set cause register to 0

    mfc0    $k0, $12        # Fix status register
    andi    $k0, 0xfffd # clear EXL bit
    ori $k0, 0x1        # Enable interrupts
    mtc0    $k0, $12        # Store value back into status register


    move    $at, $k1

    eret

The problem is with the line jal frogger, it says
Error in F:\Users\Matt\WSU\Cpts 260\HW9\HW9.asm line 32: Jump target word address beyond 26-bit range.

Is it something wrong with the rest of the code or is there a special way to call a function from the .ktext?

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T02:16:22+00:00Added an answer on June 16, 2026 at 2:16 am

    Replace jal frogger by something like:

      la    $t9, frogger
      jalr  $t9
    

    JALR uses an absolute address in MIPS.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm coding a program that is a 4x4 memory game. Within these 16 boxes
I am currently coding some chat program and now want to play music via
I'm working on a program that uses HTML/CSS/Javascript/JQuery for its user interface. One of
im coding a program that starts an command prompt boot application ,at run time
Hi I have a small problem. I am coding a program that displays the
I'm coding the program that using linked list to store a sparse matrix. First
I have a card game program that when a card gets discarded and is
I'm developing a program in C that uses an array of linked lists (a
I'm coding a little program that has to sort a large array (up to
I'm having trouble coding part of a program that will read in a name

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.