* Put a break on intHandler !!! * * * * * Interrupt I/O * I/O device is termout0 * memory mapped as follows: * * $1400 = command register - 1 = write * $1404 = length register * $1408 = address register * $140C = status register * * $100 = interrupt base address * xdef Start, Stop, End xdef buf xdef X, intHandler, intClkHandler Start: move.l #intHandler,$100 ; Set up interrupt base address move.l #intClkHandler,$140 ; Set up interrupt base address move.w #8192,SR ; Enable interrupts move.l #-1, $140C ; Clobber status (status 0 means READY) move.l #buf, $1408 ; Set buffer address move.l #4, $1404 ; Set length to write (4 bytes) move.l #1, $1400; ; Write ; This will start the IO device ; When it's done, it will signal an interrupt * -------------------------------------------- Now termin0 is writing loop: nop bra loop ; INFINIT LOOP !!! nop nop nop intHandler: move.l #7,$1408 ; test move.l #8,$1408 ; test nop nop intClkHandler: move.l #1,$1408 ; test move.l #2,$1408 ; test nop nop * ------------------------------ Now termin0 has transfered one line to `buf' Stop: nop nop nop buf: dc.b 'Hello World' End: end