Sim68K Environment


TRAP #15 is used for I/O.  Put the task number in D0.

 Task

 30

 Clear the Cycle Counter

 31

 Return the Cycle Counter in D1.L  Zero is returned if the cycle count exceeds 32 bits.

 32

 Hardware/Simulator
   D1.B = 00, Display hardware window
   D1.B = 01, Return address of 7-segment display in D1.L
   D1.B = 02, Return address of LEDs in D1.L
   D1.B = 03, Return address of toggle switches in D1.L
   D1.B = 04, Return Sim68K version number in D1.L
                    Version 3.9.10 is returned as 0003090A
   D1.B = 05, Enable exception processing.
                    Exceptions will be directed to the appropriate 68000 exception vector.
                    This has the same effect as checking Enable Exceptions in the Options menu.
   D1.B = 06, Set Auto IRQ
                    D2.B = 00, disable all Auto IRQs
                       or     Bit 7 = 0, disable individual IRQ
                               Bit 7 = 1, enable individual IRQ
                               Bits 6-0, IRQ number 1 through 7
                     D3.L, Auto Interval in milliseconds, 1000 = 1 second
   D1.B = 07, Return address of push button switches in D1.L

 33

 Get/Set Output Window
   D1.L High 16 bits = Set width in pixels, min = 640
           Low 16 bits  = Set height in pixels, min = 480  
   D1.L = 0, Get current output window resolution in D1.L as
           High 16 bits = Width in pixels
           Low 16 bits  = Height in pixels
   D1.L = 1, Set windowed mode
   D1.L = 2, Set full screen mode 

Example:

     MOVE.B #33,D0
     MOVE.L #1024*$10000+768,D1        Set screen to 1024 x 768
     TRAP   #15