Interrupts and I/O
Page 1 of 1

Author:  fulgen [ Wed Apr 25, 2012 9:07 pm ]
Post subject:  Interrupts and I/O

I have noticed that if the microprocessor is executing a TRAP # 15 with a reading task awaiting keyboard ( 2, 4, 5, 18 ) interrupts of any level does not work. After execution of TRAP #15, the interrupts can work again.


      ORG $64
      DC.L INTA   

      ORG   $1000
START:            ; first instruction of program
      MOVE.L #5,D0
      TRAP #15

      MOVE.B   #9,D0
      TRAP   #15      ; halt simulator

INTA      EORI.B #%01010101,$E00010

Author:  clive [ Thu Apr 26, 2012 11:14 pm ]
Post subject: 

Most likely because the simulator isn't multi-threaded, the most effective course of action would be to use Task 7 to check for pending characters on a 68K side loop, and implement your own numeric input routines using Task 5.

You could of course also look at the source, and pump the simulation instead of blocking on OS calls.

The problem with not servicing interrupts probably effects any OS task that might block, for instance writing data to a file, or displaying a file dialog.

      ORG $64
      DC.L INTA ; IRQ1   

      ORG   $1000
START:            ; first instruction of program

      MOVEQ  #7,D0 ; Check Character Pending
      TRAP   #15

      OR.B   D1,D1
      BEQ    LOOP

      MOVEQ  #5,D0 ; Get Character
      TRAP   #15

      BRA    LOOP

      MOVE.B #9,D0
      TRAP   #15      ; halt simulator

INTA  EORI.B #%01010101,$E00010

   END   START      ; last line of source

Author:  profkelly [ Wed Jan 09, 2013 2:05 pm ]
Post subject:  Re: Interrupts and I/O

The simulator blocks the processing of interrupts until I/O operations complete.

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group