ASM2 - Documentation
  • 📚ASM2 - Documentation
  • Registers
  • Address Registers
  • Instructions
    • DISP
    • END
    • MOV
    • RET
  • Operators
    • ADD
    • SUB
    • MUL
    • DIV
  • Functions
  • Subroutines
  • Jump
    • Conditional Jump
      • Jump Equal (JE)
      • Jump Not Equal (JNE)
      • Jump Greater (JG)
      • Jump Greater or Equal (JGE)
      • Jump Less (JL)
      • Jump Less or Equal (JLE)
    • Unconditional Jump
Powered by GitBook
On this page
  • Definition
  • Syntax:
  • Usage:
  • For Register:
  1. Instructions

DISP

DISP (Display) Instruction

Definition

The "DISP" instruction in assembly language is used to display values on the output or display. It is versatile and can be employed for printing strings, numbers, or the contents of registers.

Syntax:

DISP VALUE

Where VALUE represents the string, number, or register whose content needs to be displayed.

Usage:

For String:

DISP "Hello, World!"
  • Detail: This syntax is used to display the specified string ("Hello, World!" in this case) to the output.

For Number:

DISP #42
  • Detail: This syntax is used to display the specified number (42 in this case) to the output. The '#' symbol indicates that the following value is a numeric constant.

For Register:

MOV R2, #100
DISP R2
  • Detail: After loading a value (100 in this case) into register R2 using the "MOV" instruction, the "DISP" instruction is used to display the contents of register R2 to the output.

PreviousInstructionsNextEND

Last updated 1 year ago