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 8270499
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T06:34:59+00:00 2026-06-08T06:34:59+00:00

I am a beginner when it comes to assembly language. I am using easy

  • 0

I am a beginner when it comes to assembly language. I am using “easy 68k editor/assembler” to write 68k assembly code that asks the user for 2 values, then sum them up together and display it. The problem is that my code keeps getting halted and I am not sure how to troubleshoot/debug this problem.

Can anyone help me figure out how to track down the error? I will be grateful. Thank you in advance.

*-----------------------------------------------------------
* Program    : Sum of Two Numbers
* Written by : Me
* Date       : July 15, 2012
* Description: This program will read in 2 numbers the user
*inputs and find the sum.
*-----------------------------------------------------------

    org     $8000

    START       movea.l #MSG1, A3
                trap    #3
                clr.w   D2
                JSR     Loop
                trap    #2
                move.w  d2, d4
                movea.l #msg2, a3
                trap    #3
                clr.w   d2
                jsr     loop
                trap    #2
                movea.l #msg3, A3
                trap    #3
                add.w   d4, d2
                JSR     DISP
                trap    #2
                trap    #9
    LOOP        trap    #0
                trap    #1
                cmp.b   #$0D, D1
                BEQ     BREAK
                and.b   #$0F, d1
                mulu    #10, d2
                add.w   d1, d2
                jmp     loop
    Break       rts
    DISP        clr.b   d3
    DISDIV      divu    #10, D2
                move.b  #16, d5
                ror.l   d5, d2
                or.b    #$30, d2
                move.b  d2, -(A7)
                addq    #1, d3
                clr.w   d2
                ror.l   d5, d2
                bne     DISDIV
    DISDIG      move.b  (a7)+, D1
                trap    #1
                subq.b  #1, D3
                bne     DISDIG
                rts
                org     $8100
    MSG1        DC.B    'Please enter the first of two numbers (two digits) ', 0
    MSG2        DC.B    'Please enter the second of two numbers (two digits) ', 0
    MSG3        DC.B    'The sum of the two 2 digit numbers you entered is ', 0
                end     start
  • 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-08T06:35:02+00:00Added an answer on June 8, 2026 at 6:35 am

    Most likely the traps you are using are not those used by Easy68K. Look here for the traps used by Easy68K.

    The function of the trap instructions is not defined by the 68K assembly language, but rather assigned by the operation system (if the OS makes use of the traps at all, some just ignore them). If you execute a trap instruction the 68000 just executes the code the trap vector points to. There is no “buildin” function assigned to any trap.

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

Sidebar

Related Questions

Forgive my ignorance, but I am a beginner in java that comes from using
I am a beginner when it comes to using mysql queries embedded inside other
I'm an absolute beginner when it comes to using both SWIG and lua, and
I am a beginner when it comes to programming but I was sure that
I have some C# code which is using CSharpCodeProvider.CompileAssemblyFromSource to create an assembly in
I'm a total beginner when it comes to computer languages, and was asked for
I am an absolute beginner when it comes to ActionScript and Flash. I am
I'm absolute beginner when it comes to mono for android . I've used following
I am a beginner when it comes to programming with Android/Java, and I am
I'm absolute beginner when it comes to mono for android . Referring to below

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.