#INCLUDE 'A:\VAR_DEF.ASM' * Define program variables ORG DATA * Start main program ORG PROGRAM START LDX #REGBAS * GIURGIUTIU, Victor LDAA #%00110000 ; initialize BAUD=9600 STAA BAUD,X LDAA #%00000000 ; initialize 8-bit word STAA SCCR1,X LDAA #%00001100 ; initialize TE and RE STAA SCCR2,X LABEL0 NOP * Wait for a keypress reception LABEL1 LDAA SCSR,X ; check if RDRF is set ANDA #%00100000 ; AND with mask for RDRF BEQ LABEL1 * You are here when the reception reg. is full LDAB SCDR,X ; load SCI data in AccB STAB PORTB,X ; display data through port B BRA LABEL0 ; loop back and do it again SWI ORG $FFFE ; reset vector FDB START ; set to start of program