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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T01:45:53+00:00 2026-06-15T01:45:53+00:00

A program typically issues a software trap when the program requires servicing by the

  • 0

A program typically issues a software trap when the program requires
servicing by the operating system. The general exception handler for
the operating system determines the reason for the trap and responds
appropriately.

Is the assembly instruction trap alike the instruction TRAP in BASIC?
The answer seems to be yes. Can you accept or reject my conclusion?

Code for "no interruption" is according to my instructions:

noint:
    PUSH r8
    movia r8,0x003b683a # machine code for TRAP
    ldw et,-4(ea) # read instr closest to return
    cmpeq et,et,r8 # compare
    POP r8
    bne et,r0,TrapHandler # if equal, jump to traphandler

Update

AFAIK in BASIC you can write e.g.

10 TRAP 20

to make row 20 the row for handling an error.

  • 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-15T01:45:54+00:00Added an answer on June 15, 2026 at 1:45 am

    Not sure what TRAP does in BASIC, but the TRAP instruction in the assembler manual that you linked generates a hardware exception that can be handled by the operating system.

    There is rarely need for a programmer to use this instruction in their code. The typical use of it is to be inserted by a debugger into the code being debugged at the point where a stop is desired (breakpoint), then running/continuing the program, and regaining control once the TRAP instruction is reached.

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

Sidebar

Related Questions

I'm trying to develop a cross-platform application using C++ with boost. I typically program
Queries I tried: ExpandEnvironmentStrings(%COMMONPROGRAMFILES%) , GetSpecialPath(CSIDL_PROGRAM_FILES_COMMON) . All resolve to (typically) c:\\Program Files (x86)\\Common
Typically when you run any program, during execution time what are different storages available
I'm writing a program, foo, in C++. It's typically invoked on the command line
WHen I write a bash program I typically construct calls like follows: declare -a
The gdbserver program allows for the remote debugging of programs. Typically, a local copy
The entry point into a program in java is typically something like this //
I typically develop in C# and am quite accustom to using System.IO. I recently
Typically the model for ORM's that I've used goes something like this: Program startup:
I am building a unit convertor program that uses the MathFP library. Typically unit

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.