Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Do different 68k simulators have different TRAP tasks?

Tags:

People also ask

What is CR and LF in easy68k?

CR and LF are as labels to use in place of the ASCII codes for the carriage return and line feed. This is how you would add a second line to your message. The terminating 0 was moved to the last line. Output of the code from above. Notice the text from the second DC.

When trap 15 performs a task which register does it read the instruction number from?

TRAP #15 is used for I/O. Put the task number in D0. Read a number from the keyboard into D1.

What is DC B in easy68k?

DC. B is used for byte size of data required to be input. Straight away The hexadecimal characters are used to display instead of using decimal numbers, however, the result is always the same. CR( carriage return) and LF(line feed) are used throughout the coding after each line.


I've been revisiting Motorola 68000 programming lately. Admittedly, when I took the course I just did what was necessary to pass (and had a horrible professor)...but NOW I'm actually interested in the stuff. Anyway, looking through my old textbook The 68000 Microprocessor by James L. Antonakos, he uses the following code:

      ORG     $8000
HMSG  DC.B    'Hello!'
      DC.B    0  
      ORG     #8100  
START MOVEA.L #HMSG,A3  
      TRAP    #3  
      TRAP    #9  
      END     START  

This would not compile in Easy68k, but the book has ASM68K referenced. When I changed the code to this, it worked.

      ORG   $1000
HSMG  DC.B  'Hello!',0

START LEA   HSMG,A1
      MOVE  #14,D0  
      TRAP  #15

END START

Is this just due to differences between the compilers? Or am I missing something bigger here? I understand that in the simulator TRAP #15 executes whatever task is in register D0 at the time, but are there different trap tasks per simulator, or is that standard across all 68000 processors?