Initial commit of files related to NED architecture.
[ned1] / software / assembly_fragments / echo.asm
CommitLineData
bc5b63cf
AT
1echo
2 WORD_134217728 # XBUF
3 WORD_134217732 # XCSR
4 WORD_134217736 # RBUF
5 WORD_134217740 # RCSR
6
7getchar
8 LDSP+0
9 LOAD
10 TEST
11 BRZ>getchar
12 LDSP+1
13 LOAD
14 # A character is now on the TOS and ready to be printed to the terminal.
15putchar
16 LDSP+3
17 LOAD
18 TEST
19 BRZ>putchar
20 LDSP+4
21 STORE
22 # Now wait for the next incoming character.
23 IM_0
24 TEST
25 BRZ>getchar