URL
https://opencores.org/ocsvn/w11/w11/trunk
Subversion Repositories w11
[/] [w11/] [tags/] [w11a_V0.7/] [tools/] [asm-11/] [w11/] [sys/] [dl11/] [simple_echo.mac] - Rev 33
Compare with Previous | Blame | View Log
; $Id: simple_echo.mac 504 2013-04-13 15:37:24Z mueller $
;
; simple echo test for DL11 interface
;
RCSR = 177560
RBUF = 177562
XCSR = 177564
XBUF = 177566
;
CR = 015
LF = 012
;
; transfer vector
;
.asect
. = 200
jmp start
;
; test code
;
. = 1000
;
start: mov #start,sp
;
1$: tstb @#RCSR ; input ready ?
bpl 1$ ; if not poll
movb @#RBUF,r0 ; get input char
2$: tstb @#XCSR ; output ready ?
bpl 2$ ; if not poll
movb r0,@#XBUF ; echo received char
cmpb #CR,r0 ; was it CR ?
bne 1$ ; if not, wait for next input
3$: tstb @#XCSR ; output ready ?
bpl 3$
movb #LF,@#XBUF ; send LF
br 1$
;
.end