trap

Operands

Op 1
Im

Executes a trap, the value of the operand is used as the trap number, only #15 is supported. The register d0 will be used as the trap type which are:

OpcodeDescription
0Print string pointed by a1 with length read in d1.w, null terminated with max of 255, then prints a new line.
1Print string pointed by a1 with length read in d1.w.
2Read string from keyboard, writes the string at address of a1 and overrides the value of d1 with the length of the string.
3Print number at d1.
4Read number, writes to d1.
5Read character, writes to d1.
6Print character at d1.
8Get time, writes to d1.
9Terminate.
13Prints null terminated string pointed by a1 then prints new line, errors if string is longer than 16kb, to prevent infinite loops.
14Prints null terminated string pointed by a1, errors if string is longer than 16kb, to prevent infinite loops.
Loading...