* Modified 3/24/97 for EVBU - Mike Burke * addresses of BUFFALO subroutines outa equ $ffb8 output the ASCII character in A outstrg equ $ffca output string at x ; string is terminated by $04 outcrlf equ $ffc4 output crlf outlhlf equ $ffb2 output left nibble of a in ASCII outrhlf equ $ffb5 output right nibble of a in ASCII out2bsp equ $ffc1 output 2byte value at x in HEX input equ $ffac a=input() ; a=0 if no char entered inchar equ $ffcd a=input() ; loop till user enters char upcase equ $ffa0 a=upcase(a) wchek equ $FFA3 z=1 if A={space,comma,tab} dchek equ $FFA6 z=1 if A={space,comma,tab,CR} * ASCII control codes cr equ $0d carriage return lf equ $0a line feed eot equ $04 end of text ORG $0100 ldx #prompt jsr outstrg ;prompt user ldy #buffer-1 ;initialize pointer to input buffer inloop jsr inchar iny ;point to next field in input buffer staa 0,y ;store char in input buffer cmpa #cr ;has user typed enter? bne inloop ldaa #eot staa 0,y ;replace cr with eot char in input buffer jsr outcrlf ldx #hello jsr outstrg ;output message ldx #buffer jsr outstrg ;output user's name jsr outcrlf swi ;quit buffer rmb 80 prompt fcc 'Enter your name: ' fcb eot hello fcc 'Hello, ' fcb eot * the following lines simulate keyboard input on the simulator * 3/24/97 Not required for HC11 EVBU * ORG $df00 * fcc 'Hans' * fcb cr,lf