Partial Lab 5 code

Partial Lab 5 code - MOVE.B#ACIArst,ACIACR;Master reset...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
. . . ACIArst EQU %00000011 ;Master ACIA Reset ACIAset EQU %00010101 ;No Tx or Rx interrupts 8 data bits 1 stop bit delay_const EQU $00FF00 ORG $20000 START MOVEA.L #$23C00,A7 ;Initialize SP to default below monitor INIT MOVE.W #$2700,SR ;Disable Interrupts for now * DELAY - a routine to "waste" almost one second so that the ACIA can settle before sending new stuff DELAY MOVEM.L D0-D1,-(A7) MOVE.L #delay_const,D0 MOVE.L #2,D1 DELAYloop SUBQ.L #1,D0 BNE DELAYloop MOVE.L #delay_const,D0 SUBQ.L #1,D1 BNE DELAYloop MOVEM.L (A7)+,D0-D1
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: **************************************************** MOVE.B #ACIArst,ACIACR ;Master reset ACIA MOVE.B #ACIAset,ACIACR ;Set up ACIA for polling busy_wait_input MOVE.B ACIASR,D2 ;copy ACIA1 Status register into D2 BTST.B #0,D2 ;see if RxReady bit is set indicating that another character has been typed BEQ busy_wait_input * if we fall through , somebody entered a keyboard character so let's get it into D3 MOVE.B ACIA_I_DR,D3 ;Move data from I/O interface to CPU ; thus output to Peripherals such as SCREEN...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online